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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Thu Oct 22 08:01:02 2009 UTC (4 years, 8 months ago) by bass
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
bump version
(Portage version: 2.1.6.13/cvs/Linux i686)

1 # Copyright 1999-2009 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.17.ebuild,v 1.2 2009/06/22 07:35:48 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 ssl static pam coverpage threads kernel_linux admin debug geoip ldap
15 mysql ffmpeg fastcgi"
16
17 RDEPEND="
18 >=sys-libs/zlib-1.1.4-r1
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 threads pthread) \
60 $(use_enable kernel_linux epoll) \
61 $(use_with geoip) \
62 $(use_with ldap) \
63 $(use_with mysql) \
64 $(use_with ffmpeg) \
65 --disable-dependency-tracking \
66 --enable-os-string="Gentoo ${os}" \
67 --with-wwwroot=/var/www/localhost/htdocs \
68 --prefix=/usr \
69 --sysconfdir=/etc \
70 --localstatedir=/var \
71 || die "configure failed"
72
73 emake || die "emake failed"
74 }
75
76 src_install () {
77 emake -j1 DESTDIR="${D}" docdir="/usr/share/doc/${PF}/html" install || die "make install failed"
78 dodoc AUTHORS ChangeLog
79
80 use pam && pamd_mimic system-auth cherokee auth account session
81 newinitd "${FILESDIR}/${PN}-initd-0.11" ${PN} || die "newinitd failed"
82
83 dodir /usr/share/doc/${PF}/contrib
84 insinto /usr/share/${PF}/contrib
85 doins contrib/07to08.py
86 doins contrib/08to09.py
87 doins contrib/09to010.py
88 doins contrib/011to098.py
89 doins contrib/098to099.py
90 doins contrib/0999to09910.py
91 doins contrib/mk-cert.sh
92
93 keepdir /etc/cherokee/mods-enabled /etc/cherokee/sites-enabled /var/www/localhost/htdocs
94
95 use coverpage || rm -rf "${D}"/var/www/localhost/htdocs/{index.html,images}
96 use admin || rm -rf "${D}"/usr/sbin/admin "${D}"/usr/share/cherokee/admin
97
98 }
99
100 pkg_postinst() {
101 enewgroup cherokee
102 enewuser cherokee -1 -1 /var/www/localhost cherokee
103
104 # check if user/group was defined if not add it
105 gr="/bin/grep -q"
106 ec="/bin/echo"
107 $gr server\!user /etc/cherokee/cherokee.conf ; rtu=$?
108 $gr server\!group /etc/cherokee/cherokee.conf ; rtg=$?
109
110 [[ "x$rtu" == "x1" ]] && $ec server\!user = cherokee >> /etc/cherokee/cherokee.conf
111 [[ "x$rtg" == "x1" ]] && $ec server\!group = cherokee >> /etc/cherokee/cherokee.conf
112
113 if use admin ; then
114 echo ""
115 elog "Just run 'cherokee-admin' and go to: http://localhost:9090"
116 echo ""
117 else
118 echo ""
119 elog "Try USE=admin if you want an easy way to configure cherokee."
120 echo ""
121 fi
122
123 echo ""
124 elog "Config format can change in different versions. Check converter script in:"
125 elog " /usr/share/cherokee-0.99.15/contrib/"
126 elog "for example:"
127 elog " PYTHONPATH="/usr/share/cherokee/admin/" python \\"
128 elog " /usr/share/cherokee-0.99.15/contrib/0999to09910.py \\"
129 elog " /etc/cherokee/cherokee.conf /etc/cherokee/cherokee.conf-0.99.15"
130
131 }

  ViewVC Help
Powered by ViewVC 1.1.20