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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Jul 18 06:52:54 2006 UTC (8 years, 4 months ago) by bass
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
version bump
(Portage version: 2.1-r1)
 (Unsigned 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.1.ebuild,v 1.1 2006/04/10 12:27:40 bass 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.0x50.org/download/${PV%.*}/${PV}/${NAME}-${PV}.tar.gz"
12 HOMEPAGE="http://www.0x50.org/"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~x86 ~ppc ~sparc"
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 # if use static ; then
32 # epatch ${FILESDIR}/${P}-fix-static.diff
33
34 # einfo "Regenerating automake/autoconf files"
35 # libtoolize --copy --force --automake || die "libtoolize failed"
36 # aclocal -I ${S}/m4 || die "aclocal failed"
37 # autoheader || die "autoheader failed"
38 # automake -a || die "automake failed"
39 # autoconf || die "autoconf failed"
40 # fi
41
42 # remove "doc" from SUBDIRS so that html docs don't get installed
43 # to the wrong place (/usr/share/doc/cherokee) and we can install
44 # them conditionally via dohtml in src_install.
45 sed -i -e 's|\(SUBDIRS =.*\)doc\(.*\)$|\1\2|' Makefile.in || \
46 die "sed Makefile.in failed"
47
48 # use cherokee user/group
49 sed -i -e 's|^#\(User \).*$|\1cherokee|' \
50 -e 's|^#\(Group \).*$|\1cherokee|' cherokee.conf.sample.pre || \
51 die "sed cherokee.conf failed"
52 }
53
54 src_compile() {
55 local myconf
56
57 if use ssl && use gnutls ; then
58 myconf="${myconf} --enable-tls=gnutls"
59 elif use ssl && ! use gnutls ; then
60 myconf="${myconf} --enable-tls=openssl"
61 else
62 myconf="${myconf} --disable-tls"
63 fi
64
65 if use static ; then
66 myconf="${myconf} --enable-static --enable-static-module=all"
67 else
68 myconf="${myconf} --disable-static"
69 fi
70
71 if use fastcgi ; then
72 myconf="${myconf} --enable-fcgi"
73 fi
74
75 if use scgi ; then
76 myconf="${myconf} --enable-scgi"
77 fi
78
79 econf \
80 ${myconf} \
81 $(use_enable pam) \
82 $(use_enable ipv6) \
83 --enable-os-string="Gentoo Linux" \
84 --with-wwwroot=/var/www/localhost/htdocs \
85 || die "configure failed"
86
87 emake || die "emake failed"
88 }
89
90 src_install () {
91 make DESTDIR="${D}" install || die "make install failed"
92 dodoc AUTHORS ChangeLog INSTALL README TODO
93 use doc && dohtml -r doc/*
94
95 newpamd pam.d_cherokee ${PN} || die "newpamd failed"
96 newinitd ${FILESDIR}/${PN}-0.4.17-init.d ${PN} || die "newinitd failed"
97
98 # be nice and don't overwrite a user's pre-existing index.html
99 # (unless they're the same).
100 if [[ -f ${ROOT}/var/www/localhost/htdocs/index.html ]] ; then
101 diff ${ROOT}/var/www/localhost/htdocs/index.html \
102 ${D}/var/www/localhost/htdocs/index.html &>/dev/null || \
103 mv ${D}/var/www/localhost/htdocs/{,cherokee-}index.html
104 fi
105 }
106
107 pkg_postinst() {
108 enewgroup cherokee
109 enewuser cherokee -1 -1 /var/www/localhost cherokee
110 echo
111 einfo "Since version 0.4.30 /etc/cherokee/mime.conf is deprecated so"
112 einfo "you need to update your cherokee.conf with: "
113 einfo " ""MimeFile /etc/cherokee/mime.types"
114 einfo " ""MimeFile /etc/cherokee/mime.compression.types"
115 echo
116 }

  ViewVC Help
Powered by ViewVC 1.1.20