/[gentoo-x86]/www-servers/monkeyd/monkeyd-1.0.1-r1.ebuild
Gentoo

Contents of /www-servers/monkeyd/monkeyd-1.0.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Aug 8 12:35:24 2012 UTC (2 years, 4 months ago) by blueness
Branch: MAIN
Changes since 1.1: +8 -5 lines
Add keepdir for empty directories

(Portage version: 2.1.10.65/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-servers/monkeyd/monkeyd-1.0.1-r1.ebuild,v 1.1 2012/08/08 12:17:18 blueness Exp $
4
5 EAPI="4"
6
7 inherit toolchain-funcs depend.php multilib
8
9 MY_P="${PN/d}-${PV}"
10 DESCRIPTION="A small, fast, and scalable web server"
11 HOMEPAGE="http://www.monkey-project.com/"
12 SRC_URI="http://monkey-project.com/releases/${PV:0:3}/${MY_P}.tar.gz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
17 IUSE="php"
18
19 RDEPEND="php? ( virtual/httpd-php )"
20
21 S="${WORKDIR}/${MY_P}"
22
23 WEBROOT="/var/www/localhost"
24
25 pkg_setup() {
26 use php && require_php_cgi
27 }
28
29 src_prepare() {
30 # Don't install the banana script, we use ${FILESDIR}/monkeyd.initd
31 sed -i '/install -m 755 bin\/banana/d' configure || die "sed banana"
32
33 # Don't explicitly strip files
34 sed -i -e '/$STRIP /d' -e 's/install -s -m 644/install -m 755/' configure || die
35 }
36
37 src_configure() {
38 # Non-autotools configure
39 ./configure \
40 --prefix=/usr \
41 --bindir=/usr/bin \
42 --datadir=${WEBROOT}/htdocs \
43 --logdir=/var/log/${PN} \
44 --mandir=/usr/share/man \
45 --plugdir=/usr/$(get_libdir)/monkeyd/plugins \
46 --sysconfdir=/etc/${PN} \
47 || die
48 }
49
50 src_compile() {
51 emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
52
53 # Don't install the banana script man page
54 rm "${S}"/man/banana.1
55 }
56
57 src_install() {
58 default
59
60 if use php ; then
61 sed -i -e '/^#AddScript application\/x-httpd-php/s:^#::' "${D}"/etc/monkeyd/monkey.conf || die
62 sed -i -e 's:/home/my_home/php/bin/php:/usr/bin/php-cgi:' "${D}"/etc/monkeyd/monkey.conf || die
63 fi
64
65 sed -i -e "s:/var/log/monkeyd/monkey.pid:/var/run/monkey.pid:" "${D}"/etc/monkeyd/monkey.conf || die
66 newinitd "${FILESDIR}"/monkeyd.initd monkeyd
67 newconfd "${FILESDIR}"/monkeyd.confd monkeyd
68
69 #move htdocs to docdir, bug #429632
70 docompress -x /usr/share/doc/"${PF}"/htdocs.dist
71 mv "${D}"${WEBROOT}/htdocs \
72 "${D}"/usr/share/doc/"${PF}"/htdocs.dist
73 mkdir "${D}"${WEBROOT}/htdocs
74
75 keepdir \
76 /var/log/monkeyd \
77 ${WEBROOT}/htdocs
78 }

  ViewVC Help
Powered by ViewVC 1.1.20