-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAJOR: Add minimal functionning usleep (+Makefile + PKGBUILD)
Also add basic PKGBUILD, .SRCINFO and LICENSE for AUR publishing Also add a .gitignore to ignore vim tmp files and generated files By default, install it in /usr/bin/usleep
- Loading branch information
Corentin Peuvrel
committed
Dec 15, 2015
0 parents
commit e221f43
Showing
6 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by mksrcinfo v8 | ||
# Tue Dec 15 18:43:37 UTC 2015 | ||
pkgbase = usleep | ||
pkgdesc = A simple C wrapper of glibc's function | ||
pkgver = 1.0 | ||
pkgrel = 1 | ||
url = http://linux.die.net/man/3/usleep | ||
arch = x86_64 | ||
license = MIT | ||
depends = glibc | ||
source = usleep.c | ||
source = Makefile | ||
source = LICENSE | ||
md5sums = 6da0cbdc5a41ad656fd843703936e636 | ||
md5sums = 2dcf21a9a6c4ef67e4e3edcbed189289 | ||
md5sums = 51766e6e3cd7960da32876585fe6aecd | ||
|
||
pkgname = usleep | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
usleep | ||
*.swp | ||
src/ | ||
pkg/ | ||
usleep-*.pkg.tar.xz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Copyright (c) 2015 Corentin Peuvrel <corentin at peuvrel dot net> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject | ||
to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY | ||
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE | ||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | ||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR | ||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.PHONY: clean, mrproper | ||
CC = gcc | ||
CFLAGS = -Wall -Wextra -O2 | ||
PREFIX = /usr/bin | ||
|
||
usleep: usleep.c | ||
$(CC) $(CFLAGS) -o $@ $+ | ||
|
||
install: | ||
install -D -m755 usleep $(PREFIX)/usleep | ||
|
||
clean: | ||
rm -f usleep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Maintainer: Corentin Peuvrel <corentin.peuvrel at gmail dot com> | ||
pkgname=usleep | ||
pkgver=1.0 | ||
pkgrel=1 | ||
pkgdesc="A simple C wrapper of glibc's function" | ||
arch=(x86_64) | ||
url=http://linux.die.net/man/3/usleep | ||
license=('MIT') | ||
depends=('glibc') | ||
source=("usleep.c" "Makefile" "LICENSE") | ||
md5sums=('6da0cbdc5a41ad656fd843703936e636' | ||
'2dcf21a9a6c4ef67e4e3edcbed189289' | ||
'51766e6e3cd7960da32876585fe6aecd') | ||
|
||
build() { | ||
make | ||
} | ||
|
||
package() { | ||
make PREFIX="$pkgdir/usr/bin" install | ||
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" | ||
} | ||
|
||
# vim:set ts=2 sw=2 et: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include <stdlib.h> | ||
#include <unistd.h> | ||
|
||
int main(int argc, const char *argv[]) | ||
{ | ||
if (argc < 2) | ||
return 0; | ||
|
||
unsigned int usecs = atoi(argv[1]); | ||
usleep(usecs); | ||
return 0; | ||
} |