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

Contents of /www-servers/cherokee/cherokee-0.99.30.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, 3 months 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-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.30.ebuild,v 1.1 2009/11/30 16:47:38 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 -j1 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/make-cert.sh
87
88 keepdir /etc/cherokee/mods-enabled /etc/cherokee/sites-enabled /var/www/localhost/htdocs
89
90 use coverpage || rm -rf "${D}"/var/www/localhost/htdocs/{index.html,images}
91 use admin || rm -rf "${D}"/usr/sbin/admin "${D}"/usr/share/cherokee/admin
92
93 # Puts logs in /var/log/cherokee/
94 dosed "s:/var/log/cherokee\.:/var/log/cherokee/cherokee\.:g" /etc/cherokee/cherokee.conf
95
96 }
97
98 pkg_postinst() {
99 enewgroup cherokee
100 enewuser cherokee -1 -1 /var/www/localhost cherokee
101 install -o cherokee -g cherokee -m0775 -d $ROOT/var/log/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 }

  ViewVC Help
Powered by ViewVC 1.1.20