summaryrefslogtreecommitdiffstats
path: root/testing/monkey/APKBUILD
blob: b3f2d75d27876b2a5c531dc32c32645e5e11a0f1 (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
# Maintainer: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org>

pkgname=monkey
pkgver=1.4.0
pkgrel=0
pkgdesc='Fast and lightweight HTTP server designed for embedded devices'
url='http://monkey-project.com'
license='GPL2'
arch='all'
makedepends='bash findutils'
subpackages="$pkgname-doc $pkgname-dev"
source="$url/releases/${pkgver%.*}/monkey-$pkgver.tar.gz
        monkey.initd
        monkey.confd"

_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
  cd "$_builddir"
  sed -i -e '737s/nobody/http/' -e '/create_banana_script bindir/d' \
    -e '/Creating bin\/banana/d' configure || return 1
  sed -i '1i #define NO_BACKTRACE' src/mk_utils.c || 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 -Dm755 "$srcdir"/monkey.initd "$pkgdir"/etc/init.d/monkey || return 1
  install -Dm0644 "$srcdir"/monkey.confd "$pkgdir"/etc/conf.d/monkey || return 1
}

md5sums="c17e394b985ead873fc7e7cb2a05cef7  monkey-1.4.0.tar.gz
6630131d3ea75dbbf1033a4acc8cf983  monkey.initd
71805f446a12d747c52e18b8ac4b4704  monkey.confd"
sha256sums="b2e3578819abb558ee5e449b8c4aa323b69f52cd8f2c8f061a78e2f0b18675e7  monkey-1.4.0.tar.gz
00a880f8f8190649642a99939180e6b987706712b9b2479b7ec74311a31ca34d  monkey.initd
bfd675e83ea839282fa60ff7b137933b47e4beeed3f22703a79d4201580de508  monkey.confd"
sha512sums="ab52e158a4b4954d4e72dc0687b2a22b5ced75ad5ca93ee5533d81ab1eb24101919e87917fdd89570de537167fafb2e0c448765b24f472715556a41e2c0a8390  monkey-1.4.0.tar.gz
2ec82ae2b76dcc0a792c12b3cee57feedfdb34117975cf5f245e90775e0543ddd8c072ac935de57d6e37753e92a8019e699d636d7f7aaebecb612dbcbf6f5bc0  monkey.initd
8ca7312a80440e908ef8c6297870411f4978c56fe8ad09589d1bb56e9d545d086a53f07120d5cc14c6042a83755730ac6fc4839020a5159eb054eb34d3f264e7  monkey.confd"