summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormaz-12015-10-08 05:03:36 +0800
committermaz-12015-10-08 05:03:36 +0800
commite1425d1ba86b3b54a8135e9d8d772c86e3a4b7fc (patch)
treed46de8ec572b65640381a6d514d7306227c6c686
downloadaur-e1425d1ba86b3b54a8135e9d8d772c86e3a4b7fc.tar.gz
initial
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD63
-rw-r--r--amule.install32
-rw-r--r--amuled.systemd11
-rw-r--r--amuleweb.systemd13
5 files changed, 151 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..2b1a2e9d64d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+pkgbase = amule-dlp-git
+ pkgdesc = An eMule-like client for ed2k p2p network with DLP patch
+ pkgver = 2.3.1.r102.4928412
+ pkgrel = 1
+ url = https://github.com/persmule/amule-dlp
+ install = amule.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = git
+ depends = wxgtk
+ depends = wxgtk2.8
+ depends = gd
+ depends = geoip
+ depends = libupnp
+ depends = crypto++
+ depends = libsm
+ optdepends = antileech
+ provides = amule
+ provides = amule-dlp
+ conflicts = amule
+ conflicts = amule-dlp
+ conflicts = amule-dlp-hg
+ source = amule-dlp-git::git://github.com/persmule/amule-dlp.git
+ source = amuled.systemd
+ source = amuleweb.systemd
+ sha256sums = SKIP
+ sha256sums = 527a2cca6d56b8269722aafc77a89734f59a929f946f342bd0f69b256f9c7522
+ sha256sums = f4f43b1154ddccc9036a4291a58c6715f097b171fec62ea7aead0c9d9fa654f2
+
+pkgname = amule-dlp-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..e799e8fe8d2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,63 @@
+# Maintainer: fuhd
+# Contributor: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Henrik Ronellenfitsch <searinox@web.de>
+# Contributor: Alessio Sergi <sergi.alessio {at} gmail.com>
+# Contributor: Dario 'Dax' Vilardi <dax [at] deelab [dot] org>
+# Contributor: Anatol Pomozov <anatol.pomozov@gmail.com>
+pkgname=amule-dlp-git
+pkgver=2.3.1.r107.fdf4e47
+pkgrel=1
+pkgdesc="An eMule-like client for ed2k p2p network with DLP patch"
+arch=('i686' 'x86_64')
+url="https://github.com/persmule/amule-dlp"
+license=('GPL')
+depends=('wxgtk' 'wxgtk2.8' 'gd' 'geoip' 'libupnp' 'crypto++' 'libsm')
+conflicts=('amule' 'amule-dlp' 'amule-dlp-hg')
+makedepends=(git)
+optdepends=('antileech')
+install=amule.install
+provides=('amule' 'amule-dlp')
+source=("$pkgname::git://github.com/persmule/amule-dlp.git"
+ 'amuled.systemd'
+ 'amuleweb.systemd')
+sha256sums=('SKIP'
+ '527a2cca6d56b8269722aafc77a89734f59a929f946f342bd0f69b256f9c7522'
+ 'f4f43b1154ddccc9036a4291a58c6715f097b171fec62ea7aead0c9d9fa654f2')
+
+pkgver() {
+ cd "${srcdir}/${pkgname}"
+ printf "2.3.1.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}"
+
+ ./autogen.sh
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --enable-cas \
+ --enable-wxcas \
+ --enable-amule-daemon \
+ --enable-amulecmd \
+ --enable-amule-gui \
+ --enable-alc \
+ --enable-alcc \
+ --enable-webserver \
+ --disable-debug \
+ --enable-optimize \
+ --enable-ccache \
+ --enable-geoip \
+ --enable-upnp \
+ --with-wxversion=2.8
+
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}"
+
+ make DESTDIR=${pkgdir} install
+
+ install -D -m644 "${srcdir}/amuled.systemd" "${pkgdir}/usr/lib/systemd/system/amuled.service"
+ install -D -m644 "${srcdir}/amuleweb.systemd" "${pkgdir}/usr/lib/systemd/system/amuleweb.service"
+}
diff --git a/amule.install b/amule.install
new file mode 100644
index 00000000000..7a6d229b99d
--- /dev/null
+++ b/amule.install
@@ -0,0 +1,32 @@
+post_install() {
+ post_upgrade
+ passwd -l amule &>/dev/null
+}
+
+_config_instructions() {
+ echo "If you plan to use external client (e.g. amuleGUI or amuleweb) then you need to"
+ echo "provide [ExternalConnect] configuration."
+ echo "You also need to specify amuleweb password."
+ echo "Please follow https://wiki.archlinux.org/index.php/AMule for more information."
+ echo "amuleweb can be started as 'systemctl start amuleweb'."
+ echo
+ echo "This package only provides amule-dlp."
+ echo "If you want the antileech function, you have to install amule-dlp-libantileech-git."
+}
+
+post_upgrade() {
+ # create user/group that the daemon will run as by default, do not delete this on uninstall, as it will own files
+ getent group amule >/dev/null || groupadd amule
+ getent passwd amule >/dev/null || useradd -c 'aMule Client' -g amule -d '/var/lib/amule' -m -s /bin/false amule
+
+ if [ ! -e /var/lib/amule/.aMule/amule.conf ]; then
+ _config_instructions
+ fi
+}
+
+post_remove() {
+ # TOTHINK: delete homedir and user account/group?
+ #getent passwd amule >/dev/null && userdel amule
+ #getent group amule >/dev/null && groupdel amule
+ true
+}
diff --git a/amuled.systemd b/amuled.systemd
new file mode 100644
index 00000000000..e1878dfd975
--- /dev/null
+++ b/amuled.systemd
@@ -0,0 +1,11 @@
+[Unit]
+Description=aMule Daemon
+After=network.target
+
+# This assumes that a user 'amule' exists, with a writeable home directory
+[Service]
+User=amule
+ExecStart=/usr/bin/amuled
+
+[Install]
+WantedBy=multi-user.target
diff --git a/amuleweb.systemd b/amuleweb.systemd
new file mode 100644
index 00000000000..1799f4ae88c
--- /dev/null
+++ b/amuleweb.systemd
@@ -0,0 +1,13 @@
+[Unit]
+Description=aMule Webserver
+Requires=amuled.service
+
+[Service]
+User=amule
+ExecStart=/usr/bin/amuleweb --quiet
+# If amuled still starting then amuleweb exits, restart until amuleweb is up
+Restart=on-success
+RestartSec=3s
+
+[Install]
+WantedBy=multi-user.target