summaryrefslogtreecommitdiff
path: root/net-p2p/amule/files
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/files
reinit the tree, so we can have metadata
Diffstat (limited to 'net-p2p/amule/files')
-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
5 files changed, 161 insertions, 0 deletions
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 $?
+}
+