Gentoo Archives: gentoo-commits

From: "Anthony G. Basile (blueness)" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-servers/monkeyd: monkeyd-1.2.0-r1.ebuild ChangeLog monkeyd-1.2.0.ebuild
Date: Wed, 05 Jun 2013 20:53:20
Message-Id: 20130605205315.194E42171D@flycatcher.gentoo.org
1 blueness 13/06/05 20:53:15
2
3 Modified: ChangeLog
4 Added: monkeyd-1.2.0-r1.ebuild
5 Removed: monkeyd-1.2.0.ebuild
6 Log:
7 Rev bump 1.2.0 to force the last fix down to the users
8
9 (Portage version: 2.1.11.62/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)
10
11 Revision Changes Path
12 1.57 www-servers/monkeyd/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/monkeyd/ChangeLog?rev=1.57&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/monkeyd/ChangeLog?rev=1.57&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/monkeyd/ChangeLog?r1=1.56&r2=1.57
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-servers/monkeyd/ChangeLog,v
21 retrieving revision 1.56
22 retrieving revision 1.57
23 diff -u -r1.56 -r1.57
24 --- ChangeLog 5 Jun 2013 20:45:45 -0000 1.56
25 +++ ChangeLog 5 Jun 2013 20:53:14 -0000 1.57
26 @@ -1,6 +1,12 @@
27 # ChangeLog for www-servers/monkeyd
28 # Copyright 1999- Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/www-servers/monkeyd/ChangeLog,v 1.56 2013/06/05 20:45:45 blueness Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/www-servers/monkeyd/ChangeLog,v 1.57 2013/06/05 20:53:14 blueness Exp $
31 +
32 +*monkeyd-1.2.0-r1 (05 Jun 2013)
33 +
34 + 05 Jun 2013; Anthony G. Basile <blueness@g.o> +monkeyd-1.2.0-r1.ebuild,
35 + -monkeyd-1.2.0.ebuild:
36 + Rev bump 1.2.0 to force the last fix down to the users
37
38 05 Jun 2013; Anthony G. Basile <blueness@g.o>
39 +files/monkeyd-fix-DoS-headers-parser.patch, monkeyd-1.2.0.ebuild:
40
41
42
43 1.1 www-servers/monkeyd/monkeyd-1.2.0-r1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/monkeyd/monkeyd-1.2.0-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/monkeyd/monkeyd-1.2.0-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: monkeyd-1.2.0-r1.ebuild
49 ===================================================================
50 # Copyright 1999- Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/www-servers/monkeyd/monkeyd-1.2.0-r1.ebuild,v 1.1 2013/06/05 20:53:14 blueness Exp $
53
54 EAPI="5"
55
56 inherit toolchain-funcs depend.php multilib eutils
57
58 MY_P="${PN/d}-${PV}"
59 DESCRIPTION="A small, fast, and scalable web server"
60 HOMEPAGE="http://www.monkey-project.com/"
61 SRC_URI="http://monkey-project.com/releases/${PV:0:3}/${MY_P}.tar.gz"
62
63 LICENSE="GPL-2"
64 SLOT="0"
65 KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
66
67 # ssl is broken, so we turn it off until fixed
68 IUSE="-debug php minimal uclibc monkeyd_plugins_auth monkeyd_plugins_cheetah cgi monkeyd_plugins_dirlisting fastcgi +monkeyd_plugins_liana monkeyd_plugins_logger monkeyd_plugins_mandril"
69
70 # uclibc is often compiled without backtrace info so we should
71 # force this off. If someone complains, consider relaxing it.
72 # ssl is borken, so we remove "ssl? ( monkeyd_plugins_polarssl )"
73 REQUIRED_USE="uclibc? ( !debug )"
74
75 RDEPEND="php? ( dev-lang/php )"
76
77 S="${WORKDIR}/${MY_P}"
78
79 WEBROOT="/var/www/localhost"
80
81 pkg_setup() {
82 use php && require_php_cgi
83
84 if use debug; then
85 ewarn
86 ewarn "\033[1;33m**************************************************\033[00m"
87 ewarn "Do not use debug in production!"
88 ewarn "\033[1;33m**************************************************\033[00m"
89 ewarn
90 fi
91 }
92
93 src_prepare() {
94 # Fixes security issue, bug #472400, CVE-2013-3843
95 epatch "${FILESDIR}"/${PN}-fix-DoS-headers-parser.patch
96
97 # Don't install the banana script, we use ${FILESDIR}/monkeyd.initd instead
98 sed -i '/Creating bin\/banana/d' configure || die "No configure file"
99 sed -i '/create_banana_script bindir/d' configure || die "No configure file"
100
101 # Don't explicitly strip files
102 sed -i -e '/$STRIP /d' -e 's/install -s -m 644/install -m 755/' configure || die "No configure file"
103
104 # We don't need the includes, sym link to libmonkey.so, or monkey.cp when not installing the .so
105 use minimal && {
106 sed -i '/install -d \\$(INCDIR)/d' configure || die "No configure file"
107 sed -i '/install -m 644 src\/include\/\*.h \\$(INCDIR)/d' configure || die "No configure file"
108 sed -i '/ln -sf/d' configure || die "No configure file"
109 sed -i '/install -d \\$(LIBDIR)\/pkgconfig/d' configure || die "No configure file"
110 sed -i '/install -m 644 monkey.pc \\$(LIBDIR)\/pkgconfig/d' configure || die "No configure file"
111 }
112
113 # Unquiet build
114 sed -i '/^CC\s/d' configure || die "No configure file"
115 sed -i 's/^\(CC_QUIET=\).*/\1 \\\$(CC)/' configure || die "No configure file"
116 sed -i 's/^\(.*MAKE.*\)-s\(.*\)$/\1\2/' configure || die "No configure file"
117 makes=$(find . -iname Makefile.in)
118 for f in ${makes}; do
119 sed -i '/^CC\s/d' $f || die "No file "$f
120 sed -i 's/^\(CC_QUIET=\).*/\1 \$(CC)/' $f || die "No file "$f
121 done
122 }
123
124 src_configure() {
125 local myconf=""
126
127 use uclibc && myconf+=" --uclib-mode"
128
129 if use debug; then
130 myconf+=" --debug --trace"
131 else
132 myconf+=" --no-backtrace"
133 fi
134
135 use minimal || myconf+=" --enable-shared"
136
137 local enable_plugins=""
138 local disable_plugins=""
139 for p in ${PLUGINS}; do
140 cp=${p/monkeyd_plugins_/}
141 use $p && enable_plugins+="${cp}," || disable_plugins+="${cp},"
142 done
143 myconf+=" --enable-plugins=${enable_plugins%,} --disable-plugins=${disable_plugins%,}"
144
145 # Non-autotools configure
146 ./configure \
147 --prefix=/usr \
148 --bindir=/usr/bin \
149 --datadir=${WEBROOT}/htdocs \
150 --logdir=/var/log/${PN} \
151 --mandir=/usr/share/man \
152 --libdir=/usr/$(get_libdir) \
153 --plugdir=/usr/$(get_libdir)/monkeyd/plugins \
154 --sysconfdir=/etc/${PN} \
155 --platform="generic" \
156 ${myconf} \
157 || die
158 }
159
160 src_compile() {
161 emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
162
163 # Don't install the banana script man page
164 rm "${S}"/man/banana.1
165 }
166
167 src_install() {
168 default
169
170 if use php ; then
171 sed -i -e '/^#AddScript application\/x-httpd-php/s:^#::' "${D}"/etc/monkeyd/monkey.conf || die
172 sed -i -e 's:/home/my_home/php/bin/php:/usr/bin/php-cgi:' "${D}"/etc/monkeyd/monkey.conf || die
173 fi
174
175 sed -i -e "s:/var/log/monkeyd/monkey.pid:/var/run/monkey.pid:" "${D}"/etc/monkeyd/monkey.conf || die
176 newinitd "${FILESDIR}"/monkeyd.initd monkeyd
177 newconfd "${FILESDIR}"/monkeyd.confd monkeyd
178
179 #move htdocs to docdir, bug #429632
180 docompress -x /usr/share/doc/"${PF}"/htdocs.dist
181 mv "${D}"${WEBROOT}/htdocs \
182 "${D}"/usr/share/doc/"${PF}"/htdocs.dist
183 mkdir "${D}"${WEBROOT}/htdocs
184
185 keepdir \
186 /var/log/monkeyd \
187 ${WEBROOT}/htdocs
188 }