summaryrefslogtreecommitdiff
path: root/net-p2p/amule
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-p2p/amule
reinit the tree, so we can have metadata
Diffstat (limited to 'net-p2p/amule')
-rw-r--r--net-p2p/amule/Manifest10
-rw-r--r--net-p2p/amule/amule-2.3.2-r1.ebuild104
-rw-r--r--net-p2p/amule/files/amule-2.2.6-fallocate.diff23
-rw-r--r--net-p2p/amule/files/amuled.confd12
-rw-r--r--net-p2p/amule/files/amuled.initd50
-rw-r--r--net-p2p/amule/files/amuleweb.confd27
-rw-r--r--net-p2p/amule/files/amuleweb.initd49
-rw-r--r--net-p2p/amule/metadata.xml13
8 files changed, 288 insertions, 0 deletions
diff --git a/net-p2p/amule/Manifest b/net-p2p/amule/Manifest
new file mode 100644
index 000000000000..1faee4933c16
--- /dev/null
+++ b/net-p2p/amule/Manifest
@@ -0,0 +1,10 @@
+AUX amule-2.2.6-fallocate.diff 687 SHA256 a6d6755f1ecd6af4527df4826a363ed2518155021df395f08074ce0c4998ad41 SHA512 406eb05eecfa7d027f7eaeefa2ead92078d5f7ed0e72f3ce47ac4f1f23b2852577f429f999a009198515e35efacfa6e54283494bb3eaf6332ee6bed9963c65ba WHIRLPOOL 907f21c6dcd9c0b5b69df106d6cb77542d13ae35a29b23bd66a7c8dd6bc257a6032ed2cfb0cc98188b2a5d4ed06f92d2a7b4a009d6e45fa5dac35e010ba45233
+AUX amuled.confd 300 SHA256 6a0a6fbf055e865d2440ad1888b02fb4b9cf93f65f5fa503820dc87e8af4e159 SHA512 88a3fcc64ed4c4729609e3ffef098d4bf30bda0d17b5165fff3417161c18766df79de11c98ee510677291bca7ded33d2a23d3aff0d99781f98173cc189f44901 WHIRLPOOL b1ec7bbaad46645c40dba98fa6dab9e0e406a4e7ef1f6fac41488c35670704104a70cfc0ee5ea8d285ca7cb58adc53f821e89672df6489021b07bd558fd19760
+AUX amuled.initd 1105 SHA256 5db7be2ee1e1f8f86790f1d459d102889e67055451027775416285ccae164cb1 SHA512 3ec351e84da4e33918747de4ccd9ec86895b60f9d94836fc92112489edcfe14af7a21efb79194b80bb81aa666714bd5a21873c954b36948e31369727e71143b6 WHIRLPOOL 51503f64a58639d2d5dee6753df9682acf1926abd6ad33a1ea5f59e4b72184d5984ba81ed8fad03c4a2ff2e09d9354cea33c76d82735c0ab4290430fccfd6acd
+AUX amuleweb.confd 720 SHA256 5bc1be891f5f5d33f5d8fb8d174bb31ee2432242773d93f46082ec8f391fbb2a SHA512 ba760e45002a80bb55e2729178d0901f885e8d142903f8eb98a31b8544bf6989801dabfa0315e0d1f7d8bfa3df5716cce43bf415f45a4605895dc2907716ca41 WHIRLPOOL fce55348d1ba0f2c5730675bfcb71146b5f73842c9bad20139ac497288f0a4318e158e3bf236915d5823e55ebe72471408a9c2900bd31e30f8543adeba4b2550
+AUX amuleweb.initd 1149 SHA256 108c44e1fa1b71ab0277886bfc76fb4d0d4fb98f901fdb4daa6c9dc2a250721a SHA512 4cc944af90ad81f09d74d79dede57d1ff26c1b87649432d14ed294770b04f6ea256c25c194edfdc8f9d0c85929b1c576c31eba9228703e5a21259d83968289b0 WHIRLPOOL 96540ba412aba3dd6803b3e78710c01b98eb9313fc0a242c3b9c24c46ca5998b88593f191b08dd63c3f7da5569c73fe62ccf6d4806a3004ccd943895235c4096
+DIST aMule-2.3.2.tar.xz 3895300 SHA256 f64720fdc8c6cfa06bdcd4ca3922d30a0ddddba9c897f5bec7605009c7683928 SHA512 3064b086f8459b4372ea0c11f239a08167c7beac3dde26889f056f617b480b487bea10c2cae8fdfa1ae99c10fc9e715adc8e01e4b968389861aa47c3ec8c0016 WHIRLPOOL 2907069f705dcb438fb78e049d9a417d42401bff659924c7ed66451b22c6dd35baf52e8100ca81e06c24cd1418ba586e16746bcb4e27314c15fd29407b4e3298
+EBUILD amule-2.3.2-r1.ebuild 2264 SHA256 f83c7cf73a23e70fdbe4c51d4612e9b2bc3074aedddb5b9dc381965ea314081f SHA512 defd04e15bc4d77fe48a78999dac8410228199029011bba8ecf295388354029bf43a1f17741696c65b36acc90dea0e4b5c47ebbcbab5111d4eb95a84949179fc WHIRLPOOL 3bb3a9d033cb97e5e16b208d99c2de9539defd4a30579e5577959c82704ab4c41fafc682632fac8ed6aac2f2d33d1709b17caaa01d47c37d17bf6170164132d3
+MISC ChangeLog 4241 SHA256 476558c61d11b3a702b773b6646ffff1d9807f6ddc494f2f0521e4c596febf78 SHA512 df434d5688e664753f3d22980bc9d588b478e5919c66ca4e4f00c4247cbe885a8a074c69beb2c0db9042fae5bc877dd2ec2a71788d7da481c68d22f873917543 WHIRLPOOL 2301d7dcb2004e88d6746cd2e1d0000fcc1f8ad07b140a89520296ed617893ba27f4fe9ed810e0057f810655207fa6098e037efc7433ebcc2f8e15bcd7d76670
+MISC ChangeLog-2015 24046 SHA256 83dab8e8503aea4a2c7aefa2ff8d1e6124644508a2c7f8e070a8a6e91a6194c4 SHA512 ac16cfcc1e3a6bf22ac876d72a146b1faec92529a936f0988f45ae2071b7d47f6ca75731edecbc5c8aa037d89c8467b8d426be3c7ef9b16d9a8ca5067f934964 WHIRLPOOL d521d3485f76f83aeeba9474da445ce7d01d3232e7707776baf1530d91baceab86bf29a9ea0ce5272ebd6c67a145f7565b72897ce1f6c266cdddf5a8523f9f6f
+MISC metadata.xml 443 SHA256 6e3d721d7e6236390b48832c060f36edc79045878af1cb115f64aa1fba51af2d SHA512 61b72c6f3bf1aaf4d09045f2ff0d1eb053cc55fe4126da2aa25d45ba7ee7c3db604df823cbf02db2a758e1ee108c4516f0223b4c3dfe88a67d75ae7a2bb44d38 WHIRLPOOL 361b5c0b8d47b88ef731b5e5562226b3a89e4faa9ed10b71ee04b86a19db0161dabd2b501280e4a60d4efb1a681e2b34a4ebcd2b4cf79885bd6d95bb70d2b979
diff --git a/net-p2p/amule/amule-2.3.2-r1.ebuild b/net-p2p/amule/amule-2.3.2-r1.ebuild
new file mode 100644
index 000000000000..51bb5d2472b5
--- /dev/null
+++ b/net-p2p/amule/amule-2.3.2-r1.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+WX_GTK_VER="3.0"
+
+inherit wxwidgets user
+
+MY_P="${PN/m/M}-${PV}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="aMule, the all-platform eMule p2p client"
+HOMEPAGE="http://www.amule.org/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ppc ppc64 ~sparc x86"
+IUSE="daemon debug geoip nls remote stats unicode upnp +X"
+
+COMMON_DEPEND="
+ dev-libs/crypto++
+ sys-libs/binutils-libs:0=
+ sys-libs/zlib
+ x11-libs/wxGTK:${WX_GTK_VER}[X?]
+ stats? ( media-libs/gd:=[jpeg,png] )
+ geoip? ( dev-libs/geoip )
+ upnp? ( net-libs/libupnp:* )
+ remote? ( media-libs/libpng:0=
+ unicode? ( media-libs/gd:= ) )
+ !net-p2p/imule"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}"
+
+PATCHES=( "${FILESDIR}/${PN}-2.2.6-fallocate.diff" )
+
+pkg_setup() {
+ if use stats && ! use X; then
+ einfo "Note: You would need both the X and stats USE flags"
+ einfo "to compile aMule Statistics GUI."
+ einfo "I will now compile console versions only."
+ fi
+}
+
+pkg_preinst() {
+ if use daemon || use remote; then
+ enewgroup p2p
+ enewuser p2p -1 -1 /home/p2p p2p
+ fi
+}
+
+src_configure() {
+ local myconf
+
+ if use X; then
+ einfo "wxGTK with X support will be used"
+ need-wxwidgets unicode
+ else
+ einfo "wxGTK without X support will be used"
+ need-wxwidgets base-unicode
+ fi
+
+ if use X ; then
+ use stats && myconf="${myconf}
+ --enable-wxcas
+ --enable-alc"
+ use remote && myconf="${myconf}
+ --enable-amule-gui"
+ else
+ myconf="
+ --disable-monolithic
+ --disable-amule-gui
+ --disable-wxcas
+ --disable-alc"
+ fi
+
+ econf \
+ --with-denoise-level=0 \
+ --with-wx-config="${WX_CONFIG}" \
+ --enable-amulecmd \
+ --without-boost \
+ $(use_enable debug) \
+ $(use_enable daemon amule-daemon) \
+ $(use_enable geoip) \
+ $(use_enable nls) \
+ $(use_enable remote webserver) \
+ $(use_enable stats cas) \
+ $(use_enable stats alcc) \
+ $(use_enable upnp) \
+ ${myconf}
+}
+
+src_install() {
+ default
+
+ if use daemon; then
+ newconfd "${FILESDIR}"/amuled.confd amuled
+ newinitd "${FILESDIR}"/amuled.initd amuled
+ fi
+ if use remote; then
+ newconfd "${FILESDIR}"/amuleweb.confd amuleweb
+ newinitd "${FILESDIR}"/amuleweb.initd amuleweb
+ fi
+}
diff --git a/net-p2p/amule/files/amule-2.2.6-fallocate.diff b/net-p2p/amule/files/amule-2.2.6-fallocate.diff
new file mode 100644
index 000000000000..8d1485a67786
--- /dev/null
+++ b/net-p2p/amule/files/amule-2.2.6-fallocate.diff
@@ -0,0 +1,23 @@
+Disable fallocate #562992
+
+This is only a workaround to fix FTBFS, the configure check is wrong and needs to be fixed:
+http://www.amule.org/abugs/view.php?id=1572
+
+--- a/src/ThreadTasks.cpp
++++ b/src/ThreadTasks.cpp
+@@ -506,6 +506,15 @@ void CCompletionTask::OnExit()
+ #include <stdlib.h>
+ #include <errno.h>
+
++// #562992
++#if defined(__alpha__) || defined(__hppa__)
++#undef HAVE_FALLOCATE
++#endif
++
++#if defined(__hppa__)
++#undef HAVE_SYS_FALLOCATE
++#endif
++
+ CAllocateFileTask::CAllocateFileTask(CPartFile *file, bool pause)
+ // GetPrintable is used to improve the readability of the log.
+ : CThreadTask(wxT("Allocating"), file->GetFullName().RemoveExt().GetPrintable(), ETP_High),
diff --git a/net-p2p/amule/files/amuled.confd b/net-p2p/amule/files/amuled.confd
new file mode 100644
index 000000000000..f8888bf2a2ba
--- /dev/null
+++ b/net-p2p/amule/files/amuled.confd
@@ -0,0 +1,12 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# owner of amuled process (must be existing)
+AMULEUSER="p2p"
+
+# home directory for amuled (must be existing)
+AMULEHOME="/home/p2p"
+
+# log file (/dev/null for nowhere)
+LOG=/var/log/amuled.log
+
diff --git a/net-p2p/amule/files/amuled.initd b/net-p2p/amule/files/amuled.initd
new file mode 100644
index 000000000000..7a1f87e31576
--- /dev/null
+++ b/net-p2p/amule/files/amuled.initd
@@ -0,0 +1,50 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ if ! test -f "${AMULEHOME}/.aMule/amule.conf"; then
+ eerror "You must start and configure amuled before launch it. Sorry."
+ return 1
+ fi
+
+ if pgrep -u ${AMULEUSER} amuled >/dev/null; then
+ eerror "An instance of aMule webserver is already running"
+ return 1
+ fi
+ if [ -e /var/run/amuled.pid ]; then
+ rm /var/run/amuled.pid
+ fi
+
+ ebegin "Starting aMule Daemon"
+ start-stop-daemon --start \
+ --quiet --background \
+ --make-pidfile --pidfile /var/run/amuled.pid \
+ --env HOME="${AMULEHOME}" \
+ --user ${AMULEUSER} \
+ --exec /usr/bin/amuled >${LOG}
+
+ sleep 2
+ if ! pgrep -u ${AMULEUSER} amuled > /dev/null; then
+ eerror "aMule daemon can't be started! Check logfile: ${LOG}"
+ fi
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping aMule daemon -- please wait"
+ start-stop-daemon --stop --pidfile /var/run/amuled.pid 2>&1 >/dev/null
+ eend $?
+}
+
+restart() {
+ svc_stop
+ while `pgrep -u ${AMULEUSER} amuled >/dev/null`; do
+ sleep 1
+ done
+ svc_start
+}
diff --git a/net-p2p/amule/files/amuleweb.confd b/net-p2p/amule/files/amuleweb.confd
new file mode 100644
index 000000000000..29a3ea624750
--- /dev/null
+++ b/net-p2p/amule/files/amuleweb.confd
@@ -0,0 +1,27 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# owner of amuleweb process (must be existing)
+AMULEUSER="p2p"
+
+# home directory for amuleweb (from where to read configuration) (must be existing)
+AMULEHOME="/home/p2p"
+
+# log file (/dev/null for nowhere)
+LOG=/var/log/amuleweb.log
+
+# aMule password (note: not your webserver password, but the external
+# connection one)
+AMULEPWD="secret"
+
+# Full (admin) access password for webserver
+WEBPWD="secret2"
+
+# aMule host (this could be a remote host or usually localhost)
+AMULEHOST="localhost"
+
+# aMule external connection port
+AMULEPORT="4712"
+
+# aMuleweb template (default, php-default, chicane)
+TEMPLATE="default"
diff --git a/net-p2p/amule/files/amuleweb.initd b/net-p2p/amule/files/amuleweb.initd
new file mode 100644
index 000000000000..bf00fcde5d4a
--- /dev/null
+++ b/net-p2p/amule/files/amuleweb.initd
@@ -0,0 +1,49 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+ use amuled
+}
+
+start() {
+ if ! test -f "${AMULEHOME}/.aMule/amule.conf"; then
+ eerror "You must start and configure amuleweb before launch it. Sorry."
+ return 1
+ fi
+
+ if pgrep -u ${AMULEUSER} amuleweb >/dev/null; then
+ eerror "An instance of aMule webserver is already running"
+ return 1
+ fi
+
+ if [ -e /var/run/amuleweb.pid ]; then
+ rm /var/run/amuleweb.pid
+ fi
+
+ OPTIONS="-h ${AMULEHOST} -p ${AMULEPORT} -P ${AMULEPWD} -A ${WEBPWD} -t ${TEMPLATE} -q"
+
+ ebegin "Starting aMule WebServer"
+ start-stop-daemon --start \
+ --quiet --background \
+ --make-pidfile --pidfile /var/run/amuleweb.pid \
+ --env HOME="${AMULEHOME}" \
+ --user ${AMULEUSER} \
+ --exec /usr/bin/amuleweb -- ${OPTIONS} 2>&1 >${LOG}
+
+ sleep 1
+ if ! pgrep -u ${AMULEUSER} amuleweb > /dev/null; then
+ eerror "aMule daemon can't be started! Check logfile: ${LOG}"
+ eend 1
+ return 1
+ fi
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping aMule WebServer"
+ start-stop-daemon --stop --pidfile /var/run/amuleweb.pid 2>&1 >/dev/null
+ eend $?
+}
+
diff --git a/net-p2p/amule/metadata.xml b/net-p2p/amule/metadata.xml
new file mode 100644
index 000000000000..2a3a65502073
--- /dev/null
+++ b/net-p2p/amule/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <use>
+ <flag name="daemon">Enable amule daemon</flag>
+ <flag name="remote">Enable remote controlling of the client</flag>
+ <flag name="stats">Enable statistic reporting</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">amule</remote-id>
+ </upstream>
+</pkgmetadata>