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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

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.7.2.ebuild,v 1.2 2008/06/20 08:35:51 dev-zero 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_unpack() {
29 unpack ${A}
30 cd "${S}"
31
32 epatch "${FILESDIR}/${P}-signed_unsigned_char.patch"
33 }
34
35 src_compile() {
36 local myconf
37
38 if use ssl && use gnutls ; then
39 myconf="${myconf} --enable-tls=gnutls"
40 elif use ssl && ! use gnutls ; then
41 myconf="${myconf} --enable-tls=openssl"
42 else
43 myconf="${myconf} --disable-tls"
44 fi
45
46 if use static ; then
47 myconf="${myconf} --enable-static --enable-static-module=all"
48 else
49 myconf="${myconf} --disable-static"
50 fi
51
52 local os="Unknown"
53 case "${CHOST}" in
54 *-freebsd*)
55 os="FreeBSD" ;;
56 *-netbsd*)
57 os="NetBSD" ;;
58 *-openbsd*)
59 os="OpenBSD" ;;
60 *)
61 os="Linux" ;;
62 esac
63
64 econf \
65 ${myconf} \
66 $(use_enable pam) \
67 $(use_enable ipv6) \
68 $(use_enable threads pthread) \
69 $(use_enable kernel_linux epoll) \
70 --disable-dependency-tracking \
71 --enable-os-string="Gentoo ${os}" \
72 --with-wwwroot=/var/www/localhost/htdocs \
73 --prefix=/usr \
74 --sysconfdir=/etc \
75 --localstatedir=/var \
76 || die "configure failed"
77
78 emake || die "emake failed"
79 }
80
81 src_install () {
82 emake -j1 DESTDIR="${D}" docdir="/usr/share/doc/${PF}/html" install || die "make install failed"
83 dodoc AUTHORS ChangeLog TODO
84
85 newpamd pam.d_cherokee ${PN} || die "newpamd failed"
86 newinitd "${FILESDIR}/${PN}-initd-0.6" ${PN} || die "newinitd failed"
87
88 dodir /usr/share/doc/${PF}/contrib
89 insinto /usr/share/${PF}/contrib
90 doins contrib/05to06.py
91 doins contrib/06to07.py
92
93 keepdir /etc/cherokee/mods-enabled /etc/cherokee/sites-enabled /var/www/localhost/htdocs
94
95 use coverpage || rm -rf "${D}"/var/www/localhost/htdocs/{index.html,images}
96 use admin || rm -rf "${D}"/usr/sbin/admin "${D}"/usr/share/cherokee/admin
97
98 }
99
100 pkg_postinst() {
101 enewgroup cherokee
102 enewuser cherokee -1 -1 /var/www/localhost cherokee
103
104 if use admin ; then
105 echo ""
106 elog "Just run 'cherokee-admin' and go to: http://localhost:9090"
107 echo ""
108 else
109 echo ""
110 elog "Try USE=admin if you want a easy way to configure cherokee."
111 echo ""
112 fi
113
114 echo ""
115 elog "Cherokee conf is quite different in 0.6.x and 0.7.x series. You must use"
116 elog " cherokee-admin to create a new config or use /usr/share/doc/${PF}/contrib/05to06.py"
117 elog " or 06to07.py to export your old config (not ever works)."
118 echo ""
119 }

  ViewVC Help
Powered by ViewVC 1.1.20