mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 07:33:48 +02:00
monkey: switch webroot to /srv/www/monkey; user to _monkey; create dirs in service.
This commit is contained in:
parent
d5fcf6071a
commit
78548dba2a
2 changed files with 21 additions and 13 deletions
|
@ -1,3 +1,16 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
[ -s conf ] && . ./conf
|
||||||
|
|
||||||
exec chpst -uhttpd monkey
|
: ${ROOTDIR:=/srv/www/monkey}
|
||||||
|
: ${LOGDIR:=/var/log/monkey}
|
||||||
|
|
||||||
|
if [ ! -d $ROOTDIR ]; then
|
||||||
|
mkdir -p $ROOTDIR
|
||||||
|
chown _monkey:_monkey $ROOTDIR
|
||||||
|
fi
|
||||||
|
if [ ! -d $LOGDIR ]; then
|
||||||
|
mkdir -p $LOGDIR/htdocs
|
||||||
|
chown _monkey:_monkey -R $LOGDIR
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec chpst -u monkey:monkey monkey
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
# Template file for 'monkey'
|
# Template file for 'monkey'
|
||||||
pkgname=monkey
|
pkgname=monkey
|
||||||
version=1.6.8
|
version=1.6.8
|
||||||
revision=1
|
revision=2
|
||||||
build_style=configure
|
build_style=configure
|
||||||
hostmakedepends="cmake"
|
hostmakedepends="cmake"
|
||||||
makedepends="mbedtls-devel"
|
makedepends="mbedtls-devel"
|
||||||
configure_args+="--prefix=/usr --sbindir=/usr/bin --libdir=/usr/lib "
|
configure_args+="--prefix=/usr --sbindir=/usr/bin --libdir=/usr/lib "
|
||||||
configure_args+="--sysconfdir=/etc/monkey/ --enable-plugins=mbedtls "
|
configure_args+="--sysconfdir=/etc/monkey/ --enable-plugins=mbedtls "
|
||||||
configure_args+="--webroot=/srv/httpd --mandir=/usr/share/man "
|
configure_args+="--webroot=/srv/www/$pkgname --mandir=/usr/share/man "
|
||||||
configure_args+="--pidfile=/var/run/monkey.pid --logdir=/var/log/monkey "
|
configure_args+="--pidfile=/var/run/monkey.pid --logdir=/var/log/monkey "
|
||||||
configure_args+="--malloc-libc --default-user=httpd "
|
configure_args+="--malloc-libc --default-user=_$pkgname "
|
||||||
short_desc="Cross-arch embeddable lightweight HTTP server"
|
short_desc="Cross-arch embeddable lightweight HTTP server"
|
||||||
maintainer="necrophcodr <necrophcodr@necrophcodr.me>"
|
maintainer="necrophcodr <necrophcodr@necrophcodr.me>"
|
||||||
license="Apache-2.0"
|
license="Apache-2.0"
|
||||||
|
@ -17,10 +17,6 @@ homepage="http://monkey-project.com"
|
||||||
distfiles="${homepage}/releases/${version%.*}/${pkgname}-${version}.tar.gz"
|
distfiles="${homepage}/releases/${version%.*}/${pkgname}-${version}.tar.gz"
|
||||||
checksum=936aa276d11dea77cda2703eb5d1b89ede1cf8d44440e1ec029cafb10effb3cf
|
checksum=936aa276d11dea77cda2703eb5d1b89ede1cf8d44440e1ec029cafb10effb3cf
|
||||||
|
|
||||||
make_dirs="
|
|
||||||
/var/log/monkey 0755 root httpd
|
|
||||||
/srv/httpd/htdocs 0755 root httpd"
|
|
||||||
|
|
||||||
conf_files="
|
conf_files="
|
||||||
/etc/monkey/plugins/*/*.conf
|
/etc/monkey/plugins/*/*.conf
|
||||||
/etc/monkey/plugins/dirlisting/themes/*/*.theme
|
/etc/monkey/plugins/dirlisting/themes/*/*.theme
|
||||||
|
@ -29,17 +25,16 @@ conf_files="
|
||||||
/etc/monkey/plugins.load
|
/etc/monkey/plugins.load
|
||||||
/etc/monkey/monkey.mime"
|
/etc/monkey/monkey.mime"
|
||||||
|
|
||||||
system_accounts="httpd"
|
system_accounts="_$pkgname"
|
||||||
httpd_descr="Monkey HTTP server"
|
_monkey_homedir="/srv/www/$pkgname"
|
||||||
httpd_homedir="/srv/httpd"
|
|
||||||
|
|
||||||
case $XBPS_TARGET_MACHINE in
|
case $XBPS_TARGET_MACHINE in
|
||||||
*-musl) configure_args+="--musl-mode --no-backtrace ";;
|
*-musl) configure_args+="--musl-mode --no-backtrace ";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
vmkdir usr/share/monkey/htdocs
|
vmkdir usr/share/monkey/webroot
|
||||||
mv ${DESTDIR}/srv/httpd/* ${DESTDIR}/usr/share/monkey/htdocs
|
mv ${DESTDIR}/srv/www/$pkgname/* ${DESTDIR}/usr/share/monkey/webroot
|
||||||
vsv monkey
|
vsv monkey
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue