diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /www-servers/cherokee |
reinit the tree, so we can have metadata
Diffstat (limited to 'www-servers/cherokee')
-rw-r--r-- | www-servers/cherokee/Manifest | 10 | ||||
-rw-r--r-- | www-servers/cherokee/cherokee-1.2.104.ebuild | 197 | ||||
-rw-r--r-- | www-servers/cherokee/files/cherokee-1.2.99-gentoo.patch | 38 | ||||
-rw-r--r-- | www-servers/cherokee/files/cherokee-confd-1.2.98 | 4 | ||||
-rw-r--r-- | www-servers/cherokee/files/cherokee-initd-1.2.99 | 67 | ||||
-rw-r--r-- | www-servers/cherokee/files/cherokee.logrotate-r1 | 10 | ||||
-rw-r--r-- | www-servers/cherokee/files/cherokee.service | 10 | ||||
-rw-r--r-- | www-servers/cherokee/metadata.xml | 15 |
8 files changed, 351 insertions, 0 deletions
diff --git a/www-servers/cherokee/Manifest b/www-servers/cherokee/Manifest new file mode 100644 index 000000000000..6ec75753d05e --- /dev/null +++ b/www-servers/cherokee/Manifest @@ -0,0 +1,10 @@ +AUX cherokee-1.2.99-gentoo.patch 1763 SHA256 66b3e85370082feb20205ed484a858a79656e0adb793fea5be796632fc327201 SHA512 2f2b1aa03cd7656ceb90f9a94d24704b4a411b3ab99e084444d1f60ce0270bad650b597b1edbdcb4fb0dda750215f42c3f5de3e9f6253825f3742dfbe871be4b WHIRLPOOL e8d03dc5c15e22cc94bae1f6082ee0aabb4990239bb6db9da3dda78565379720af5e61f2f60715505538a9c974e24fb84a2738d8ed593777d4621fcfdc2bfe62 +AUX cherokee-confd-1.2.98 144 SHA256 48331d56dfa6743444e0b01ce4df2013b27dd30804c88365257d560cc6adcab0 SHA512 e010ec9e6d6bd6862c486c494e968cf93ff5f7eeaa523f1bc1fb9db72dc878c17fbc04443e74aef0bbfef1e2ba64ba00a7dc8bbd1b58f6759d2e000c76e88f84 WHIRLPOOL 4ee6e81e60a934c190201b920488dbfb2f073b387da46068c616891c16b6ef05c9932487374b3ca051d3b1a1b8809d7245f289c8128547b6297ce1a32ce48800 +AUX cherokee-initd-1.2.99 1186 SHA256 41fd5dc54d03f70294d2226fbac0a1af965d9672eb0b94ac972566b8cd1bd8b4 SHA512 595e37b6cf70d4fbd466be918db6c17c37766f5e39a9ee4384a21025f1ce04367aeca495217b1e2c74ed2bce9ff8cfd9a58523b59d1181ce9f470eca97445641 WHIRLPOOL b651d87384c9f55986f4980335efa90a4229fe881b9f609e38c11e7469c79d1a7551178d96f977c2638fd47a3260985f69f361bce1648809df1205c0e3cb6977 +AUX cherokee.logrotate-r1 255 SHA256 7ad14c9886992b5133354d56d25340d452583eb01bc6ff6a5741cd5c40df341a SHA512 73be4a46f217302b3e7969f0a5acf7f83357a831331f85c89c17320c594eb9e6fd87da111b7d8eb06840e0b1bb094106a5bb6f7dbf7923e834164a367f85d5ad WHIRLPOOL 34cb4553dd237a22a2dd547ebc120084e6d4ed306f2c4a9d1f9b72388c56c275c64d2101525173f92e9b8f86ebe90aad58086214d2c955969762e5829617ea83 +AUX cherokee.service 184 SHA256 a5ba46821799eaeea39c35f46ae51d58a8394f5e729889729f814562561d1edb SHA512 e05cfe0805bcd7f133fc0bf485fbf781b9cc5e6f9e222b8ea89bdc4e9d4531caa6049100670b67d12bdb73c1e93ed5d949cc1828241213cfcd60a39b7424d8ec WHIRLPOOL 1c095ac36f9f17917557b4157318c051cc031829ce13fd4dfabdb46f945af823ca5b92a7a35577de8734f219b4d08963fdddaa0680eed840821fbd430800120a +DIST cherokee-1.2.104.zip 6200164 SHA256 1acc80de22ed0aa4a0d95aa643ac92a2cce435480258081213214bec05da4098 SHA512 9c9f44643d0d2636f2e3e61ef8e2918d91d9bb6099be761826c8ffad01d339739ed40984d01151044c2e536d4754b5157d6d20c37627ce49eecdb404a716cd9d WHIRLPOOL b0c13205014daee461538d0b7968bf255fd6633dbf3defeb2505ce463772c6f56b06ef91ff6b055bd589a15d19974d794fcbe039c1552b04a6bd1228a690f417 +EBUILD cherokee-1.2.104.ebuild 4947 SHA256 bcafa7b28b35d79b10b258250c5ebbc2462224ac9da25ddfe9433aa5a13646de SHA512 715f2e8bdbc7a98cedd60bd685195b02b7e3026f247d6f18f67ba14ed0ffa43bfcc8e97d6ab20fe7c0d64a4808cd62b623ee51d9ae567dd711a87d8385dd8a9c WHIRLPOOL 5170ae1ebdb8f8ec8f441015ba3445c109ab91c94b26250010f5552e8b01a241dd14fd88969793dc5a40c904742dabfebe458545f90456c4c68eb10b4b5623fd +MISC ChangeLog 3068 SHA256 27bc3ec527dfb4e03204f9f1ca2b1086dc4236d9d43a6ab25de12d7b05577f9d SHA512 13a0b67d31980f1903ab02a70ba9cfb0bd4f68088ed9550352774e87612632fab3394dd774b8cf0e6ad113f7af577ef3c4f6b2677553950e377410466b379ec6 WHIRLPOOL 517837a195028ab6af05fd412f218fd7b7c3b5e2376c86e77305fcc8551daf74bf83f9f93571c6345f011762000ff02c25ba3dc7855965f3c08261cdf46a0414 +MISC ChangeLog-2015 24470 SHA256 1d0e85adc44395807d12a5df8b7e1e9a1cab94f5ced95b4da58cb00e4715bd60 SHA512 32cb25f65763164d989aba7ba7681882c0e48e791e43b7d44b8a51311c27eb029013283ec189b850fa7f288dfabbaf4f6348402b806c82c5fe95fbc02459314e WHIRLPOOL 9aa61f26750f165cc122787e95beb215381f3eae40fe2391ddba16838f5be6079db2c24dc57ea310091c75408c01d4674b7d205478f63e55a6fac7e6c25b7363 +MISC metadata.xml 468 SHA256 54cf8de7a3275fee855f42bb4a6a7e3004141a9fc70f0ab7bee9459190ada6cb SHA512 bfd1c8c432210025dd9b29ec89b383d3211ee9d1aabec4d59c2ec5801feccebcee3c55f7b6ed4e02daab9e72f42ab12517f957f396d0fd410ad3eee4fd05520d WHIRLPOOL a099b7cc03a3609e10316a50079bcb9102319e474f0f7a03aaf08bce91cbdb2718db9a9f8a1f7c02818d5e1111a371c50fa17ef593238b038b75a7d9d58a2e64 diff --git a/www-servers/cherokee/cherokee-1.2.104.ebuild b/www-servers/cherokee/cherokee-1.2.104.ebuild new file mode 100644 index 000000000000..adff732826e5 --- /dev/null +++ b/www-servers/cherokee/cherokee-1.2.104.ebuild @@ -0,0 +1,197 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +WANT_AUTOMAKE="1.11" + +PYTHON_COMPAT=( python2_7 ) + +inherit autotools python-r1 eutils multilib pam systemd user + +DESCRIPTION="An extremely fast and tiny web server" +SRC_URI="https://github.com/cherokee/webserver/archive/v${PV}.zip -> ${P}.zip" +HOMEPAGE="http://www.cherokee-project.com/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86" +IUSE="admin ffmpeg debug geoip ipv6 kernel_linux ldap libressl mysql nls pam php rrdtool ssl static static-libs" +RDEPEND="" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +COMMON_DEPEND=" + ${PYTHON_DEPS} + dev-libs/libpcre + >=sys-libs/zlib-1.1.4-r1 + ffmpeg? ( virtual/ffmpeg ) + geoip? ( dev-libs/geoip ) + ldap? ( net-nds/openldap ) + mysql? ( >=virtual/mysql-5 ) + nls? ( virtual/libintl ) + pam? ( virtual/pam ) + php? ( || ( + dev-lang/php:*[fpm] + dev-lang/php:*[cgi] + ) ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + " +DEPEND="${COMMON_DEPEND} + nls? ( sys-devel/gettext )" +RDEPEND="${COMMON_DEPEND} + rrdtool? ( net-analyzer/rrdtool )" + +RESTRICT="test" + +WEBROOT="/var/www/localhost" + +src_unpack() { + unpack ${A} + mv "webserver-${PV}" "${S}" || die +} + +pkg_setup() { + enewgroup cherokee + enewuser cherokee -1 -1 /var/www cherokee +} + +src_prepare() { + python_setup + epatch \ + "${FILESDIR}/${PN}-1.2.99-gentoo.patch" + + "${S}/po/admin/generate_POTFILESin.py" > po/admin/POTFILES.in + eautoreconf +} + +src_configure() { + local myconf + + if use admin ; then + myconf="${myconf} --enable-admin --with-python=/usr/bin/python" + else + myconf="${myconf} --disable-admin" + fi + + # Uses autodetect because --with-php requires path to php-{fpm,cgi}. + if ! use php ; then + myconf="${myconf} --without-php" + fi + + if use static ; then + myconf="${myconf} --enable-static-module=all" + fi + + local os="Unknown" + case "${CHOST}" in + *-freebsd*) + os="FreeBSD" ;; + *-netbsd*) + os="NetBSD" ;; + *-openbsd*) + os="OpenBSD" ;; + *) + os="Linux" ;; + esac + + econf \ + $(use_enable debug trace) \ + $(use_enable debug backtraces) \ + $(use_enable ipv6) \ + $(use_enable kernel_linux epoll) \ + $(use_enable nls) \ + $(use_enable pam) \ + $(use_enable static-libs static) \ + $(use_with ffmpeg) \ + $(use_with geoip) \ + $(use_with ldap) \ + $(use_with mysql) \ + $(use_with ssl libssl) \ + --disable-dependency-tracking \ + --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \ + --enable-os-string="Gentoo ${os}" \ + --enable-tmpdir="${EPREFIX}/var/tmp" \ + --localstatedir="${EPREFIX}/var" \ + --with-wwwroot="${EPREFIX}${WEBROOT}/htdocs" \ + --with-cgiroot="${EPREFIX}${WEBROOT}/cgi-bin" \ + --with-wwwuser=cherokee \ + --with-wwwgroup=cherokee \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + + if ! use static-libs ; then + find "${ED}" -name '*.la' -delete || die + elif ! use static ; then + find "${ED}/usr/$(get_libdir)/cherokee" '(' -name '*.la' -o -name '*.a' ')' -delete || die + fi + + dodoc AUTHORS NEWS README.rst + + if use pam ; then + pamd_mimic system-auth cherokee auth account session || die + fi + + newinitd "${FILESDIR}/${PN}-initd-1.2.99" ${PN} + newconfd "${FILESDIR}/${PN}-confd-1.2.98" ${PN} + + if ! use admin ; then + rm -r \ + "${ED}"/usr/bin/cherokee-admin-launcher \ + "${ED}"/usr/bin/CTK-run \ + "${ED}"/usr/sbin/cherokee-admin \ + "${ED}"/usr/share/cherokee/admin || die + fi + + exeinto /usr/share/doc/${PF}/contrib + doexe contrib/{bin2buffer.py,make-cert.sh,make-dh_params.sh,tracelor.py} + + #move the htdocs to docdir, bug #429632 + docompress -x /usr/share/doc/"${PF}"/htdocs.dist + mv "${ED}"${WEBROOT}/htdocs \ + "${ED}"/usr/share/doc/"${PF}"/htdocs.dist + mkdir "${ED}"${WEBROOT}/htdocs + + keepdir \ + "${WEBROOT}"/htdocs \ + /var/log/cherokee \ + /var/lib/cherokee/graphs/images + fowners cherokee:cherokee \ + /var/log/cherokee \ + /var/lib/cherokee/graphs \ + /var/lib/cherokee/graphs/images + + # logrotate + insinto /etc/logrotate.d + newins "${FILESDIR}"/${PN}.logrotate-r1 ${PN} + + systemd_dounit "${FILESDIR}"/cherokee.service +} + +pkg_postinst() { + elog + if use admin ; then + elog "Just run '/usr/sbin/cherokee-admin' and go to: http://localhost:9090" + elog + elog "Cherokee currently supports configuration versioning, so from now on," + elog "whenever a change is made to the configuration file format," + elog "Cherokee-Admin will be able to automatically convert yours to the new" + elog "release. You simply have to load Cherokee-Admin and it will be converted" + elog "once you proceed to saving it." + elog + elog "There is also a command line utility that you can use to do the exact" + elog "same thing. Config format can change in different versions. It is" + elog "provided under:" + elog " ${EPREFIX}/usr/share/cherokee/admin/upgrade_config.py" + else + elog "Try USE=admin if you want an easy way to configure cherokee." + fi + elog + elog "emerge www-servers/spawn-fcgi if you use Ruby on Rails with ${PN}." + elog +} diff --git a/www-servers/cherokee/files/cherokee-1.2.99-gentoo.patch b/www-servers/cherokee/files/cherokee-1.2.99-gentoo.patch new file mode 100644 index 000000000000..d55a5a2a82cf --- /dev/null +++ b/www-servers/cherokee/files/cherokee-1.2.99-gentoo.patch @@ -0,0 +1,38 @@ +diff -Naur cherokee-1.2.99.orig/admin/configured.py.pre cherokee-1.2.99/admin/configured.py.pre +--- cherokee-1.2.99.orig/admin/configured.py.pre 2011-03-31 17:30:04.000000000 +0900 ++++ cherokee-1.2.99/admin/configured.py.pre 2011-09-16 19:37:15.893487362 +0900 +@@ -22,7 +22,7 @@ + CHEROKEE_DATADIR = join (DATADIR, "cherokee") + CHEROKEE_DEPSDIR = join (DATADIR, "cherokee/deps") + CHEROKEE_CONFDIR = join (SYSCONFDIR, "cherokee") +-CHEROKEE_VAR_LOG = join (LOCALSTATE, "log") ++CHEROKEE_VAR_LOG = join (LOCALSTATE, "log/cherokee") + CHEROKEE_VAR_RUN = join (LOCALSTATE, "run") + CHEROKEE_VAR_LIB = join (LOCALSTATE, "lib/cherokee") + CHEROKEE_RRD_DIR = join (LOCALSTATE, "lib/cherokee/graphs") +diff -Naur cherokee-1.2.99.orig/cherokee.conf.sample.pre cherokee-1.2.99/cherokee.conf.sample.pre +--- cherokee-1.2.99.orig/cherokee.conf.sample.pre 2011-05-03 18:01:42.000000000 +0900 ++++ cherokee-1.2.99/cherokee.conf.sample.pre 2011-09-16 19:37:15.894487368 +0900 +@@ -18,6 +18,8 @@ + server!server_tokens = full + server!panic_action = %prefix%/bin/cherokee-panic + server!pid_file = %localstatedir%/run/cherokee.pid ++server!user = cherokee ++server!group = cherokee + + # Default virtual server + # +@@ -27,11 +29,11 @@ + + vserver!1!logger = combined + vserver!1!logger!access!type = file +-vserver!1!logger!access!filename = %localstatedir%/log/cherokee.access ++vserver!1!logger!access!filename = %localstatedir%/log/cherokee/cherokee.access + vserver!1!logger!access!buffsize = 16384 + + vserver!1!error_writer!type = file +-vserver!1!error_writer!filename = %localstatedir%/log/cherokee.error ++vserver!1!error_writer!filename = %localstatedir%/log/cherokee/cherokee.error + + vserver!1!rule!1!match = default + vserver!1!rule!1!handler = common diff --git a/www-servers/cherokee/files/cherokee-confd-1.2.98 b/www-servers/cherokee/files/cherokee-confd-1.2.98 new file mode 100644 index 000000000000..62e7fd64f787 --- /dev/null +++ b/www-servers/cherokee/files/cherokee-confd-1.2.98 @@ -0,0 +1,4 @@ +# /etc/conf.d/cherokee: config file for /etc/init.d/cherokee + +#CHEROKEE_OPTS="--config=/etc/cherokee/cherokee.conf --valgrind" +CHEROKEE_OPTS="" diff --git a/www-servers/cherokee/files/cherokee-initd-1.2.99 b/www-servers/cherokee/files/cherokee-initd-1.2.99 new file mode 100644 index 000000000000..488cc819d0df --- /dev/null +++ b/www-servers/cherokee/files/cherokee-initd-1.2.99 @@ -0,0 +1,67 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/sbin/cherokee" +extra_commands="configtest" +extra_started_commands="graceful reload" + + +depend() { + need net + use dns ldap logger mysql netmount +} + +checkconfig() { + ${command} -t 1>/dev/null 2>&1 + ret=$? + if [ $ret -ne 0 ]; then + eerror "${SVCNAME} has detected an error in your config:" + ${command} -t ${CHEROKEE_OPTS} + fi + return $? +} + +configtest() { + ebegin "Checking ${SVCNAME} configuration" + checkconfig + eend $? +} + +start() { + checkconfig || return 1 + + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --quiet \ + --exec ${command} -- -d ${CHEROKEE_OPTS} + eend $? +} + +stop() { + checkconfig || return 1 + + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet \ + --exec ${command} + eend $? +} + +graceful() { + checkconfig || return 1 + + ebegin "Restarting ${SVCNAME} and closing all the opened connections" + start-stop-daemon \ + --exec ${command} \ + --signal USR1 + eend $? +} + +reload() { + checkconfig || return 1 + + ebegin "Reloading ${SVCNAME} configuration" + start-stop-daemon \ + --exec ${command} \ + --signal HUP + eend $? +} diff --git a/www-servers/cherokee/files/cherokee.logrotate-r1 b/www-servers/cherokee/files/cherokee.logrotate-r1 new file mode 100644 index 000000000000..49b68364bc24 --- /dev/null +++ b/www-servers/cherokee/files/cherokee.logrotate-r1 @@ -0,0 +1,10 @@ +# lighttpd logrotate script for Gentoo + +/var/log/cherokee/cherokee.access /var/log/cherokee/cherokee.error { + missingok + notifempty + sharedscripts + postrotate + [ -f /var/run/cherokee.pid ] && /bin/kill -USR2 `cat /var/run/cherokee.pid` + endscript +} diff --git a/www-servers/cherokee/files/cherokee.service b/www-servers/cherokee/files/cherokee.service new file mode 100644 index 000000000000..a2d703185d37 --- /dev/null +++ b/www-servers/cherokee/files/cherokee.service @@ -0,0 +1,10 @@ +[Unit] +Description=Cherokee web server +After=syslog.target + +[Service] +Type=forking +ExecStart=/usr/sbin/cherokee -d -C /etc/cherokee/cherokee.conf + +[Install] +WantedBy=multi-user.target diff --git a/www-servers/cherokee/metadata.xml b/www-servers/cherokee/metadata.xml new file mode 100644 index 000000000000..bb0494e0acc6 --- /dev/null +++ b/www-servers/cherokee/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>blueness@gentoo.org</email> + <name>Anthony G. Basile</name> + </maintainer> + <use> + <flag name="admin">Install web based cherokee conf tool</flag> + <flag name="rrdtool">Enable rrdtool support</flag> + </use> + <upstream> + <remote-id type="github">cherokee/webserver</remote-id> + </upstream> +</pkgmetadata> |