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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Apr 1 12:50:05 2009 UTC (5 years, 3 months ago) by bass
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
New version and new USE flags.
(Portage version: 2.1.6.7/cvs/Linux i686)

1 # Copyright 1999-2008 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.8.1.ebuild,v 1.1 2008/09/02 19:58:52 bass 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 admin"
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 admin? ( dev-lang/python )"
26 DEPEND="${RDEPEND}"
27
28 src_compile() {
29 local myconf
30
31 if use ssl && use gnutls ; then
32 myconf="${myconf} --enable-tls=gnutls"
33 elif use ssl && ! use gnutls ; then
34 myconf="${myconf} --enable-tls=openssl"
35 else
36 myconf="${myconf} --disable-tls"
37 fi
38
39 if use static ; then
40 myconf="${myconf} --enable-static --enable-static-module=all"
41 else
42 myconf="${myconf} --disable-static"
43 fi
44
45 local os="Unknown"
46 case "${CHOST}" in
47 *-freebsd*)
48 os="FreeBSD" ;;
49 *-netbsd*)
50 os="NetBSD" ;;
51 *-openbsd*)
52 os="OpenBSD" ;;
53 *)
54 os="Linux" ;;
55 esac
56
57 econf \
58 ${myconf} \
59 $(use_enable pam) \
60 $(use_enable ipv6) \
61 $(use_enable threads pthread) \
62 $(use_enable kernel_linux epoll) \
63 --disable-dependency-tracking \
64 --enable-os-string="Gentoo ${os}" \
65 --with-wwwroot=/var/www/localhost/htdocs \
66 --prefix=/usr \
67 --sysconfdir=/etc \
68 --localstatedir=/var \
69 || die "configure failed"
70
71 emake || die "emake failed"
72 }
73
74 src_install () {
75 emake -j1 DESTDIR="${D}" docdir="/usr/share/doc/${PF}/html" install || die "make install failed"
76 dodoc AUTHORS ChangeLog TODO
77
78 newpamd pam.d_cherokee ${PN} || die "newpamd failed"
79 newinitd "${FILESDIR}/${PN}-initd-0.6" ${PN} || die "newinitd failed"
80
81 dodir /usr/share/doc/${PF}/contrib
82 insinto /usr/share/${PF}/contrib
83 doins contrib/05to06.py
84 doins contrib/06to07.py
85
86 keepdir /etc/cherokee/mods-enabled /etc/cherokee/sites-enabled /var/www/localhost/htdocs
87
88 use coverpage || rm -rf "${D}"/var/www/localhost/htdocs/{index.html,images}
89 use admin || rm -rf "${D}"/usr/sbin/admin "${D}"/usr/share/cherokee/admin
90
91 }
92
93 pkg_postinst() {
94 enewgroup cherokee
95 enewuser cherokee -1 -1 /var/www/localhost cherokee
96
97 if use admin ; then
98 echo ""
99 elog "Just run 'cherokee-admin' and go to: http://localhost:9090"
100 echo ""
101 else
102 echo ""
103 elog "Try USE=admin if you want a easy way to configure cherokee."
104 echo ""
105 fi
106 }

  ViewVC Help
Powered by ViewVC 1.1.20