From ca247340d4889e9fd391f6c19d39d0a6147ffe82 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Thu, 6 Oct 2016 20:41:42 +0200 Subject: [PATCH] www-servers/hiawatha: bump to 10.4 --- ...flags.patch => hiawatha-10.4-cflags.patch} | 0 .../hiawatha/files/systemd/hiawatha.service | 9 --------- ...10.3.exheres-0 => hiawatha-10.4.exheres-0} | 20 ++++++++++++++++++- 3 files changed, 19 insertions(+), 10 deletions(-) rename packages/www-servers/hiawatha/files/{hiawatha-10.3-cflags.patch => hiawatha-10.4-cflags.patch} (100%) delete mode 100644 packages/www-servers/hiawatha/files/systemd/hiawatha.service rename packages/www-servers/hiawatha/{hiawatha-10.3.exheres-0 => hiawatha-10.4.exheres-0} (85%) diff --git a/packages/www-servers/hiawatha/files/hiawatha-10.3-cflags.patch b/packages/www-servers/hiawatha/files/hiawatha-10.4-cflags.patch similarity index 100% rename from packages/www-servers/hiawatha/files/hiawatha-10.3-cflags.patch rename to packages/www-servers/hiawatha/files/hiawatha-10.4-cflags.patch diff --git a/packages/www-servers/hiawatha/files/systemd/hiawatha.service b/packages/www-servers/hiawatha/files/systemd/hiawatha.service deleted file mode 100644 index 35e740b..0000000 --- a/packages/www-servers/hiawatha/files/systemd/hiawatha.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Hiawatha webserver -After=network.target - -[Service] -ExecStart=/usr/sbin/hiawatha -d - -[Install] -WantedBy=multi-user.target diff --git a/packages/www-servers/hiawatha/hiawatha-10.3.exheres-0 b/packages/www-servers/hiawatha/hiawatha-10.4.exheres-0 similarity index 85% rename from packages/www-servers/hiawatha/hiawatha-10.3.exheres-0 rename to packages/www-servers/hiawatha/hiawatha-10.4.exheres-0 index a5b6ff5..e7e5695 100644 --- a/packages/www-servers/hiawatha/hiawatha-10.3.exheres-0 +++ b/packages/www-servers/hiawatha/hiawatha-10.4.exheres-0 @@ -1,7 +1,8 @@ # Copyright 2016 Julian Ospald # Distributed under the terms of the GNU General Public License v2 -require cmake [ api=2 ] openrc-service [ openrc_initd_files=[ "${TEMP}/hiawatha" ] ] systemd-service +require cmake [ api=2 ] openrc-service [ openrc_initd_files=[ "${TEMP}/hiawatha" ] ] +require systemd-service [ systemd_files=[ "${CMAKE_SOURCE}/extra/debian/hiawatha.service" ] ] SUMMARY="Advanced and secure webserver" HOMEPAGE="http://www.hiawatha-webserver.org" @@ -18,6 +19,7 @@ MYOPTIONS=" rproxy [[ description = [ Enable reverse proxy support ] ]] ssl [[ description = [ Enable TLS support via mbedtls ] ]] tomahawk [[ description = [ Enable Tomahawk control server ] ]] + v2 [[ description = [ HTTP v2 support ] ]] xslt [[ description = [ Enable XSLT support. This is also needed for directory listings ] ]] " @@ -68,7 +70,23 @@ CMAKE_SRC_CONFIGURE_TESTS=( 'ssl USE_SYSTEM_MBEDTLS' ) +hiawatha_option() { + local hoption=$2 + + if optionq "${1}" ; then + edo sed -i \ + -e "/#define ${hoption}/s|/\* \(.*\) \*/|\1|" \ + "${CMAKE_SOURCE}"/config.h.in + else + edo sed -i \ + -e "/#define ${hoption}/d" \ + "${CMAKE_SOURCE}"/config.h.in + fi +} + src_prepare() { + hiawatha_option v2 ENABLE_HTTP2 + cmake_src_prepare edo grep -E "^#ServerId =.*$" "config/hiawatha.conf.in" 1>/dev/null