/[gentoo-x86]/www-servers/cherokee/cherokee-0.99.48.ebuild
Gentoo

Contents of /www-servers/cherokee/cherokee-0.99.48.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Jun 23 09:56:09 2010 UTC (4 years ago) by bass
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
version bump. remove old ebuilds
(Portage version: 2.1.8.3/cvs/Linux i686)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-servers/cherokee/cherokee-0.99.48.ebuild,v 1.1 2010/04/30 09:41:45 bass Exp $
4
5 inherit eutils pam versionator libtool
6
7 DESCRIPTION="An extremely fast and tiny web server."
8 SRC_URI="http://www.cherokee-project.com/download/$(get_version_component_range 1-2)/${PV}/${P}.tar.gz"
9 HOMEPAGE="http://www.cherokee-project.com/"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~x86 ~amd64"
14 IUSE="ipv6 nls ssl static pam coverpage threads kernel_linux admin debug geoip ldap mysql ffmpeg fastcgi"
15
16 RDEPEND="
17 >=sys-libs/zlib-1.1.4-r1
18 nls? ( sys-devel/gettext )
19 ssl? ( dev-libs/openssl )
20 pam? ( virtual/pam )
21 admin? ( dev-lang/python )
22 geoip? ( dev-libs/geoip )
23 ldap? ( net-nds/openldap )
24 mysql? ( virtual/mysql )
25 fastcgi? ( www-servers/spawn-fcgi )
26 ffmpeg? ( media-video/ffmpeg )"
27 DEPEND="${RDEPEND}"
28
29 src_compile() {
30 local myconf
31
32 if use static ; then
33 myconf="${myconf} --enable-static --enable-static-module=all"
34 else
35 myconf="${myconf} --disable-static"
36 fi
37
38 if use debug ; then
39 myconf="${myconf} --enable-trace"
40 fi
41
42 local os="Unknown"
43 case "${CHOST}" in
44 *-freebsd*)
45 os="FreeBSD" ;;
46 *-netbsd*)
47 os="NetBSD" ;;
48 *-openbsd*)
49 os="OpenBSD" ;;
50 *)
51 os="Linux" ;;
52 esac
53
54 # No options to enable or disable ssl since Cherokee 0.11
55 econf \
56 ${myconf} \
57 $(use_enable pam) \
58 $(use_enable ipv6) \
59 $(use_enable nls) \
60 $(use_enable threads pthread) \
61 $(use_enable kernel_linux epoll) \
62 $(use_with geoip) \
63 $(use_with ldap) \
64 $(use_with mysql) \
65 $(use_with ffmpeg) \
66 --disable-dependency-tracking \
67 --enable-os-string="Gentoo ${os}" \
68 --with-wwwroot=/var/www/localhost/htdocs \
69 --prefix=/usr \
70 --sysconfdir=/etc \
71 --localstatedir=/var \
72 || die "configure failed"
73
74 emake || die "emake failed"
75 }
76
77 src_install () {
78 emake DESTDIR="${D}" docdir="/usr/share/doc/${PF}/html" install || die "make install failed"
79 dodoc AUTHORS ChangeLog
80
81 use pam && pamd_mimic system-auth cherokee auth account session
82 newinitd "${FILESDIR}/${PN}-initd-0.99.23" ${PN} || die "newinitd failed"
83
84 dodir /usr/share/doc/${PF}/contrib
85 insinto /usr/share/${PF}/contrib
86 doins contrib/07to08.py
87 doins contrib/08to09.py
88 doins contrib/09to010.py
89 doins contrib/011to098.py
90 doins contrib/098to099.py
91 doins contrib/0999to09910.py
92 doins contrib/make-cert.sh
93
94 keepdir /etc/cherokee/mods-enabled /etc/cherokee/sites-enabled /var/www/localhost/htdocs
95
96 use coverpage || rm -rf "${D}"/var/www/localhost/htdocs/{index.html,images}
97 use admin || rm -rf "${D}"/usr/sbin/admin "${D}"/usr/share/cherokee/admin
98
99 # Puts logs in /var/log/cherokee/
100 dosed "s:/var/log/cherokee\.:/var/log/cherokee/cherokee\.:g" /etc/cherokee/cherokee.conf
101
102 }
103
104 pkg_postinst() {
105 enewgroup cherokee
106 enewuser cherokee -1 -1 /var/www/localhost cherokee
107 install -o cherokee -g cherokee -m0775 -d "${ROOT}"var/log/cherokee
108
109 # check if user/group was defined if not add it
110 gr="/bin/grep -q"
111 ec="/bin/echo"
112 $gr server\!user /etc/cherokee/cherokee.conf ; rtu=$?
113 $gr server\!group /etc/cherokee/cherokee.conf ; rtg=$?
114
115 [[ "x$rtu" == "x1" ]] && $ec server\!user = cherokee >> /etc/cherokee/cherokee.conf
116 [[ "x$rtg" == "x1" ]] && $ec server\!group = cherokee >> /etc/cherokee/cherokee.conf
117
118 if use admin ; then
119 echo ""
120 elog "Just run 'cherokee-admin' and go to: http://localhost:9090"
121 echo ""
122 else
123 echo ""
124 elog "Try USE=admin if you want an easy way to configure cherokee."
125 echo ""
126 fi
127
128 echo ""
129 elog "Config format can change in different versions. Check converter script in:"
130 elog " /usr/share/cherokee-0.99.15/contrib/"
131 elog "for example:"
132 elog " PYTHONPATH="/usr/share/cherokee/admin/" python \\"
133 elog " /usr/share/cherokee-0.99.15/contrib/0999to09910.py \\"
134 elog " /etc/cherokee/cherokee.conf /etc/cherokee/cherokee.conf-0.99.15"
135
136 }

  ViewVC Help
Powered by ViewVC 1.1.20