diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /www-servers/monkeyd |
reinit the tree, so we can have metadata
Diffstat (limited to 'www-servers/monkeyd')
-rw-r--r-- | www-servers/monkeyd/Manifest | 11 | ||||
-rw-r--r-- | www-servers/monkeyd/files/monkeyd-1.6.8-system-mbedtls.patch | 19 | ||||
-rw-r--r-- | www-servers/monkeyd/files/monkeyd-1.6.9-fix-pidfile.patch | 12 | ||||
-rw-r--r-- | www-servers/monkeyd/files/monkeyd.confd | 5 | ||||
-rw-r--r-- | www-servers/monkeyd/files/monkeyd.initd | 25 | ||||
-rw-r--r-- | www-servers/monkeyd/files/monkeyd.initd-r1 | 25 | ||||
-rw-r--r-- | www-servers/monkeyd/metadata.xml | 12 | ||||
-rw-r--r-- | www-servers/monkeyd/monkeyd-1.6.9-r1.ebuild | 152 | ||||
-rw-r--r-- | www-servers/monkeyd/monkeyd-9999.ebuild | 152 |
9 files changed, 413 insertions, 0 deletions
diff --git a/www-servers/monkeyd/Manifest b/www-servers/monkeyd/Manifest new file mode 100644 index 000000000000..9b14831d53fe --- /dev/null +++ b/www-servers/monkeyd/Manifest @@ -0,0 +1,11 @@ +AUX monkeyd-1.6.8-system-mbedtls.patch 672 SHA256 70811bf0c650526b6b17d2c2af8e6223e7f1f0dfd1c5d1e46de9fd2e2fbb52a0 SHA512 e5eed5eb1d5810b56c94280419859bcb8f8d5d2277965ffc17e00c9074da282c2197ac4ed7e029a57264722f8e1df43cdc5aae4cbf7900e537c60802ad397647 WHIRLPOOL 3ead8d2366ef7dcd2b8cb8de9401055cb7ff1da23cadd1728d9a349f5aa7ed4beca66ed38ce9da4ca398bd4e29c16b500c7f5ee808051983eafd50510372402c +AUX monkeyd-1.6.9-fix-pidfile.patch 526 SHA256 12c5d7422ea83923b5e1f9441cadf1f1c7d3d7decead80e394430183d0dc39a9 SHA512 73026d23723b95316f83ec7c9c49be014c3a52b86bf76cc5b4273ac4393f968d6123bff48afda6478b5d5409eb154d25eeb5f51fc20db53f4d679fdf3cbb35a2 WHIRLPOOL 02bb81d205904032fadd932ba8c5abe9315f6e34cb175c30ed8e135cd5cf5952b7a279322e269fac8b14586e84ed76244589487060c6abb68c1d59e93fda54e2 +AUX monkeyd.confd 172 SHA256 bfd675e83ea839282fa60ff7b137933b47e4beeed3f22703a79d4201580de508 SHA512 8ca7312a80440e908ef8c6297870411f4978c56fe8ad09589d1bb56e9d545d086a53f07120d5cc14c6042a83755730ac6fc4839020a5159eb054eb34d3f264e7 WHIRLPOOL a806a4fabc56310ace71725cba2432abf1d5d8c905aa90d5c9cf88b5006a0c5e3035a9117c5fd3bc458ac8c3df828edd9c0ab58ce7089657dbe11ecd5f6c643e +AUX monkeyd.initd 601 SHA256 2a4f288f0fb9a8901091655a1fb52351cd8f46c2426830b6c45a02bd1082b4b4 SHA512 e356742c537b5bbc8d9696e5fdad0c08d93ace5085f8939fa50d97498ebe0d85712af5da675e76c642296856768081ee14d6f0d3d73a17ce4642cf46e9056a79 WHIRLPOOL f4b87bbd19c8315b1cc9ac4719f1ec9b821cc304bfbf8da510df0965cdda038f33924542216a3b3550b56688862e18e8a393510170f6032e891589a3087a0036 +AUX monkeyd.initd-r1 608 SHA256 7bf2d1c95b93e70355f3530598c95dad1ead96e87760463a455c62a9080dc2d8 SHA512 d1a30f0033d9f2a0957028a6873b71903d8051340ac272ccbaf12daba9a89bf0c2e476b8aa22a0e60697ffd10ab5c1d6a4aa0ff7b204f8b4adc76ebe91b8abaa WHIRLPOOL 27c9b84400eea25d7853d1fa1d6e2f6cdb1acc3f5497c19e575946f1ebdbaee7adfa65221f39239cb0cdfa6b08d2f4f2bc4ba1c4806721b567a3ac73856d5d2b +DIST monkey-1.6.9.tar.gz 1972040 SHA256 f1122e89cda627123286542b0a18fcaa131cbe9d4f5dd897d9455157289148fb SHA512 3540a17fffe57a9d4b88b6243c634dcf6a27ed894ae2a0d5d42a4881221a9d59ae67d4c7fcf087535360d20ccdadab16947cf3a7dc6d4e864d487f598eb0ba62 WHIRLPOOL c0af688a0a9d8d82a6dc405a79640738ebd62fe1de8a0aad715c1356c73a499ff5854f2a16d69e9a1022bfd02ca04dc17163011a27e53b438ca0e32c9b824f2b +EBUILD monkeyd-1.6.9-r1.ebuild 4115 SHA256 27f3f295b131ed3cdf45a8eb4b54a00b7bfffa28b894c90e38b62a0d5d7bd9d8 SHA512 ab02c02930a25e73937fd73be03abd15c54fc16f0e30c0a85f8bcc0804ad7a5b0aeea2c57dda6294ce12fae56bfd4bb0b9d6f468346aabf1f278d97abde4046a WHIRLPOOL dcdaffe9c7c5977e93e7a664c1b1f0f2bb48d111752476cce38bbfa5c851d061671548c35873f670a5bf03efade4961efbf0fe5cf29431c471117e56e6d41b39 +EBUILD monkeyd-9999.ebuild 4105 SHA256 7126ceb31edded7042bf690969c71c49aa32c0e416142ff02b30c51fb88f33b6 SHA512 5eeca2050e7948d32f073a18dc5b49a84aa1ede42a17811c139341d05fccf6e7a506bb8f73a9b8928a77f255fa47d28415b31519d08c987c3a21a621599e1ee9 WHIRLPOOL 544606655352ece2e65c6dbcabae2011bb474d121c4c4d73659d994ef066fba81f646ad6d43abae90e8d952ad14620ae4b26906f2ea3dcf29c8b6360d5a8409c +MISC ChangeLog 8220 SHA256 5822b22bab9b7c1ffd1bdeadc854c586af71c89912960c82ea35ef743d8faa35 SHA512 af827d231d530daf2b5e3d2551e65075c1a0def38419f8a01b0550c4e0b9ea417b72358643d49fe14a957dccd7f94788a842251fad390a5b72d4b80e441fc548 WHIRLPOOL 6543554ca201731b083a351a738532f6366087c4fca7f5927e01c81bbd9bea1f4f37c8921cac891b23100278e5111af930303a746c0ed7e3c0dc60c49d174469 +MISC ChangeLog-2015 14869 SHA256 9636aca8a6170d58e5dff30ce7613efabc1812475396700a9b4894fccec5cccf SHA512 e56ecdfbe16c9789dce47ddb08ce12101995eae785f0048343ff3a0f9bc7393c4d2d482ffd9498a44ea78d04c391fc327a9aa6b2e5aaeae9b2863a216c4612a8 WHIRLPOOL 5a3aad6e4dab6f0bb76a80aa2c481a0428232a306ef261e871e40e25b13ca96670b03df924d7028b96197bc56b836d586d7494486c16c42a4025c8903a246a1f +MISC metadata.xml 394 SHA256 068168d91dc6999fbb8105282aa96ae5b3c15a172c667b11cb6a81d8e360aff6 SHA512 9431b7f6722baa7c18ab2341a35aed3978f54e92c0b2a686bef0f7dc20934a14f93b6a1f1208b47b720f11e5f901e634c3b278eb540dfcc06c3a7c668fc0a209 WHIRLPOOL d959efd9ed61f7122828bf30338e42ab4408d5588c398171b933d140618590586abf2be006292b4d1a1b07c813a1fb7edbb8df0b590c881024fc3ef41bde81d2 diff --git a/www-servers/monkeyd/files/monkeyd-1.6.8-system-mbedtls.patch b/www-servers/monkeyd/files/monkeyd-1.6.8-system-mbedtls.patch new file mode 100644 index 000000000000..6b7ca5473ee0 --- /dev/null +++ b/www-servers/monkeyd/files/monkeyd-1.6.8-system-mbedtls.patch @@ -0,0 +1,19 @@ +diff -Naur monkey-1.6.3.orig/plugins/tls/CMakeLists.txt monkey-1.6.3/plugins/tls/CMakeLists.txt +--- monkey-1.6.3.orig/plugins/tls/CMakeLists.txt 2015-10-13 13:23:34.000000000 -0400 ++++ monkey-1.6.3/plugins/tls/CMakeLists.txt 2015-10-14 21:28:27.941930485 -0400 +@@ -2,15 +2,6 @@ + tls.c + ) + +-if(NOT WITH_MBEDTLS_SHARED) +- option(ENABLE_TESTING OFF) +- option(ENABLE_PROGRAMS OFF) +- option(INSTALL_MBEDTLS_HEADERS OFF) +- set(MK_MBEDTLS_SRC ../../deps/mbedtls-2.2.1) +- add_subdirectory(${MK_MBEDTLS_SRC} ${CMAKE_BINARY_DIR}/mbedtls-2.2.1) +- include_directories(${MK_MBEDTLS_SRC}/include) +-endif() +- + MONKEY_PLUGIN(tls "${src}") + + MONKEY_PLUGIN_LINK_LIB(tls mbedtls) diff --git a/www-servers/monkeyd/files/monkeyd-1.6.9-fix-pidfile.patch b/www-servers/monkeyd/files/monkeyd-1.6.9-fix-pidfile.patch new file mode 100644 index 000000000000..82550aef4d09 --- /dev/null +++ b/www-servers/monkeyd/files/monkeyd-1.6.9-fix-pidfile.patch @@ -0,0 +1,12 @@ +diff -Naur monkey-1.6.9.orig/CMakeLists.txt monkey-1.6.9/CMakeLists.txt +--- monkey-1.6.9.orig/CMakeLists.txt 2016-06-04 19:16:47.000000000 -0400 ++++ monkey-1.6.9/CMakeLists.txt 2016-07-01 13:08:51.237213196 -0400 +@@ -285,7 +285,7 @@ + + # Custom PIDPATH + if(NOT PID_PATH) +- set(MK_PATH_PIDPATH ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/run/ CACHE STRING "Server PID path") ++ set(MK_PATH_PIDPATH /run/ CACHE STRING "Server PID path") + else() + set(MK_PATH_PIDPATH ${PID_PATH} CACHE STRING "Server PID path") + endif() diff --git a/www-servers/monkeyd/files/monkeyd.confd b/www-servers/monkeyd/files/monkeyd.confd new file mode 100644 index 000000000000..818957c9792c --- /dev/null +++ b/www-servers/monkeyd/files/monkeyd.confd @@ -0,0 +1,5 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Add any additional command line arguments here +MONKEY_ARGS="" diff --git a/www-servers/monkeyd/files/monkeyd.initd b/www-servers/monkeyd/files/monkeyd.initd new file mode 100644 index 000000000000..c44975ddda24 --- /dev/null +++ b/www-servers/monkeyd/files/monkeyd.initd @@ -0,0 +1,25 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +DAEMON="/usr/bin/monkey" +CONFFILE="/etc/monkeyd/monkey.conf" + +depend() { + use net +} + +start() { + ebegin "Starting monkeyd" + start-stop-daemon --start --exec "${DAEMON}" -- "-D" "${MONKEY_ARGS}" >/dev/null + eend $? +} + +stop() { + ebegin "Stopping monkeyd" + local PORT=$(awk '/^ *Port/ { print $2 }' "${CONFFILE}") + local PIDFILE=$(awk '/^ *PidFile/ { print $2 }' "${CONFFILE}") + PIDFILE="${PIDFILE}"."${PORT}" + start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" + eend $? +} diff --git a/www-servers/monkeyd/files/monkeyd.initd-r1 b/www-servers/monkeyd/files/monkeyd.initd-r1 new file mode 100644 index 000000000000..6ec67e11435c --- /dev/null +++ b/www-servers/monkeyd/files/monkeyd.initd-r1 @@ -0,0 +1,25 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +DAEMON="/usr/sbin/monkey" +CONFFILE="/etc/monkeyd/monkey.conf" + +depend() { + use net +} + +start() { + ebegin "Starting monkeyd" + local PIDFILE=$(awk '/^ *PidFile/ { print $2 }' "${CONFFILE}") + mkdir -p $(dirname ${PIDFILE}) + start-stop-daemon --start --exec "${DAEMON}" -- "-D" "${MONKEY_ARGS}" >/dev/null + eend $? +} + +stop() { + ebegin "Stopping monkeyd" + local PIDFILE=$(awk '/^ *PidFile/ { print $2 }' "${CONFFILE}") + start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" + eend $? +} diff --git a/www-servers/monkeyd/metadata.xml b/www-servers/monkeyd/metadata.xml new file mode 100644 index 000000000000..1e7b130da6f1 --- /dev/null +++ b/www-servers/monkeyd/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>blueness@gentoo.org</email> + <name>Anthony G. Basile</name> + </maintainer> + <use> + <flag name="debug">Enable lots of debugging info</flag> + <flag name="static-plugins">Build statically linked plugins</flag> + </use> +</pkgmetadata> diff --git a/www-servers/monkeyd/monkeyd-1.6.9-r1.ebuild b/www-servers/monkeyd/monkeyd-1.6.9-r1.ebuild new file mode 100644 index 000000000000..67bcf7351327 --- /dev/null +++ b/www-servers/monkeyd/monkeyd-1.6.9-r1.ebuild @@ -0,0 +1,152 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit eutils flag-o-matic toolchain-funcs user multilib + +DESCRIPTION="A small, fast, and scalable web server" +HOMEPAGE="http://www.monkey-project.com/" +MY_P="${PN/d}-${PV}" +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/monkey/monkey.git" + inherit git-2 + KEYWORDS="amd64 arm ppc64" +else + SRC_URI="http://monkey-project.com/releases/${PV:0:3}/${MY_P}.tar.gz" + KEYWORDS="amd64 arm ~mips ppc ppc64 x86" +fi + +LICENSE="GPL-2" +SLOT="0" + +# jemalloc is also off until we figure out how to work CMakeLists.txt magic. +#IUSE="cgi -debug fastcgi jemalloc php static-plugins ${PLUGINS}" + +PLUGINS="monkeyd_plugins_auth monkeyd_plugins_cheetah monkeyd_plugins_dirlisting +monkeyd_plugins_liana monkeyd_plugins_logger monkeyd_plugins_mandril monkeyd_plugins_tls" +IUSE="cgi -debug fastcgi php static-plugins ${PLUGINS}" + +# uclibc is often compiled without backtrace info so we should +# force this off. If someone complains, consider relaxing it. +REQUIRED_USE=" + monkeyd_plugins_tls? ( !static-plugins ) + elibc_uclibc? ( !debug ) + cgi? ( php )" + +#DEPEND="jemalloc? ( >=dev-libs/jemalloc-3.3.1 )" +DEPEND=" + dev-util/cmake + monkeyd_plugins_tls? ( net-libs/mbedtls:= )" +RDEPEND=" + php? ( dev-lang/php ) + cgi? ( dev-lang/php[cgi] )" + +S="${WORKDIR}/${MY_P}" + +WEBROOT="/var/www/localhost" + +pkg_preinst() { + enewgroup monkeyd + enewuser monkeyd -1 -1 /var/tmp/monkeyd monkeyd +} + +pkg_setup() { + if use debug; then + ewarn + ewarn "\033[1;33m**************************************************\033[00m" + ewarn "Do not use debug in production!" + ewarn "\033[1;33m**************************************************\033[00m" + ewarn + fi +} + +src_prepare() { + # Unconditionally get rid of the bundled jemalloc + rm -rf "${S}"/deps + epatch "${FILESDIR}"/${PN}-1.6.9-fix-pidfile.patch + epatch "${FILESDIR}"/${PN}-1.6.8-system-mbedtls.patch +} + +src_configure() { + local myconf="" + + use elibc_uclibc && myconf+=" --uclib-mode" + use elibc_musl && myconf+=" --musl-mode" + + #use jemalloc || myconf+=" --malloc-libc" + myconf+=" --malloc-libc" + + if use debug; then + myconf+=" --debug --trace" + else + myconf+=" --no-backtrace" + fi + + local enable_plugins="" + local disable_plugins="" + # We use 'cgi' and 'fastcgi' because they are global flags + # instead of the corresponding monkeyd_plugins_* + use cgi && enable_plugins+="cgi," || disable_plugins+="cgi," + use fastcgi && enable_plugins+="fastcgi," || disable_plugins+="fastcgi," + # For the rest, we scan the monkeyd_plugins_* and parse out the plugin name. + local p + for p in ${PLUGINS}; do + pp=${p/+/} + cp=${pp/monkeyd_plugins_/} + use $pp && enable_plugins+="${cp}," || disable_plugins+="${cp}," + done + myconf+=" --enable-plugins=${enable_plugins%,} --disable-plugins=${disable_plugins%,}" + if use static-plugins; then + myconf+=" --static-plugins=${enable_plugins%,}" + fi + + # For O_CLOEXEC which is guarded by _GNU_SOURCE in uClibc, + # but shouldn't because it is POSIX. This needs to be fixed + # in uClibc. Also, we really should us append-cppflags but + # monkey's build system doesn't respect CPPFLAGS. This needs + # to be fixed in monkey. + use elibc_uclibc && append-cflags -D_GNU_SOURCE + + # Non-autotools configure + ./configure \ + --pthread-tls \ + --prefix=/usr \ + --default-user=monkeyd \ + --sbindir=/usr/sbin \ + --webroot=${WEBROOT}/htdocs \ + --logdir=/var/log/monkeyd \ + --mandir=/usr/share/man \ + --libdir=/usr/$(get_libdir) \ + --sysconfdir=/etc/monkeyd \ + ${myconf} \ + || die +} + +src_compile() { + emake VERBOSE=1 +} + +src_install() { + default + + newinitd "${FILESDIR}"/monkeyd.initd-r1 monkeyd + newconfd "${FILESDIR}"/monkeyd.confd monkeyd + + # Move htdocs to docdir, bug #429632 + docompress -x /usr/share/doc/"${PF}"/htdocs.dist + mv "${D}"${WEBROOT}/htdocs \ + "${D}"/usr/share/doc/"${PF}"/htdocs.dist || die + + keepdir \ + /var/tmp/monkeyd \ + /var/log/monkeyd \ + ${WEBROOT}/htdocs + + # This needs to be created at runtime + rm -rf "${D}"/run +} + +pkg_postinst() { + chown monkeyd:monkeyd /var/{log,tmp}/monkeyd + chmod 770 /var/{log,tmp}/monkeyd +} diff --git a/www-servers/monkeyd/monkeyd-9999.ebuild b/www-servers/monkeyd/monkeyd-9999.ebuild new file mode 100644 index 000000000000..fafdebcfb419 --- /dev/null +++ b/www-servers/monkeyd/monkeyd-9999.ebuild @@ -0,0 +1,152 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit eutils flag-o-matic toolchain-funcs user multilib + +DESCRIPTION="A small, fast, and scalable web server" +HOMEPAGE="http://www.monkey-project.com/" +MY_P="${PN/d}-${PV}" +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/monkey/monkey.git" + inherit git-2 + KEYWORDS="" +else + SRC_URI="http://monkey-project.com/releases/${PV:0:3}/${MY_P}.tar.gz" + KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" + +# jemalloc is also off until we figure out how to work CMakeLists.txt magic. +#IUSE="cgi -debug fastcgi jemalloc php static-plugins ${PLUGINS}" + +PLUGINS="monkeyd_plugins_auth monkeyd_plugins_cheetah monkeyd_plugins_dirlisting +monkeyd_plugins_liana monkeyd_plugins_logger monkeyd_plugins_mandril monkeyd_plugins_tls" +IUSE="cgi -debug fastcgi php static-plugins ${PLUGINS}" + +# uclibc is often compiled without backtrace info so we should +# force this off. If someone complains, consider relaxing it. +REQUIRED_USE=" + monkeyd_plugins_tls? ( !static-plugins ) + elibc_uclibc? ( !debug ) + cgi? ( php )" + +#DEPEND="jemalloc? ( >=dev-libs/jemalloc-3.3.1 )" +DEPEND=" + dev-util/cmake + monkeyd_plugins_tls? ( net-libs/mbedtls:= )" +RDEPEND=" + php? ( dev-lang/php ) + cgi? ( dev-lang/php[cgi] )" + +S="${WORKDIR}/${MY_P}" + +WEBROOT="/var/www/localhost" + +pkg_preinst() { + enewgroup monkeyd + enewuser monkeyd -1 -1 /var/tmp/monkeyd monkeyd +} + +pkg_setup() { + if use debug; then + ewarn + ewarn "\033[1;33m**************************************************\033[00m" + ewarn "Do not use debug in production!" + ewarn "\033[1;33m**************************************************\033[00m" + ewarn + fi +} + +src_prepare() { + # Unconditionally get rid of the bundled jemalloc + rm -rf "${S}"/deps + epatch "${FILESDIR}"/${PN}-1.6.9-fix-pidfile.patch + epatch "${FILESDIR}"/${PN}-1.6.8-system-mbedtls.patch +} + +src_configure() { + local myconf="" + + use elibc_uclibc && myconf+=" --uclib-mode" + use elibc_musl && myconf+=" --musl-mode" + + #use jemalloc || myconf+=" --malloc-libc" + myconf+=" --malloc-libc" + + if use debug; then + myconf+=" --debug --trace" + else + myconf+=" --no-backtrace" + fi + + local enable_plugins="" + local disable_plugins="" + # We use 'cgi' and 'fastcgi' because they are global flags + # instead of the corresponding monkeyd_plugins_* + use cgi && enable_plugins+="cgi," || disable_plugins+="cgi," + use fastcgi && enable_plugins+="fastcgi," || disable_plugins+="fastcgi," + # For the rest, we scan the monkeyd_plugins_* and parse out the plugin name. + local p + for p in ${PLUGINS}; do + pp=${p/+/} + cp=${pp/monkeyd_plugins_/} + use $pp && enable_plugins+="${cp}," || disable_plugins+="${cp}," + done + myconf+=" --enable-plugins=${enable_plugins%,} --disable-plugins=${disable_plugins%,}" + if use static-plugins; then + myconf+=" --static-plugins=${enable_plugins%,}" + fi + + # For O_CLOEXEC which is guarded by _GNU_SOURCE in uClibc, + # but shouldn't because it is POSIX. This needs to be fixed + # in uClibc. Also, we really should us append-cppflags but + # monkey's build system doesn't respect CPPFLAGS. This needs + # to be fixed in monkey. + use elibc_uclibc && append-cflags -D_GNU_SOURCE + + # Non-autotools configure + ./configure \ + --pthread-tls \ + --prefix=/usr \ + --default-user=monkeyd \ + --sbindir=/usr/sbin \ + --webroot=${WEBROOT}/htdocs \ + --logdir=/var/log/monkeyd \ + --mandir=/usr/share/man \ + --libdir=/usr/$(get_libdir) \ + --sysconfdir=/etc/monkeyd \ + ${myconf} \ + || die +} + +src_compile() { + emake VERBOSE=1 +} + +src_install() { + default + + newinitd "${FILESDIR}"/monkeyd.initd-r1 monkeyd + newconfd "${FILESDIR}"/monkeyd.confd monkeyd + + # Move htdocs to docdir, bug #429632 + docompress -x /usr/share/doc/"${PF}"/htdocs.dist + mv "${D}"${WEBROOT}/htdocs \ + "${D}"/usr/share/doc/"${PF}"/htdocs.dist || die + + keepdir \ + /var/tmp/monkeyd \ + /var/log/monkeyd \ + ${WEBROOT}/htdocs + + # This needs to be created at runtime + rm -rf "${D}"/run +} + +pkg_postinst() { + chown monkeyd:monkeyd /var/{log,tmp}/monkeyd + chmod 770 /var/{log,tmp}/monkeyd +} |