blob: 32f2bc752963354cc25d4a899ea26bfcfab0c614 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
pkgname=monkey
pkgver=1.2.0
pkgrel=0
pkgdesc='A fast and lightweight HTTP server designed for embedded devices.'
url='http://monkey-project.com/'
license='GPL2'
arch='all'
makedepends='bash findutils'
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/edsiper/monkey/archive/v$pkgver.tar.gz
strsignal.patch
monkey.initd
monkey.confd"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
cd "$_builddir"
# 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 "$_builddir"
./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 "$_builddir"
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="a0fbe7d2dcac3926cb110de8d9ff9745 monkey-1.2.0.tar.gz
4e99ccbfbd00b17023c7b82e466c7aee strsignal.patch
6630131d3ea75dbbf1033a4acc8cf983 monkey.initd
71805f446a12d747c52e18b8ac4b4704 monkey.confd"
sha256sums="025a5eae862dfad305a9ad9eade5bc96c0b9d308e4abb4e985d3336fb3c64184 monkey-1.2.0.tar.gz
a17e87f9a0babc118d034d852345e7095fa47e8be954548ab1fcae0166a2ca16 strsignal.patch
00a880f8f8190649642a99939180e6b987706712b9b2479b7ec74311a31ca34d monkey.initd
bfd675e83ea839282fa60ff7b137933b47e4beeed3f22703a79d4201580de508 monkey.confd"
sha512sums="f136667c51bef1a25731bf0accd1b56ccfd74da3b6d295f8f61dbd8f1921f727125d3a40770edf205736e8d4751bffae8142ea30028adbd90af93558315ff169 monkey-1.2.0.tar.gz
936f84b64fae4af20b6f90f9be6772fad6a3717bf7c349873cd0d5a4591830bc29e7956a43e0708f24c353e8d2205809b9ae6b0b197fe9dfcb4aeb788866476f strsignal.patch
2ec82ae2b76dcc0a792c12b3cee57feedfdb34117975cf5f245e90775e0543ddd8c072ac935de57d6e37753e92a8019e699d636d7f7aaebecb612dbcbf6f5bc0 monkey.initd
8ca7312a80440e908ef8c6297870411f4978c56fe8ad09589d1bb56e9d545d086a53f07120d5cc14c6042a83755730ac6fc4839020a5159eb054eb34d3f264e7 monkey.confd"
|