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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Dec 27 02:37:48 2006 UTC (7 years, 8 months ago) by flameeyes
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Big new-maintainer cleanup. Bump to latest 0.5.6, remove old versions, remove dead files in $FILESDIR, add new init.d file that leave to cherokee to get into background.
(Portage version: 2.1.2_rc4-r1)
 (Signed Manifest commit)

1 # Copyright 1999-2006 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.5.5.ebuild,v 1.3 2006/12/14 17:37:32 beu Exp $
4
5 inherit eutils pam
6
7 NAME=cherokee
8 S="${WORKDIR}/${NAME}-${PV}"
9
10 DESCRIPTION="An extremely fast and tiny web server."
11 SRC_URI="http://www.cherokee-project.com/download/${PV%.*}/${PV}/${NAME}-${PV}.tar.gz"
12 HOMEPAGE="http://www.cherokee-project.com/"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~amd64 ~ppc ~sparc ~x86"
17 IUSE="ipv6 ssl gnutls static doc pam fastcgi scgi"
18
19 RDEPEND=">=sys-libs/zlib-1.1.4-r1
20 gnutls? ( net-libs/gnutls )
21 ssl? ( dev-libs/openssl )
22 pam? ( virtual/pam )"
23
24 DEPEND="${RDEPEND}
25 >=sys-devel/automake-1.7.5"
26
27 src_unpack() {
28 unpack ${A}
29 cd ${S}
30
31 # remove "doc" from SUBDIRS so that html docs don't get installed
32 # to the wrong place (/usr/share/doc/cherokee) and we can install
33 # them conditionally via dohtml in src_install.
34 sed -i -e 's|\(SUBDIRS =.*\)doc\(.*\)$|\1\2|' Makefile.in || \
35 die "sed Makefile.in failed"
36
37 # use cherokee user/group
38 sed -i -e 's|^#\(User \).*$|\1cherokee|' \
39 -e 's|^#\(Group \).*$|\1cherokee|' cherokee.conf.sample.pre || \
40 die "sed cherokee.conf failed"
41 }
42
43 src_compile() {
44 local myconf
45
46 if use ssl && use gnutls ; then
47 myconf="${myconf} --enable-tls=gnutls"
48 elif use ssl && ! use gnutls ; then
49 myconf="${myconf} --enable-tls=openssl"
50 else
51 myconf="${myconf} --disable-tls"
52 fi
53
54 if use static ; then
55 myconf="${myconf} --enable-static --enable-static-module=all"
56 else
57 myconf="${myconf} --disable-static"
58 fi
59
60 if use fastcgi ; then
61 myconf="${myconf} --enable-fcgi"
62 fi
63
64 if use scgi ; then
65 myconf="${myconf} --enable-scgi"
66 fi
67
68 econf \
69 ${myconf} \
70 $(use_enable pam) \
71 $(use_enable ipv6) \
72 --enable-os-string="Gentoo Linux" \
73 --with-wwwroot=/var/www/localhost/htdocs \
74 || die "configure failed"
75
76 emake || die "emake failed"
77 }
78
79 src_install () {
80 make DESTDIR="${D}" install || die "make install failed"
81 dodoc AUTHORS ChangeLog INSTALL README TODO
82 use doc && dohtml -r doc/*
83
84 newpamd pam.d_cherokee ${PN} || die "newpamd failed"
85 newinitd ${FILESDIR}/${PN}-0.4.17-init.d ${PN} || die "newinitd failed"
86
87 # be nice and don't overwrite a user's pre-existing index.html
88 # (unless they're the same).
89 if [[ -f ${ROOT}/var/www/localhost/htdocs/index.html ]] ; then
90 diff ${ROOT}/var/www/localhost/htdocs/index.html \
91 ${D}/var/www/localhost/htdocs/index.html &>/dev/null || \
92 mv ${D}/var/www/localhost/htdocs/{,cherokee-}index.html
93 fi
94 }
95
96 pkg_postinst() {
97 enewgroup cherokee
98 enewuser cherokee -1 -1 /var/www/localhost cherokee
99 echo
100 einfo "Since version 0.4.30 /etc/cherokee/mime.conf is deprecated so"
101 einfo "you need to update your cherokee.conf with: "
102 einfo " ""MimeFile /etc/cherokee/mime.types"
103 einfo " ""MimeFile /etc/cherokee/mime.compression.types"
104 echo
105 }

  ViewVC Help
Powered by ViewVC 1.1.20