/[gentoo-x86]/www-servers/thttpd/thttpd-2.25b-r2.ebuild
Gentoo

Contents of /www-servers/thttpd/thttpd-2.25b-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed Jul 5 18:15:45 2006 UTC (8 years ago) by genstef
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
remove old versions that use the obsolete php5-sapi-r2 eclass and thus xml2 IUSE, bug 116346
(Portage version: 2.1.1_pre2-r2)
 (Unsigned Manifest commit)

1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-servers/thttpd/thttpd-2.25b-r2.ebuild,v 1.2 2005/03/27 17:27:55 stuart Exp $
4
5 PHPSAPI="thttpd"
6
7 MY_PHP_P="php-5.0.3"
8 MY_THTTPD_P="${P%[a-z]*}"
9
10 inherit php5-sapi-r2 flag-o-matic
11
12 DESCRIPTION="Small and fast multiplexing webserver."
13 HOMEPAGE="http://www.acme.com/software/thttpd/"
14 SRC_URI="http://www.acme.com/software/thttpd/${P}.tar.gz
15 php? ( http://www.php.net/distributions/${MY_PHP_P}.tar.gz )"
16
17 LICENSE="BSD"
18 SLOT="0"
19 KEYWORDS="~x86 ~ppc"
20 IUSE="static php"
21
22 DEPEND="virtual/libc"
23
24 PHP_S="${WORKDIR}/${MY_PHP_P}"
25
26 pkg_setup() {
27 if useq php ; then
28 php5-sapi-r2_pkg_setup
29 fi
30 }
31
32 src_unpack() {
33 unpack ${A}
34
35 if useq php ; then
36 cd ${WORKDIR}
37 epatch ${FILESDIR}/${MY_THTTPD_P}/php-5.0.3-thttpd-2.25b.patch
38 epatch ${FILESDIR}/php-5.0.3-IOV.patch
39 php5-sapi-r2_src_unpack
40 fi
41 }
42
43 src_compile() {
44 # compile PHP5 first
45 if useq php ; then
46 my_conf="--with-thttpd=${S}"
47 php5-sapi-r2_src_compile
48 php5-sapi-r2_src_install
49 fi
50
51 cd ${S}
52
53 ## TODO: what to do with IPv6?
54
55 append-ldflags -Wl,-z,now
56 use static && append-ldflags -static
57
58 econf || die "econf failed"
59 emake || die "emake failed"
60 }
61
62 src_install () {
63 if useq php ; then
64 # we have to do the install again, because Portage wipes anything
65 # put into $D during src_compile
66 #
67 # ideally, we need to improve the eclass
68 php5-sapi-r2_src_install
69 fi
70
71 cd ${S}
72 dodir /usr/share/man/man1
73 make prefix=${D}/usr \
74 MANDIR=${D}/usr/share/man \
75 WEBGROUP=nogroup \
76 WEBDIR=${D}/var/www/localhost \
77 "$@" install || die "make install failed"
78
79 mv ${D}/usr/sbin/{,th_}htpasswd
80 mv ${D}/usr/share/man/man1/{,th_}htpasswd.1
81
82 newinitd ${FILESDIR}/${MY_THTTPD_P}/thttpd.init thttpd
83 newconfd ${FILESDIR}/${MY_THTTPD_P}/thttpd.confd thttpd
84
85 dodoc README INSTALL TODO
86
87 insinto /etc/thttpd
88 doins ${FILESDIR}/${MY_THTTPD_P}/thttpd.conf.sample
89 }
90
91 pkg_postinst() {
92 if useq php ; then
93 php5-sapi-r2_pkg_postinst
94 fi
95
96 einfo "Adjust THTTPD_DOCROOT in /etc/conf.d/thttpd !"
97 }

  ViewVC Help
Powered by ViewVC 1.1.20