apache: use make_dirs instead of creating directories at runtime.

This commit is contained in:
maxice8 2019-02-20 13:35:31 -03:00 committed by maxice8
parent f4d8700cfe
commit d77352ea35
2 changed files with 7 additions and 19 deletions

View file

@ -2,22 +2,6 @@
set -e
[ -s conf ] && . ./conf
mkdir -p /run/httpd
chmod 0710 /run/httpd
chown root:_apache /run/httpd
: ${ROOTDIR:=/srv/www/apache}
: ${LOGDIR:=/var/log/httpd}
if [ ! -d $ROOTDIR ]; then
mkdir -p $ROOTDIR
chown _apache:_apache $ROOTDIR
fi
if [ ! -d $LOGDIR ]; then
mkdir -p $LOGDIR
chown _apache:_apache $LOGDIR
fi
install -d -m0710 -o root -g _apache /run/httpd
exec httpd -DNO_DETACH

View file

@ -1,7 +1,7 @@
# Template file for 'apache'
pkgname=apache
version=2.4.38
revision=1
revision=2
wrksrc="httpd-${version}"
build_style=gnu-configure
configure_args="--prefix= --sbindir=/usr/bin --enable-pie --enable-modules=all
@ -28,7 +28,7 @@ conf_files="
/etc/${pkgname}/httpd.conf
/etc/${pkgname}/magic
/etc/${pkgname}/mime.types"
hostmakedepends="pkg-config perl apr-util-devel"
hostmakedepends="pkgconf perl apr-util-devel"
makedepends="zlib-devel libuuid-devel pcre-devel nghttp2-devel
libressl-devel db-devel gdbm-devel expat-devel libldap-devel apr-util-devel"
short_desc="Apache http server"
@ -42,6 +42,10 @@ checksum=7dc65857a994c98370dc4334b260101a7a04be60e6e74a5c57a6dee1bc8f394a
system_accounts="_${pkgname}"
_apache_homedir="/srv/www/$pkgname"
make_dirs="
/srv/www/apache 0755 _apache _apache
/var/log/httpd 0755 _apache _apache"
# Do not redefine struct iovec in include/apr_want.h
CFLAGS="-DAPR_IOVEC_DEFINED=1 -I${XBPS_CROSS_BASE}/usr/include/apr-1"