summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /www-servers/cherokee/cherokee-1.2.104.ebuild
downloadgentoo-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/cherokee-1.2.104.ebuild')
-rw-r--r--www-servers/cherokee/cherokee-1.2.104.ebuild190
1 files changed, 190 insertions, 0 deletions
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
+}