[Lunar-commits] <moonbase> lighttpd: Adding systemd abilities, a CONFIGURE and adjusting the BUILD and DEPENDS.

Dennis `stumbles` Veatch stumbles at lunar-linux.org
Sat Dec 31 10:06:10 CET 2011


commit 6bea23ddb1f69ee3ff655da19d42e22861525ca9
Author: Dennis `stumbles` Veatch <stumbles at lunar-linux.org>
Date:   Sat Dec 31 04:06:10 2011 -0500

    lighttpd: Adding systemd abilities, a CONFIGURE and adjusting the BUILD and DEPENDS.
---
 web/lighttpd/BUILD                      |   44 +++++++++++++++++--------------
 web/lighttpd/CONFIGURE                  |    3 ++
 web/lighttpd/DEPENDS                    |   23 ++++++++++------
 web/lighttpd/systemd.d/lighttpd.service |   11 +++++++
 4 files changed, 52 insertions(+), 29 deletions(-)

diff --git a/web/lighttpd/BUILD b/web/lighttpd/BUILD
index ab60f58..1c98419 100644
--- a/web/lighttpd/BUILD
+++ b/web/lighttpd/BUILD
@@ -1,25 +1,29 @@
 (
 
-  add_priv_user www:www -s /bin/false -c "www"  &&
-
-  ./configure  --prefix=/usr               \
-               --libdir=/usr/lib/lighttpd  \
-               $OPTS                      &&
-  default_make                            &&
-
-  if [ ! -f /etc/lighttpd/lighttpd.conf ];  then
-    sedit 's:/www/pages/:/var/www/:g' doc/lighttpd.conf               &&
-    sedit 's:/www/logs/:/var/log/httpd/:g' doc/lighttpd.conf          &&
-    sedit 's:"wwwrun":"www":g' doc/lighttpd.conf                      &&
-    sedit 's:#server.username:server.username:g' doc/lighttpd.conf    &&
-    sedit 's:#server.groupname:server.groupname:g' doc/lighttpd.conf  &&
-    sedit 's:#server.pid-file:server.pid-file:g' doc/lighttpd.conf    &&
-    mkdir -p /etc/lighttpd                                            &&
-    install -m 644 doc/lighttpd.conf /etc/lighttpd
-  fi
+  OPTS+=" --libdir=/usr/lib/lighttpd --prefix=/usr" &&
+
+  add_priv_user lighttpd:lighttpd -s /bin/false -c "lighttpd"  &&
+
+  chown lighttpd:lighttpd /srv/www /var/log/lighttpd  &&
+
+  default_build &&
 
-  mkdir -p /var/www
-  mkdir -p /var/log/httpd
-  chown www:www /var/www /var/log/httpd
+  devoke_installwatch &&
+  mkdir -p /var/log/lighttpd    &&
+  mkdir -p /srv/www/htdocs      &&
+  mkdir -p /var/lib/lighttpd    &&
+  mkdir -p /etc/lighttpd/conf.d &&
+
+  if [ ! -f /etc/lighttpd/lighttpd.conf ] ; then
+      install doc/config/lighttpd.conf /etc/lighttpd/
+  fi &&
+
+  if [ ! -f /etc/lighttpd/modules.conf ] ; then
+      install doc/config/modules.conf /etc/lighttpd/             
+  fi &&
+
+  if [[ -z "$(ls -A /etc/lighttpd/conf.d/)" ]] ; then
+      install doc/config/conf.d/*.conf /etc/lighttpd/conf.d
+  fi
 
 ) > $C_FIFO 2>&1
diff --git a/web/lighttpd/CONFIGURE b/web/lighttpd/CONFIGURE
new file mode 100644
index 0000000..2d8af4b
--- /dev/null
+++ b/web/lighttpd/CONFIGURE
@@ -0,0 +1,3 @@
+mquery DAV_PROPS "Enalbe properties in mod_webdav?" y " --with-webdav-props" "--without-webdav-props"
+mquery DAV_LOCKS "Enable locks in mod_webdav?" y "--with-webdav-locks" "--without-webdav-locks"
+
diff --git a/web/lighttpd/DEPENDS b/web/lighttpd/DEPENDS
index 8796a1d..4450f3b 100644
--- a/web/lighttpd/DEPENDS
+++ b/web/lighttpd/DEPENDS
@@ -1,9 +1,14 @@
-optional_depends mysql    "--with-mysql"    "--without-mysql"    "MySQL support"
-optional_depends openldap "--with-ldap"     "--without-ldap"     "LDAP support"
-optional_depends attr     "--with-attr"     "--without-attr"     "EA for XFS support"
-optional_depends valgrind "--with-valgrind" "--without-valgrind" "valgrind debugger"
-optional_depends openssl  "--with-openssl"  "--without-openssl"  "OpenSSL support"
-optional_depends pcre     "--with-pcre"     "--without-pcre"     "regular expression support"
-optional_depends bzip2    "--with-bzip2"    "--without-bzip2"    "bzip2 mod_compress"
-optional_depends gamin    "--with-fam"      "--without-fam"      "FAM/Gamin filesystem monitoring"
-optional_depends lua      "--with-lua"      "--without-lua"      "Lua engine for mod_cml"
+optional_depends mysql     "--with-mysql"    "--without-mysql"    "MySQL support"
+optional_depends openldap  "--with-ldap"     "--without-ldap"     "LDAP support"
+optional_depends attr      "--with-attr"     "--without-attr"     "EA for XFS support"
+optional_depends valgrind  "--with-valgrind" "--without-valgrind" "valgrind debugger"
+optional_depends openssl   "--with-openssl"  "--without-openssl"  "OpenSSL support"
+optional_depends pcre      "--with-pcre"     "--without-pcre"     "regular expression support"
+optional_depends bzip2     "--with-bzip2"    "--without-bzip2"    "bzip2 mod_compress"
+optional_depends gamin     "--with-fam"      "--without-fam"      "FAM/Gamin filesystem monitoring"
+optional_depends lua       "--with-lua"      "--without-lua"      "Lua engine for mod_cml"
+optional_depends zlib      "--with-zlib"     "--without-zlib"     "for compression support"
+optional_depends gdbm      "--with-gdbm"     "--without-gdbm"     "storage for mod_trigger_b4_dl support"
+optional_depends memcached "--with-memcache" "--without-memcache" "for for mod_trigger_b4_dl support"
+optional_depends fcgi      ""                ""                   "for CGI support"
+optional_depends systemd   ""                ""                   "for systemd style boot scripts"
diff --git a/web/lighttpd/systemd.d/lighttpd.service b/web/lighttpd/systemd.d/lighttpd.service
new file mode 100644
index 0000000..cd5ec35
--- /dev/null
+++ b/web/lighttpd/systemd.d/lighttpd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Lighttpd Daemon
+After=network.target
+
+[Service]
+ExecStartPre=/usr/sbin/lighttpd -t -f /etc/lighttpd/lighttpd.conf
+ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target


More information about the Lunar-commits mailing list