summaryrefslogtreecommitdiffstats
path: root/testing/monkey/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/monkey/APKBUILD')
-rw-r--r--testing/monkey/APKBUILD61
1 files changed, 61 insertions, 0 deletions
diff --git a/testing/monkey/APKBUILD b/testing/monkey/APKBUILD
new file mode 100644
index 000000000..32082b7cc
--- /dev/null
+++ b/testing/monkey/APKBUILD
@@ -0,0 +1,61 @@
+# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
+
+pkgname=monkey
+pkgver=1.0.1
+pkgrel=0
+pkgdesc='A fast and lightweight HTTP server designed for embedded devices.'
+url='http://monkey-project.com/'
+license='GPL2'
+arch='all'
+makedepends='bash'
+subpackages="$pkgname-doc"
+source="http://monkey-project.com/releases/1.0/$pkgname-$pkgver.tar.gz
+ strsignal.patch
+ monkey.initd
+ monkey.confd"
+
+prepare() {
+ cd "$srcdir"/$pkgname-$pkgver
+
+ # Use POSIX-compliant strsignal instead SYS_SIGLIST
+ patch -Np0 -i "$srcdir"/strsignal.patch || return 1
+
+ # Don't install the banana script, use OpenRC daemon instead
+ sed -i '/install -m 755 bin\/banana/d' configure || return 1
+ rm man/banana.1 || return 1
+
+ # Run monkey as http user
+ sed -i '737s/nobody/http/' configure || return 1
+}
+
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+
+ ./configure \
+ --prefix=/usr \
+ --bindir=/usr/bin \
+ --sysconfdir=/etc/$pkgname \
+ --mandir=/usr/share/man \
+ --datadir=/var/www \
+ --logdir=/var/log/$pkgname \
+ --plugdir=/usr/lib/$pkgname \
+ || return 1
+
+ make || return 1
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ make DESTDIR=$pkgdir install || return 1
+
+ install -D -m0755 "$srcdir"/monkey.initd \
+ "$pkgdir"/etc/init.d/monkey || return 1
+ install -D -m0644 "$srcdir"/monkey.confd \
+ "$pkgdir"/etc/conf.d/monkey || return 1
+}
+
+md5sums="5e08e4089e8b41ea90b0c98d6ca6433e monkey-1.0.1.tar.gz
+4e99ccbfbd00b17023c7b82e466c7aee strsignal.patch
+6630131d3ea75dbbf1033a4acc8cf983 monkey.initd
+71805f446a12d747c52e18b8ac4b4704 monkey.confd"