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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Oct 22 08:01:02 2009 UTC (4 years, 9 months ago) by bass
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +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.19.ebuild,v 1.1 2009/06/24 07:08: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 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 ssl? ( dev-libs/openssl )
19 pam? ( virtual/pam )
20 admin? ( dev-lang/python )
21 geoip? ( dev-libs/geoip )
22 ldap? ( net-nds/openldap )
23 mysql? ( virtual/mysql )
24 fastcgi? ( www-servers/spawn-fcgi )
25 ffmpeg? ( media-video/ffmpeg )"
26 DEPEND="${RDEPEND}"
27
28 src_compile() {
29 local myconf
30
31 if use static ; then
32 myconf="${myconf} --enable-static --enable-static-module=all"
33 else
34 myconf="${myconf} --disable-static"
35 fi
36
37 if use debug ; then
38 myconf="${myconf} --enable-trace"
39 fi
40
41 local os="Unknown"
42 case "${CHOST}" in
43 *-freebsd*)
44 os="FreeBSD" ;;
45 *-netbsd*)
46 os="NetBSD" ;;
47 *-openbsd*)
48 os="OpenBSD" ;;
49 *)
50 os="Linux" ;;
51 esac
52
53 # No options to enable or disable ssl since Cherokee 0.11
54 econf \
55 ${myconf} \
56 $(use_enable pam) \
57 $(use_enable ipv6) \
58 $(use_enable threads pthread) \
59 $(use_enable kernel_linux epoll) \
60 $(use_with geoip) \
61 $(use_with ldap) \
62 $(use_with mysql) \
63 $(use_with ffmpeg) \
64 --disable-dependency-tracking \
65 --enable-os-string="Gentoo ${os}" \
66 --with-wwwroot=/var/www/localhost/htdocs \
67 --prefix=/usr \
68 --sysconfdir=/etc \
69 --localstatedir=/var \
70 || die "configure failed"
71
72 emake || die "emake failed"
73 }
74
75 src_install () {
76 emake -j1 DESTDIR="${D}" docdir="/usr/share/doc/${PF}/html" install || die "make install failed"
77 dodoc AUTHORS ChangeLog
78
79 use pam && pamd_mimic system-auth cherokee auth account session
80 newinitd "${FILESDIR}/${PN}-initd-0.11" ${PN} || die "newinitd failed"
81
82 dodir /usr/share/doc/${PF}/contrib
83 insinto /usr/share/${PF}/contrib
84 doins contrib/07to08.py
85 doins contrib/08to09.py
86 doins contrib/09to010.py
87 doins contrib/011to098.py
88 doins contrib/098to099.py
89 doins contrib/0999to09910.py
90 doins contrib/mk-cert.sh
91
92 keepdir /etc/cherokee/mods-enabled /etc/cherokee/sites-enabled /var/www/localhost/htdocs
93
94 use coverpage || rm -rf "${D}"/var/www/localhost/htdocs/{index.html,images}
95 use admin || rm -rf "${D}"/usr/sbin/admin "${D}"/usr/share/cherokee/admin
96
97 }
98
99 pkg_postinst() {
100 enewgroup cherokee
101 enewuser cherokee -1 -1 /var/www/localhost cherokee
102
103 # check if user/group was defined if not add it
104 gr="/bin/grep -q"
105 ec="/bin/echo"
106 $gr server\!user /etc/cherokee/cherokee.conf ; rtu=$?
107 $gr server\!group /etc/cherokee/cherokee.conf ; rtg=$?
108
109 [[ "x$rtu" == "x1" ]] && $ec server\!user = cherokee >> /etc/cherokee/cherokee.conf
110 [[ "x$rtg" == "x1" ]] && $ec server\!group = cherokee >> /etc/cherokee/cherokee.conf
111
112 if use admin ; then
113 echo ""
114 elog "Just run 'cherokee-admin' and go to: http://localhost:9090"
115 echo ""
116 else
117 echo ""
118 elog "Try USE=admin if you want an easy way to configure cherokee."
119 echo ""
120 fi
121
122 echo ""
123 elog "Config format can change in different versions. Check converter script in:"
124 elog " /usr/share/cherokee-0.99.15/contrib/"
125 elog "for example:"
126 elog " PYTHONPATH="/usr/share/cherokee/admin/" python \\"
127 elog " /usr/share/cherokee-0.99.15/contrib/0999to09910.py \\"
128 elog " /etc/cherokee/cherokee.conf /etc/cherokee/cherokee.conf-0.99.15"
129
130 }

  ViewVC Help
Powered by ViewVC 1.1.20