diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-09-17 07:15:55 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-09-17 07:15:55 +0000 |
commit | 32cb1052c5237f0d638f1a28d64af30c30e559b2 (patch) | |
tree | 2985bdf29e4fa6516e3a582e2a0d2be25f198b52 | |
parent | 69d1f65dbaf160f82449a876184218167ad6b89c (diff) | |
download | aports-32cb1052c5237f0d638f1a28d64af30c30e559b2.tar.bz2 aports-32cb1052c5237f0d638f1a28d64af30c30e559b2.tar.xz |
main/beep: upgrade to 1.3
-rw-r--r-- | main/beep/APKBUILD | 30 | ||||
-rw-r--r-- | main/beep/beep-1.2.2-nosuid.patch | 33 |
2 files changed, 16 insertions, 47 deletions
diff --git a/main/beep/APKBUILD b/main/beep/APKBUILD index a41389bf2a..4c14516dab 100644 --- a/main/beep/APKBUILD +++ b/main/beep/APKBUILD @@ -1,29 +1,31 @@ # Contributor: Leonardo Arena <rnalrd@gmail.com> # Maintainer: Leonardo Arena <rnalrd@gmail.com> pkgname=beep -pkgver=1.2.2 -pkgrel=1 +pkgver=1.3 +pkgrel=0 pkgdesc="A terminal bell" url="http://johnath.com/beep" license="GPL-2" -depends="" -makedepends="" -#install= +depends= +makedepends= +install= subpackages="$pkgname-doc" -source="http://johnath.com/$pkgname/$pkgname-$pkgver.tar.gz - beep-1.2.2-nosuid.patch" +source="http://johnath.com/$pkgname/$pkgname-$pkgver.tar.gz" -build() { - cd "$srcdir/$pkgname-$pkgver" - - patch beep.c < ../../beep-1.2.2-nosuid.patch +_builddir="$srcdir"/$pkgname-$pkgver +prepare() { + cd "$_builddir" +} +build() { + cd "$_builddir" make || return 1 +} +package() { + cd "$_builddir" install -m755 -D "$srcdir/$pkgname-$pkgver/beep" "$pkgdir"/usr/bin/beep install -m644 -D "$srcdir/$pkgname-$pkgver/beep.1.gz" "$pkgdir"/usr/share/man/man1/beep.1.gz } -md5sums="d541419fd7e5642952d7b48cbb40c712 beep-1.2.2.tar.gz -38e2fc3ea98ced50038799ca80fdd9ee beep-1.2.2-nosuid.patch" - +md5sums="49c340ceb95dbda3f97b2daafac7892a beep-1.3.tar.gz" diff --git a/main/beep/beep-1.2.2-nosuid.patch b/main/beep/beep-1.2.2-nosuid.patch deleted file mode 100644 index 33e6affa9f..0000000000 --- a/main/beep/beep-1.2.2-nosuid.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- beep.c.orig 2005-07-23 13:37:01.000000000 -0400 -+++ beep.c 2005-07-23 14:00:55.000000000 -0400 -@@ -218,22 +218,20 @@ - int i; /* loop counter */ - - /* try to snag the console */ -- if((console_fd = open("/dev/console", O_WRONLY)) == -1) { -- fprintf(stderr, "Could not open /dev/console for writing.\n"); -- printf("\a"); /* Output the only beep we can, in an effort to fall back on usefulness */ -- perror("open"); -- exit(1); -- } -+ console_fd = open("/dev/console", O_WRONLY); - - /* Beep */ - for (i = 0; i < parms.reps; i++) { /* start beep */ -- if(ioctl(console_fd, KIOCSOUND, (int)(CLOCK_TICK_RATE/parms.freq)) < 0) { -- printf("\a"); /* Output the only beep we can, in an effort to fall back on usefulness */ -- perror("ioctl"); -+ if (console_fd >= 0) { -+ ioctl(console_fd, KIOCSOUND, (int)(CLOCK_TICK_RATE/parms.freq)); -+ } else { -+ printf("\a"); /* Output the fall back for usefulness we don't have to be suid to work at all */ -+ fflush(stdout); - } - /* Look ma, I'm not ansi C compatible! */ - usleep(1000*parms.length); /* wait... */ -- ioctl(console_fd, KIOCSOUND, 0); /* stop beep */ -+ if (console_fd >= 0) -+ ioctl(console_fd, KIOCSOUND, 0); /* stop beep */ - if(parms.end_delay || (i+1 < parms.reps)) - usleep(1000*parms.delay); /* wait... */ - } /* repeat. */ |