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

Contents of /www-servers/monkeyd/monkeyd-1.1.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Tue Oct 30 12:01:15 2012 UTC (20 months, 3 weeks ago) by ago
Branch: MAIN
Changes since 1.3: +2 -2 lines
Stable for amd64, wrt bug #439346

(Portage version: 2.1.11.9/cvs/Linux x86_64)

1 blueness 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 ago 1.4 # $Header: /var/cvsroot/gentoo-x86/www-servers/monkeyd/monkeyd-1.1.1.ebuild,v 1.3 2012/10/23 09:46:28 blueness Exp $
4 blueness 1.1
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 ago 1.4 KEYWORDS="amd64 arm ~mips ppc ppc64 ~x86"
17 blueness 1.1 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