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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sun Sep 28 17:16:23 2008 UTC (5 years, 10 months ago) by bass
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Version bump
(Portage version: 2.1.4.4)

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.6.ebuild,v 1.4 2006/12/27 06:06:49 flameeyes Exp $
4
5 WANT_AUTOCONF="latest"
6 WANT_AUTOMAKE="latest"
7
8 inherit eutils pam versionator libtool autotools
9
10 DESCRIPTION="An extremely fast and tiny web server."
11 SRC_URI="http://www.cherokee-project.com/download/$(get_version_component_range 1-2)/${PV}/${P}.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 pam coverpage threads kernel_linux"
18
19 RDEPEND=">=sys-libs/zlib-1.1.4-r1
20 ssl? (
21 gnutls? ( net-libs/gnutls )
22 !gnutls? ( dev-libs/openssl )
23 )
24 pam? ( virtual/pam )"
25 DEPEND="${RDEPEND}
26 dev-util/pkgconfig"
27
28 src_unpack() {
29 unpack ${A}
30
31 cd "${S}"
32 epatch "${FILESDIR}/${P}-epoll-crosscompile.patch"
33 epatch "${FILESDIR}/${P}-sendfile-crosscompile.patch"
34 epatch "${FILESDIR}/${P}-gnutls-pkgconfig.patch"
35 epatch "${FILESDIR}/${P}-replace-with-sed.patch"
36
37 AT_M4DIR="m4" eautoreconf
38
39 # use cherokee user/group
40 sed -i -e 's|^#\(User \).*$|\1cherokee|' \
41 -e 's|^#\(Group \).*$|\1cherokee|' "${S}/cherokee.conf.sample.pre" || \
42 die "sed cherokee.conf failed"
43 }
44
45 src_compile() {
46 local myconf
47
48 if use ssl && use gnutls ; then
49 myconf="${myconf} --enable-tls=gnutls"
50 elif use ssl && ! use gnutls ; then
51 myconf="${myconf} --enable-tls=openssl"
52 else
53 myconf="${myconf} --disable-tls"
54 fi
55
56 if use static ; then
57 myconf="${myconf} --enable-static --enable-static-module=all"
58 else
59 myconf="${myconf} --disable-static"
60 fi
61
62 local os="Unknown"
63 case "${CHOST}" in
64 *-freebsd*)
65 os="FreeBSD" ;;
66 *-netbsd*)
67 os="NetBSD" ;;
68 *-openbsd*)
69 os="OpenBSD" ;;
70 *)
71 os="Linux" ;;
72 esac
73
74 econf \
75 ${myconf} \
76 $(use_enable pam) \
77 $(use_enable ipv6) \
78 $(use_enable threads pthread) \
79 $(use_enable kernel_linux epoll) \
80 --disable-dependency-tracking \
81 --enable-os-string="Gentoo ${os}" \
82 --with-wwwroot=/var/www/localhost/htdocs \
83 || die "configure failed"
84
85 emake || die "emake failed"
86 }
87
88 src_install () {
89 emake -j1 DESTDIR="${D}" docdir="/usr/share/doc/${PF}/html" install || die "make install failed"
90 dodoc AUTHORS ChangeLog TODO
91
92 newpamd pam.d_cherokee ${PN} || die "newpamd failed"
93 newinitd "${FILESDIR}/${PN}-initd-0.5.6" ${PN} || die "newinitd failed"
94
95 keepdir /etc/cherokee/mods-enabled /etc/cherokee/sites-enabled /var/www/localhost/htdocs
96
97 use coverpage || rm -rf "${D}"/var/www/localhost/htdocs/{index.html,images}
98 }
99
100 pkg_postinst() {
101 enewgroup cherokee
102 enewuser cherokee -1 -1 /var/www/localhost cherokee
103 }

  ViewVC Help
Powered by ViewVC 1.1.20