diff options
author | Julian Ospald <hasufell@gentoo.org> | 2015-10-28 16:44:35 +0100 |
---|---|---|
committer | Julian Ospald <hasufell@gentoo.org> | 2015-10-28 16:44:58 +0100 |
commit | 6726730f1297aaad5ec7d98cde271c9c5d491a94 (patch) | |
tree | 1ef1f8f9daaaa1508e50d03c286ac8ba558591c0 /www-servers | |
parent | www-servers/hiawatha: add myself as maintainer (diff) | |
download | gentoo-6726730f1297aaad5ec7d98cde271c9c5d491a94.tar.gz gentoo-6726730f1297aaad5ec7d98cde271c9c5d491a94.tar.bz2 gentoo-6726730f1297aaad5ec7d98cde271c9c5d491a94.zip |
www-servers/hiawatha: version bump to 9.15
Fixes: 558532
Diffstat (limited to 'www-servers')
-rw-r--r-- | www-servers/hiawatha/Manifest | 1 | ||||
-rw-r--r-- | www-servers/hiawatha/files/hiawatha.initd-r1 | 26 | ||||
-rw-r--r-- | www-servers/hiawatha/hiawatha-9.15.ebuild | 145 | ||||
-rw-r--r-- | www-servers/hiawatha/metadata.xml | 13 |
4 files changed, 180 insertions, 5 deletions
diff --git a/www-servers/hiawatha/Manifest b/www-servers/hiawatha/Manifest index d351f96f1789..9a62e6afa208 100644 --- a/www-servers/hiawatha/Manifest +++ b/www-servers/hiawatha/Manifest @@ -1,2 +1,3 @@ DIST hiawatha-9.14.tar.gz 891930 SHA256 79c92587cd86a0461d952c99036f5615dacdcaccabe0a9a29359e6044d809bfa SHA512 66ad77c132d34daa5eb597ce67d7b26581c59534e5cf83dd65f78567a9a1798030cd42fef2d612bd1935243db979a2ef1df873f01b0d0a009395ef3da1dca6e6 WHIRLPOOL 8dbeb2c33e9111a27b76f3e5e307872314e85c481a600c39a1e02e7f9e08e1cc0d64f79838dad92a4a5a555cb86334487dd247efb56f0ef9c15a7735da27ddae +DIST hiawatha-9.15.tar.gz 869922 SHA256 e9252133a1114095d1a9a89144b88828ee3b9754f435bd88270f7bf444dd9421 SHA512 e5f0459475863c7cb2d15bdf2a9712f13c96ac450f349fd89e60fd600aad9010f25182aa6353a3014069a9798544a56ef79695918613946b63fecd3806b1982b WHIRLPOOL 80840072765430b05ecaf1ec631d3f1981c6f420edc18b4bcc7957f53f28ed2800170bbcec943c287da2968e6ac769514843fc54aa2a927d7d451057ed76d4d3 DIST hiawatha-9.8.tar.gz 888977 SHA256 6fe9bd408361bc07b47fe6eeaf98d6b644e1cd258b3470da3e70aba510e83b64 SHA512 f55b6065e0dd1dab11ccbbb44e981944aab5b542077fc2b4a03ec8c055be80bedb7b639fe9c52ccf0fc279648b9f4bfc0cbfa018b195b155907810bdfc4ec51a WHIRLPOOL 342c19df23dbe4eef7056f2424d53badede5a8dcf8bb713e7d3892f21e1061ae5e1a0c985f1fc824b10f25eb9fcc9cf0cbf8d384240bf814df4f9dca45dd96f2 diff --git a/www-servers/hiawatha/files/hiawatha.initd-r1 b/www-servers/hiawatha/files/hiawatha.initd-r1 new file mode 100644 index 000000000000..5635ababa0a6 --- /dev/null +++ b/www-servers/hiawatha/files/hiawatha.initd-r1 @@ -0,0 +1,26 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net +} + +start() { + ebegin "Starting ${SVCNAME}" + start-stop-daemon \ + --start \ + --exec "/usr/sbin/hiawatha" \ + --pidfile "@HIAWATHA_PID_DIR@/hiawatha.pid" + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon \ + --stop \ + --exec "/usr/sbin/hiawatha" \ + --pidfile "@HIAWATHA_PID_DIR@/hiawatha.pid" + eend $? +} diff --git a/www-servers/hiawatha/hiawatha-9.15.ebuild b/www-servers/hiawatha/hiawatha-9.15.ebuild new file mode 100644 index 000000000000..31650705f9c4 --- /dev/null +++ b/www-servers/hiawatha/hiawatha-9.15.ebuild @@ -0,0 +1,145 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +CMAKE_MIN_VERSION="2.8.2" + +inherit cmake-utils eutils systemd user + +DESCRIPTION="Advanced and secure webserver" +HOMEPAGE="http://www.hiawatha-webserver.org" +SRC_URI="http://www.hiawatha-webserver.org/files/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+cache ipv6 monitor +rewrite +rproxy +ssl tomahawk +xslt" + +RDEPEND=" + sys-libs/zlib + ssl? ( >=net-libs/mbedtls-2.0[threads] ) + xslt? ( dev-libs/libxslt + dev-libs/libxml2 )" +DEPEND="${RDEPEND}" +PDEPEND="monitor? ( www-apps/hiawatha-monitor )" + +# set these in the environment of your PM if you want to use different values +HIAWATHA_CONFIG_DIR="${HIAWATHA_CONFIG_DIR:-/etc/hiawatha}" +HIAWATHA_LOG_DIR="${HIAWATHA_LOG_DIR:-/var/log/hiawatha}" +HIAWATHA_PID_DIR="${HIAWATHA_PID_DIR:-/var/run}" +HIAWATHA_WEBROOT_DIR="${HIAWATHA_WEBROOT_DIR:-/var/www/hiawatha}" +HIAWATHA_WORK_DIR="${HIAWATHA_WORK_DIR:-/var/lib/hiawatha}" +HIAWATHA_USER="${HIAWATHA_USER:-hiawatha}" +HIAWATHA_GROUP="${HIAWATHA_GROUP:-hiawatha}" + +safe_sed() { + local replace_of=$1 + local replace_with=$2 + local file=$3 + # optional + local outfile=$4 + + grep -E "${replace_of}" "${file}" 1>/dev/null \ + || die "\"${replace_of}\" not found in ${file}!" + + if [[ -n ${outfile} ]] ; then + einfo "Sedding ${file} into ${outfile}" + sed -r \ + -e "s|${replace_of}|${replace_with}|" \ + "${file}" > ${outfile} || die "sed on ${file} to ${outfile} failed!" + else + einfo "Sedding ${file} in-place" + sed -r -i \ + -e "s|${replace_of}|${replace_with}|" \ + "${file}" || die "sed on ${file} failed!" + fi + +} + +pkg_pretend() { + einfo + einfo "You can change hiawatha user and group, as well as the" + einfo "directories the webserver is going to use. For that," + einfo "set the following environment variables in your PM:" + einfo " HIAWATHA_CONFIG_DIR" + einfo " default: /etc/hiawatha" + einfo " current: ${HIAWATHA_CONFIG_DIR}" + einfo " HIAWATHA_LOG_DIR" + einfo " default: /var/log/hiawatha" + einfo " current: ${HIAWATHA_LOG_DIR}" + einfo " HIAWATHA_PID_DIR" + einfo " default: /var/run" + einfo " current: ${HIAWATHA_PID_DIR}" + einfo " HIAWATHA_WEBROOT_DIR" + einfo " default: /var/www/hiawatha" + einfo " current: ${HIAWATHA_WEBROOT_DIR}" + einfo " HIAWATHA_WORK_DIR" + einfo " default: /var/lib/hiawatha" + einfo " current: ${HIAWATHA_WORK_DIR}" + einfo " HIAWATHA_USER" + einfo " default: hiawatha" + einfo " current: ${HIAWATHA_USER}" + einfo " HIAWATHA_GROUP" + einfo " default: hiawatha" + einfo " current: ${HIAWATHA_GROUP}" + einfo +} + +pkg_setup() { + enewgroup ${HIAWATHA_GROUP} + enewuser ${HIAWATHA_USER} -1 -1 "${HIAWATHA_WEBROOT_DIR}" ${HIAWATHA_GROUP} +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-9.5-cflags.patch + + safe_sed "^#ServerId =.*$" "ServerId = ${HIAWATHA_USER}" \ + config/hiawatha.conf.in + + safe_sed "@HIAWATHA_PID_DIR@" "${HIAWATHA_PID_DIR}" \ + "${FILESDIR}/hiawatha.initd-r1" \ + "${T}/hiawatha.initd-r1" +} + +src_configure() { + local mycmakeargs=( + -DCONFIG_DIR:STRING="${HIAWATHA_CONFIG_DIR}" + -DENABLE_CACHE=$(usex cache) + -DENABLE_IPV6=$(usex ipv6) + -DENABLE_LOADCHECK=$(usex kernel_linux) + -DENABLE_MONITOR=$(usex monitor) + -DENABLE_RPROXY=$(usex rproxy) + -DENABLE_TLS=$(usex ssl) + -DENABLE_TOMAHAWK=$(usex tomahawk) + -DENABLE_TOOLKIT=$(usex rewrite) + -DENABLE_XSLT=$(usex xslt) + -DLOG_DIR:STRING="${HIAWATHA_LOG_DIR}" + -DPID_DIR:STRING="${HIAWATHA_PID_DIR}" + -DUSE_SYSTEM_MBEDTLS=$(usex ssl) + -DWEBROOT_DIR:STRING="${HIAWATHA_WEBROOT_DIR}" + -DWORK_DIR:STRING="${HIAWATHA_WORK_DIR}" + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + rm -r "${ED%/}${HIAWATHA_WEBROOT_DIR}"/* || die + + newinitd "${T}"/hiawatha.initd-r1 hiawatha + systemd_dounit "${FILESDIR}"/hiawatha.service + + local i + for i in "${HIAWATHA_LOG_DIR}" "${HIAWATHA_WORK_DIR}" ; do + keepdir "${i}" + fowners ${HIAWATHA_USER}:${HIAWATHA_GROUP} "${i}" + fperms 0750 "${i}" + done + + keepdir "${HIAWATHA_WEBROOT_DIR}" + fowners ${HIAWATHA_USER}:${HIAWATHA_GROUP} "${HIAWATHA_WEBROOT_DIR}" +} diff --git a/www-servers/hiawatha/metadata.xml b/www-servers/hiawatha/metadata.xml index 2cc59f2972fe..653494f4ecc7 100644 --- a/www-servers/hiawatha/metadata.xml +++ b/www-servers/hiawatha/metadata.xml @@ -6,12 +6,15 @@ <name>Julian Ospald</name> </maintainer> <use> - <flag name='cache'>Enable caching of content.</flag> - <flag name='monitor'>Pull in www-apps/hiawatha-monitor.</flag> - <flag name='rewrite'>Enable the rewrite toolkit.</flag> - <flag name='tomahawk'>Enable Tomahawk control server.</flag> + <flag name='cache'>Enable caching of content</flag> + <flag name='monitor'>Pull in www-apps/hiawatha-monitor</flag> + <flag name='rewrite'>Enable the rewrite toolkit</flag> + <flag name='ssl'>Enable TLS support via + <pkg>net-libs/mbedtls</pkg></flag> + <flag name='tomahawk'>Enable Tomahawk control server</flag> <flag name='xslt'>Enable XSLT support. - This is also needed for directory listings.</flag> + This is also needed for directory listings</flag> + <flag name='rproxy'>Enable reverse proxy support</flag> </use> <upstream> <remote-id type='github'>hsleisink/hiawatha</remote-id> |