diff --git a/srcpkgs/apache-mpm-event/patches b/srcpkgs/apache-mpm-event/patches new file mode 120000 index 0000000000..32abfc76bc --- /dev/null +++ b/srcpkgs/apache-mpm-event/patches @@ -0,0 +1 @@ +../apache/patches \ No newline at end of file diff --git a/srcpkgs/apache-mpm-event/template b/srcpkgs/apache-mpm-event/template index 66ae5cbe0a..ae5c6b26e1 100644 --- a/srcpkgs/apache-mpm-event/template +++ b/srcpkgs/apache-mpm-event/template @@ -20,7 +20,10 @@ short_desc="Apache HTTP Server - event driven model" # dlopen(3) run-time dependencies. depends="apache>=$version" -systemd_services="apache-mpm-event.service on" + +if [ "$build_option_systemd" ]; then + systemd_services="apache-mpm-event.service on" +fi pre_configure() { cat ${XBPS_SRCPKGDIR}/apache/files/xbps.layout >> config.layout @@ -31,5 +34,7 @@ post_install() { cp -f ${DESTDIR}/usr/sbin/httpd ${wrksrc} rm -rf ${DESTDIR}/* vinstall httpd 755 usr/sbin httpd.event - vinstall ${FILESDIR}/${pkgname}.service 644 usr/lib/systemd/system + if [ "$build_option_systemd" ]; then + vinstall ${FILESDIR}/${pkgname}.service 644 usr/lib/systemd/system + fi } diff --git a/srcpkgs/apache-mpm-worker/patches b/srcpkgs/apache-mpm-worker/patches new file mode 120000 index 0000000000..32abfc76bc --- /dev/null +++ b/srcpkgs/apache-mpm-worker/patches @@ -0,0 +1 @@ +../apache/patches \ No newline at end of file diff --git a/srcpkgs/apache-mpm-worker/template b/srcpkgs/apache-mpm-worker/template index 03eea59606..e99f701c18 100644 --- a/srcpkgs/apache-mpm-worker/template +++ b/srcpkgs/apache-mpm-worker/template @@ -20,7 +20,9 @@ short_desc="Apache HTTP Server - high speed threaded mode" # dlopen(3) run-time dependencies. depends="apache>=$version" -systemd_services="apache-mpm-worker.service on" +if [ "$build_option_systemd" ]; then + systemd_services="apache-mpm-worker.service on" +fi pre_configure() { cat ${XBPS_SRCPKGDIR}/apache/files/xbps.layout >> config.layout @@ -31,5 +33,7 @@ post_install() { cp -f ${DESTDIR}/usr/sbin/httpd ${wrksrc} rm -rf ${DESTDIR}/* vinstall httpd 755 usr/sbin httpd.worker - vinstall ${FILESDIR}/${pkgname}.service 644 usr/lib/systemd/system + if [ "$build_option_systemd" ]; then + vinstall ${FILESDIR}/${pkgname}.service 644 usr/lib/systemd/system + fi } diff --git a/srcpkgs/apache/template b/srcpkgs/apache/template index 7cd1ad583e..be1030aff6 100644 --- a/srcpkgs/apache/template +++ b/srcpkgs/apache/template @@ -1,7 +1,7 @@ # Template file for 'apache' pkgname=apache version=2.4.10 -revision=1 +revision=2 wrksrc=httpd-${version} build_style=gnu-configure configure_args="--prefix= --enable-pie --enable-modules=all @@ -37,10 +37,6 @@ conf_files=" /etc/httpd/httpd.conf /etc/httpd/magic /etc/httpd/mime.types" -systemd_services="apache.service on" -system_accounts="httpd" -httpd_descr="Apache HTTP server" -httpd_homedir="/srv/httpd" short_desc="The Number One HTTP Server On The Internet" maintainer="Juan RP " homepage="http://httpd.apache.org/" @@ -48,6 +44,20 @@ license="Apache-2.0" distfiles="http://www.apache.org/dist/httpd/httpd-${version}.tar.bz2" checksum=176c4dac1a745f07b7b91e7f4fd48f9c48049fa6f088efe758d61d9738669c6a +system_accounts="httpd" +httpd_descr="Apache HTTP server" +httpd_homedir="/srv/httpd" + +make_dirs=" + /var/log/httpd 0755 root httpd + /srv/httpd 0755 root httpd + /srv/httpd/cgi-bin 755 root httpd" + +build_options="systemd" +if [ "$build_option_systemd" ]; then + systemd_services="apache.service on" +fi + pre_configure() { # set default user sed -e 's#User daemon#User httpd#' \ @@ -84,8 +94,11 @@ post_install() { # systemd and logrotate files. vinstall ${FILESDIR}/apache.logrotate 644 etc/logrotate.d apache - vinstall ${FILESDIR}/apache.service 644 usr/lib/systemd/system - vinstall ${FILESDIR}/apache.tmpfiles 644 usr/lib/tmpfiles.d apache.conf + + if [ "$build_option_systemd" ]; then + vinstall ${FILESDIR}/apache.service 644 usr/lib/systemd/system + vinstall ${FILESDIR}/apache.tmpfiles 644 usr/lib/tmpfiles.d apache.conf + fi rm -rf ${DESTDIR}/etc/httpd/original }