From a082036f606ec973a1a47c12cd0d172529df3b83 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Fri, 7 Mar 2014 13:04:14 +0100 Subject: [PATCH] New package: lighttpd-1.4.34 --- srcpkgs/lighttpd/files/lighttpd.conf | 12 ++++++ srcpkgs/lighttpd/files/lighttpd.service | 12 ++++++ srcpkgs/lighttpd/patches/06-fix_lua.patch | 38 ++++++++++++++++++ srcpkgs/lighttpd/template | 49 +++++++++++++++++++++++ 4 files changed, 111 insertions(+) create mode 100644 srcpkgs/lighttpd/files/lighttpd.conf create mode 100644 srcpkgs/lighttpd/files/lighttpd.service create mode 100644 srcpkgs/lighttpd/patches/06-fix_lua.patch create mode 100644 srcpkgs/lighttpd/template diff --git a/srcpkgs/lighttpd/files/lighttpd.conf b/srcpkgs/lighttpd/files/lighttpd.conf new file mode 100644 index 0000000000..283be38942 --- /dev/null +++ b/srcpkgs/lighttpd/files/lighttpd.conf @@ -0,0 +1,12 @@ +# This is a minimal example config +# See /usr/share/doc/lighttpd +# and http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions + +server.port = 80 +server.username = "lighttpd" +server.groupname = "lighttpd" +server.document-root = "/srv/www" +server.errorlog = "/var/log/lighttpd/error.log" +dir-listing.activate = "enable" +index-file.names = ( "index.html" ) +mimetype.assign = ( ".html" => "text/html", ".txt" => "text/plain", ".jpg" => "image/jpeg", ".png" => "image/png" ) diff --git a/srcpkgs/lighttpd/files/lighttpd.service b/srcpkgs/lighttpd/files/lighttpd.service new file mode 100644 index 0000000000..b80db7695b --- /dev/null +++ b/srcpkgs/lighttpd/files/lighttpd.service @@ -0,0 +1,12 @@ +[Unit] +Description=A secure, fast, compliant and very flexible web-server +After=syslog.target network.target + +[Service] +PrivateTmp=true +ExecStart=/usr/sbin/lighttpd-angel -D -f /etc/lighttpd/lighttpd.conf +ExecReload=/bin/kill -HUP $MAINPID +KillSignal=SIGINT + +[Install] +WantedBy=multi-user.target diff --git a/srcpkgs/lighttpd/patches/06-fix_lua.patch b/srcpkgs/lighttpd/patches/06-fix_lua.patch new file mode 100644 index 0000000000..0a376a9cdb --- /dev/null +++ b/srcpkgs/lighttpd/patches/06-fix_lua.patch @@ -0,0 +1,38 @@ +--- src/mod_cml_lua.c.orig 2012-10-22 06:17:17.418886286 -0700 ++++ src/mod_cml_lua.c 2012-10-22 06:25:50.289753316 -0700 +@@ -28,6 +28,10 @@ + #include + #include + ++#if LUA_VERSION_NUM >= 502 ++#define LUA_GLOBALSINDEX LUA_REGISTRYINDEX ++#endif ++ + typedef struct { + stream st; + int done; +@@ -285,7 +285,11 @@ + lua_settable(L, LUA_GLOBALSINDEX); + + /* load lua program */ ++#if LUA_VERSION_NUM >= 502 ++ if (lua_load(L, load_file, &rm, fn->ptr, NULL) || lua_pcall(L,0,1,0)) { ++#else + if (lua_load(L, load_file, &rm, fn->ptr) || lua_pcall(L,0,1,0)) { ++#endif + log_error_write(srv, __FILE__, __LINE__, "s", + lua_tostring(L,-1)); + +--- src/mod_magnet.c 2011-06-13 04:17:01.000000000 -0700 ++++ src/mod_magnet.c2 2013-10-01 06:39:18.771549986 -0700 +@@ -24,6 +24,10 @@ + #define MAGNET_CONFIG_PHYSICAL_PATH "magnet.attract-physical-path-to" + #define MAGNET_RESTART_REQUEST 99 + ++#if LUA_VERSION_NUM >= 502 ++#define LUA_GLOBALSINDEX LUA_REGISTRYINDEX ++#endif ++ + /* plugin config for all request/connections */ + + static jmp_buf exceptionjmp; diff --git a/srcpkgs/lighttpd/template b/srcpkgs/lighttpd/template new file mode 100644 index 0000000000..745902eed3 --- /dev/null +++ b/srcpkgs/lighttpd/template @@ -0,0 +1,49 @@ +# Template file for 'lighttpd' +pkgname=lighttpd +version=1.4.34 +revision=1 +makedepends="libmysqlclient-devel lua-devel libxml2-devel sqlite-devel gdbm-devel pcre-devel openssl-devel fcgi-devel" +hostmakedepends="pkg-config pcre-devel libtool which" +conf_files="/etc/lighttpd/lighttpd.conf" +system_accounts="lighttpd" +lighttpd_homedir="/var/tmp/lighttpd" +systemd_services="lighttpd.service on" +make_dirs=" + /srv/www 0755 root root + /var/log/lighttpd 0750 lighttpd lighttpd" +short_desc="A secure, fast, compliant and very flexible web-server." +maintainer="Enno Boland " +license="Simplified BSD" +homepage="http://lighttpd.net" +distfiles="http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${version}.tar.bz2" +checksum=e4b5682ef21b0bdea4a18dc7ccac6b5a0bf526b691ad0fe5c25c8b9fc38d0c12 +build_style=gnu-configure +configure_args=" + --with-gnu-ld \ + --libexecdir=/usr/lib/lighttpd/modules \ + --sysconfdir=/etc/lighttpd \ + --with-mysql=${XBPS_CROSS_BASE}/usr/bin/mysql_config \ + --with-ldap \ + --with-attr \ + --with-zlib \ + --with-bzip2 \ + --with-openssl \ + --with-pcre \ + --with-kerberos5 \ + --without-fam \ + --with-memcache \ + --with-webdav-props \ + --with-webdav-locks \ + --with-gdbm \ + --with-memcache \ + --with-lua" +disable_parallel_build=yes + +pre_configure() { + libtoolize -f +} +post_install() { + vinstall ${FILESDIR}/lighttpd.conf 644 etc/lighttpd + # Install systemd services + vinstall ${FILESDIR}/lighttpd.service 644 usr/lib/systemd/system +}