diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /www-servers/cherokee | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'www-servers/cherokee')
-rw-r--r-- | www-servers/cherokee/Manifest | 3 | ||||
-rw-r--r-- | www-servers/cherokee/cherokee-1.2.103-r2.ebuild | 194 | ||||
-rw-r--r-- | www-servers/cherokee/cherokee-1.2.104.ebuild | 190 | ||||
-rw-r--r-- | www-servers/cherokee/files/cherokee-1.2.103-linux3.patch | 36 | ||||
-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 | 11 | ||||
-rw-r--r-- | www-servers/cherokee/files/cherokee.service | 10 | ||||
-rw-r--r-- | www-servers/cherokee/metadata.xml | 15 |
10 files changed, 568 insertions, 0 deletions
diff --git a/www-servers/cherokee/Manifest b/www-servers/cherokee/Manifest new file mode 100644 index 000000000000..d62c4198dccf --- /dev/null +++ b/www-servers/cherokee/Manifest @@ -0,0 +1,3 @@ +DIST cherokee-1.2.103.zip 5783906 SHA256 0e125cba2ad2d0dc48ecca3af4894b92ec5fab422a9d7d27fd0c7a74751e5f35 SHA512 63ba5d41f61d2816df7dce3b572616eca5fc09dd2e9dca9efa2cbf28a38d6d5e1840e4cd302a0eb5780b1a0abe7632232511c77d9e383f0b945d3eca960af4ab WHIRLPOOL 00f592bc41eecd6422a95d6e36bf5c46b4845afe2adad756635d0d2c1e5c1bfde03e633bcbde8cab207c31050dc055e26fcdbf69512a8b61422242905b792754 +DIST cherokee-1.2.104.zip 6200164 SHA256 1acc80de22ed0aa4a0d95aa643ac92a2cce435480258081213214bec05da4098 SHA512 9c9f44643d0d2636f2e3e61ef8e2918d91d9bb6099be761826c8ffad01d339739ed40984d01151044c2e536d4754b5157d6d20c37627ce49eecdb404a716cd9d WHIRLPOOL b0c13205014daee461538d0b7968bf255fd6633dbf3defeb2505ce463772c6f56b06ef91ff6b055bd589a15d19974d794fcbe039c1552b04a6bd1228a690f417 +DIST cherokee-ctk-master.zip 415092 SHA256 dede313f1d396f1deaf78d9fd9a1270820d2e91761efe827a207b46061f27993 SHA512 c933f15aa7197f5001b3120fd27898b2e97b78998e0bd0d68e7ced16a57950b7e85e4d731ca0420cd8a0fb292b4cd34b9497928183ccca22c9aa3a16285f9ef7 WHIRLPOOL 92453d3478ae238e5d9422fc2e8f0f1406576f9753ba0ed644ae8e093862b72c8c634bdaaeec4c0f725bdef8f4bc5c7113a916c2cdd8fbb0a14db61e54173c57 diff --git a/www-servers/cherokee/cherokee-1.2.103-r2.ebuild b/www-servers/cherokee/cherokee-1.2.103-r2.ebuild new file mode 100644 index 000000000000..1d87b9ec2d41 --- /dev/null +++ b/www-servers/cherokee/cherokee-1.2.103-r2.ebuild @@ -0,0 +1,194 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 + https://github.com/cherokee/CTK/archive/master.zip -> ${PN}-ctk-master.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 mysql nls pam php rrdtool ssl static static-libs" + +COMMON_DEPEND="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? ( dev-libs/openssl )" +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 + rmdir "${S}/admin/CTK" || die + mv "CTK-master" "${S}/admin/CTK" || die +} + +pkg_setup() { + enewgroup cherokee + enewuser cherokee -1 -1 /var/www cherokee +} + +src_prepare() { + python_setup + epatch \ + "${FILESDIR}/${PN}-1.2.99-gentoo.patch" \ + "${FILESDIR}/${PN}-1.2.103-linux3.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/cherokee-1.2.104.ebuild b/www-servers/cherokee/cherokee-1.2.104.ebuild new file mode 100644 index 000000000000..a78bc089d0e4 --- /dev/null +++ b/www-servers/cherokee/cherokee-1.2.104.ebuild @@ -0,0 +1,190 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 mysql nls pam php rrdtool ssl static static-libs" + +COMMON_DEPEND="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? ( dev-libs/openssl )" +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.103-linux3.patch b/www-servers/cherokee/files/cherokee-1.2.103-linux3.patch new file mode 100644 index 000000000000..7f96f68ab97e --- /dev/null +++ b/www-servers/cherokee/files/cherokee-1.2.103-linux3.patch @@ -0,0 +1,36 @@ +diff -Naur webserver-1.2.103.orig/admin/SystemStats.py webserver-1.2.103/admin/SystemStats.py +--- webserver-1.2.103.orig/admin/SystemStats.py 2013-01-26 17:52:44.000000000 -0500 ++++ webserver-1.2.103/admin/SystemStats.py 2013-07-15 07:27:11.000000000 -0400 +@@ -39,7 +39,7 @@ + global _stats + + if not _stats: +- if sys.platform == 'linux2': ++ if sys.platform == 'linux2' or sys.platform == 'linux3': + _stats = System_stats__Linux() + elif sys.platform == 'darwin': + _stats = System_stats__Darwin() +diff -Naur webserver-1.2.103.orig/admin/util.py webserver-1.2.103/admin/util.py +--- webserver-1.2.103.orig/admin/util.py 2013-01-26 17:52:44.000000000 -0500 ++++ webserver-1.2.103/admin/util.py 2013-07-15 07:29:12.000000000 -0400 +@@ -341,7 +341,7 @@ + def os_get_document_root(): + if sys.platform == 'darwin': + return "/Library/WebServer/Documents" +- elif sys.platform == 'linux2': ++ elif sys.platform == 'linux2' or sys.platform == 'linux3': + if os.path.exists ("/etc/redhat-release"): + return '/var/www' + elif os.path.exists ("/etc/fedora-release"): +diff -Naur webserver-1.2.103.orig/admin/wizards/php.py webserver-1.2.103/admin/wizards/php.py +--- webserver-1.2.103.orig/admin/wizards/php.py 2013-01-26 17:52:44.000000000 -0500 ++++ webserver-1.2.103/admin/wizards/php.py 2013-07-15 07:29:47.000000000 -0400 +@@ -607,7 +607,7 @@ + first_group = str(root_group) + + # Systems +- if sys.platform == 'linux2': ++ if sys.platform == 'linux2' or sys.platform == 'linux3': + if os.getuid() == 0: + return root_group + return first_group 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..ad4fb7f2d865 --- /dev/null +++ b/www-servers/cherokee/files/cherokee-initd-1.2.99 @@ -0,0 +1,67 @@ +#!/sbin/runscript +# 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..acb30e2cefa5 --- /dev/null +++ b/www-servers/cherokee/files/cherokee.logrotate-r1 @@ -0,0 +1,11 @@ +# $Id$ +# 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..322df7139a03 --- /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> + <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> |