apache: use make_dirs instead of creating directories at runtime.
This commit is contained in:
parent
f4d8700cfe
commit
d77352ea35
2 changed files with 7 additions and 19 deletions
|
@ -2,22 +2,6 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
[ -s conf ] && . ./conf
|
install -d -m0710 -o root -g _apache /run/httpd
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
exec httpd -DNO_DETACH
|
exec httpd -DNO_DETACH
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'apache'
|
# Template file for 'apache'
|
||||||
pkgname=apache
|
pkgname=apache
|
||||||
version=2.4.38
|
version=2.4.38
|
||||||
revision=1
|
revision=2
|
||||||
wrksrc="httpd-${version}"
|
wrksrc="httpd-${version}"
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--prefix= --sbindir=/usr/bin --enable-pie --enable-modules=all
|
configure_args="--prefix= --sbindir=/usr/bin --enable-pie --enable-modules=all
|
||||||
|
@ -28,7 +28,7 @@ conf_files="
|
||||||
/etc/${pkgname}/httpd.conf
|
/etc/${pkgname}/httpd.conf
|
||||||
/etc/${pkgname}/magic
|
/etc/${pkgname}/magic
|
||||||
/etc/${pkgname}/mime.types"
|
/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
|
makedepends="zlib-devel libuuid-devel pcre-devel nghttp2-devel
|
||||||
libressl-devel db-devel gdbm-devel expat-devel libldap-devel apr-util-devel"
|
libressl-devel db-devel gdbm-devel expat-devel libldap-devel apr-util-devel"
|
||||||
short_desc="Apache http server"
|
short_desc="Apache http server"
|
||||||
|
@ -42,6 +42,10 @@ checksum=7dc65857a994c98370dc4334b260101a7a04be60e6e74a5c57a6dee1bc8f394a
|
||||||
system_accounts="_${pkgname}"
|
system_accounts="_${pkgname}"
|
||||||
_apache_homedir="/srv/www/$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
|
# Do not redefine struct iovec in include/apr_want.h
|
||||||
CFLAGS="-DAPR_IOVEC_DEFINED=1 -I${XBPS_CROSS_BASE}/usr/include/apr-1"
|
CFLAGS="-DAPR_IOVEC_DEFINED=1 -I${XBPS_CROSS_BASE}/usr/include/apr-1"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue