PKGBUILDs/aur/monkey/PKGBUILD

55 lines
1.8 KiB
Bash

#Maintainer: Christian Stankowic <info at stankowic hypen development dot net>
#Contributor: Gary Wright <wriggary at gmail dot com>
#ALARM: moonman
# -added .service file for systemd
# -changed default port to 80 (required by .service)
# -changed pid file dir from /var/log to /var/run
# -changed default User from nobody to http (for compatibility)
pkgname=monkey
pkgver=1.2.1
pkgrel=2
pkgdesc="A very small and fast open source web server for Linux"
arch=('arm')
url="http://www.monkey-project.com/"
license=('GPL2')
depends=('gcc-libs')
optdepends=('php')
source=("http://www.monkey-project.com/releases/$(echo $pkgver |cut -c 1-3)/$pkgname-$pkgver.tar.gz"
monkey
monkey.service)
install=monkey.install
md5sums=('d6f68d28490e5fba7d8170dcc050b456'
'1527d1fbddddcfd69ad328639dcd0eed'
'ae1f2da03aa2a515a3bed0fb16ab7130')
build() {
cd $srcdir/$pkgname-$pkgver
./configure --prefix=/usr --bindir=/usr/bin --sysconfdir=/etc/$pkgname \
--datadir=/srv/http --logdir=/var/log/$pkgname \
--plugdir=/usr/lib/$pkgname
make
}
package() {
cd $srcdir/$pkgname-$pkgver
# msg2 "Fix typo in Makefile"
# sed -i -e "s/src\/libmonkey.so.1.2/src\/libmonkey.so/" $srcdir/$pkgname-$pkgver/Makefile
make DESTDIR=$pkgdir install
msg2 "Changing default pid file location from /var/log to /var/run"
sed -i -e "s/\/var\/log\/monkey\/monkey.pid/\/var\/run\/monkey.pid/" $pkgdir/etc/monkey/monkey.conf
msg2 "Changing default port to 80"
sed -i -e "s/Port\ 2001/Port\ 80/" $pkgdir/etc/monkey/monkey.conf
msg2 "Changing default user to http"
sed -i -e "s/User\ nobody/User\ http/" $pkgdir/etc/monkey/monkey.conf
install -Dm 755 "$srcdir/monkey" "$pkgdir/etc/rc.d/monkey"
install -Dm 644 "$srcdir/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
}