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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Thu Oct 22 08:01:02 2009 UTC (9 years, 1 month 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 bass 1.1 # Copyright 1999-2009 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 bass 1.2 # $Header: /var/cvsroot/gentoo-x86/www-servers/cherokee/cherokee-0.99.19-r1.ebuild,v 1.1 2009/06/28 16:01:00 bass Exp $
4 bass 1.1
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     # Puts logs in /var/log/cherokee/
98     dosed "s:/var/log/cherokee\.:/var/log/cherokee/cherokee\.:g" /etc/cherokee/cherokee.conf
99    
100     }
101    
102     pkg_postinst() {
103     enewgroup cherokee
104     enewuser cherokee -1 -1 /var/www/localhost cherokee
105     install -o cherokee -g cherokee -m0775 -d $ROOT/var/log/cherokee
106    
107     # check if user/group was defined if not add it
108     gr="/bin/grep -q"
109     ec="/bin/echo"
110     $gr server\!user /etc/cherokee/cherokee.conf ; rtu=$?
111     $gr server\!group /etc/cherokee/cherokee.conf ; rtg=$?
112    
113     [[ "x$rtu" == "x1" ]] && $ec server\!user = cherokee >> /etc/cherokee/cherokee.conf
114     [[ "x$rtg" == "x1" ]] && $ec server\!group = cherokee >> /etc/cherokee/cherokee.conf
115    
116     if use admin ; then
117     echo ""
118     elog "Just run 'cherokee-admin' and go to: http://localhost:9090"
119     echo ""
120     else
121     echo ""
122     elog "Try USE=admin if you want an easy way to configure cherokee."
123     echo ""
124     fi
125    
126     echo ""
127     elog "Config format can change in different versions. Check converter script in:"
128     elog " /usr/share/cherokee-0.99.15/contrib/"
129     elog "for example:"
130     elog " PYTHONPATH="/usr/share/cherokee/admin/" python \\"
131     elog " /usr/share/cherokee-0.99.15/contrib/0999to09910.py \\"
132     elog " /etc/cherokee/cherokee.conf /etc/cherokee/cherokee.conf-0.99.15"
133    
134     }

  ViewVC Help
Powered by ViewVC 1.1.20