diff --git a/srcpkgs/apache-mpm-worker/files/apache-mpm-worker.service b/srcpkgs/apache-mpm-worker/files/apache-mpm-worker.service new file mode 100644 index 00000000000..08ecbdf1107 --- /dev/null +++ b/srcpkgs/apache-mpm-worker/files/apache-mpm-worker.service @@ -0,0 +1,16 @@ +[Unit] +Description=The Apache HTTP Server (Worker MPM) +After=syslog.target network.target remote-fs.target +Conflicts=apache.target apache-mpm-event.target + +[Service] +Type=forking +PIDFile=/var/run/httpd/httpd.pid +ExecStart=/usr/sbin/httpd.worker -k start +ExecReload=/usr/sbin/httpd.worker -t +ExecReload=/bin/kill -HUP $MAINPID +ExecStop=/usr/sbin/httpd.worker -k stop +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff --git a/srcpkgs/apache-mpm-worker/template b/srcpkgs/apache-mpm-worker/template index f9ad75f1c09..0edb6c4f6db 100644 --- a/srcpkgs/apache-mpm-worker/template +++ b/srcpkgs/apache-mpm-worker/template @@ -9,9 +9,8 @@ unset post_install pre_configure run_depends # Override some vars. pkgname=apache-mpm-worker -configure_args="${configure_args} --enable-modules= ---prefix=/usr --with-mpm=worker" -revision=1 +configure_args="${configure_args} --enable-modules= --prefix=/usr --with-mpm=worker" +revision=2 short_desc="Apache HTTP Server - high speed threaded mode" long_desc=" Each Apache Multi-Processing Module provides a different flavor of web @@ -21,22 +20,24 @@ long_desc=" recommended especially for high-traffic sites because it is faster and has a smaller memory footprint than the traditional prefork MPM." +systemd_services="${pkgname}.service on" + +# dlopen(3) run-time dependencies. Add_dependency run libuuid Add_dependency run expat Add_dependency run libdb Add_dependency run gdbm -Add_dependency full apache ">=${version}" -pre_configure() -{ - cat ${XBPS_SRCPKGDIR}/apache/files/xbps.layout \ - >> ${wrksrc}/config.layout +Add_dependency run apache ">=${version}" + +pre_configure() { + cat ${XBPS_SRCPKGDIR}/apache/files/xbps.layout >> config.layout } -post_install() -{ +post_install() { # We are only interested in the httpd binary. cp -f ${DESTDIR}/usr/sbin/httpd ${wrksrc} rm -rf ${DESTDIR}/* - install -D -m755 ${wrksrc}/httpd ${DESTDIR}/usr/sbin/httpd.worker + vinstall httpd 755 usr/sbin httpd.worker + vinstall ${FILESDIR}/${pkgname}.service 644 lib/systemd/system }