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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed Apr 4 15:05:37 2012 UTC (2 years, 7 months ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Remove older ebuilds and patches migrated into forked code

(Portage version: 2.1.10.49/cvs/Linux x86_64)

1 # Copyright 1999-2011 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-r8.ebuild,v 1.2 2011/08/03 20:34:00 zmedico Exp $
4
5 EAPI="3"
6
7 WANT_AUTOCONF=2.1
8 inherit eutils flag-o-matic autotools
9
10 MY_P="${P%[a-z]*}"
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
16 LICENSE="BSD"
17 SLOT="0"
18 KEYWORDS="~amd64 ~hppa ~mips ~ppc ~sparc ~x86 ~x86-fbsd"
19 IUSE="static"
20
21 THTTPD_USER=thttpd
22 THTTPD_GROUP=thttpd
23
24 src_prepare() {
25 epatch "${FILESDIR}"/${MY_P}/*.diff
26 epatch "${FILESDIR}"/${P}-glibc-2.10.patch
27 epatch "${FILESDIR}"/${P}-fix-illegal-path-info.patch
28 epatch "${FILESDIR}"/${P}-monolithic-timer.patch
29 epatch "${FILESDIR}"/${P}-use-Status-header.patch
30 epatch "${FILESDIR}"/${P}-use-X-Forwarded-For-header.patch
31 epatch "${FILESDIR}"/${P}-respect-CFLAGS--dont-link-static.patch
32 eautoreconf
33 }
34
35 pkg_setup() {
36 ebegin "Creating thttpd user and group"
37 enewgroup ${THTTPD_GROUP}
38 enewuser ${THTTPD_USER} -1 -1 -1 ${THTTPD_GROUP}
39 eend ${?}
40 }
41
42 src_configure() {
43 use static && append-ldflags -static
44 econf || die "econf failed"
45 }
46
47 src_compile() {
48 emake CC="$(tc-getCC)" || die "emake failed"
49 }
50
51 src_install () {
52 dodir /usr/share/man/man1
53 make prefix="${ED}"/usr \
54 MANDIR="${ED}"/usr/share/man \
55 WEBGROUP=${THTTPD_GROUP} \
56 WEBDIR="${ED}"/var/www/localhost \
57 "$@" install || die "make install failed"
58
59 mv "${ED}"/usr/sbin/{,th_}htpasswd
60 mv "${ED}"/usr/share/man/man1/{,th_}htpasswd.1
61
62 newinitd "${FILESDIR}"/${MY_P}/thttpd.init thttpd
63 newconfd "${FILESDIR}"/${MY_P}/thttpd.confd thttpd
64
65 dodoc README INSTALL TODO
66
67 insinto /etc/logrotate.d
68 newins "${FILESDIR}/thttpd.logrotate" thttpd
69
70 insinto /etc/thttpd
71 doins "${FILESDIR}"/${MY_P}/thttpd.conf.sample
72 }
73
74 pkg_postinst() {
75 elog "Adjust THTTPD_DOCROOT in /etc/conf.d/thttpd !"
76 }

  ViewVC Help
Powered by ViewVC 1.1.20