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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

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

  ViewVC Help
Powered by ViewVC 1.1.20