summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsl1pkn072015-06-08 15:47:25 +0200
committersl1pkn072015-06-08 15:47:25 +0200
commit6c13895d2eaeb22a8e346e89a1bf2423dbd6b29d (patch)
tree8eb69bb382e98a61da9ecc19d58a19ef2e5dc6f6
downloadaur-6c13895d2eaeb22a8e346e89a1bf2423dbd6b29d.tar.gz
Initial commit
-rw-r--r--.SRCINFO30
-rw-r--r--.gitignore10
-rw-r--r--PKGBUILD59
-rw-r--r--amule-daemon.install67
-rw-r--r--amule.sysuser2
-rw-r--r--amuled.service10
-rw-r--r--amuled@.service10
-rw-r--r--amuleweb.service13
8 files changed, 201 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..52ede52a3bfc
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,30 @@
+pkgbase = amule-daemon
+ pkgdesc = An eMule-like client for the eD2k and Kademlia p2p networks. (Only Daemon, CLI tools and Webserver)
+ pkgver = 10871
+ pkgrel = 1
+ url = http://www.amule.org
+ install = amule-daemon.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = boost
+ depends = wxbase2.8
+ depends = crypto++
+ depends = libupnp
+ depends = libpng
+ optdepends = kamule: AmuleGUI for KDE
+ conflicts = amule
+ options = !ccache
+ source = http://amule.sourceforge.net/tarballs/aMule-SVN-r10871.tar.bz2
+ source = amuled.service
+ source = amuled@.service
+ source = amuleweb.service
+ source = amule.sysuser
+ sha1sums = 97dc76ec98ba4cac2f2d9cb083b865fc152acd0c
+ sha1sums = 3a2b451c3a35ab1745dd88726fe1454bc1227542
+ sha1sums = 4c4638e39f01c782e0e32d950fd29b4a6f4a398a
+ sha1sums = 128049ba8dce9dedc16357b7027736d99d583761
+ sha1sums = 266dd97212b5e269f6c9b0665880cd76e68d83ea
+
+pkgname = amule-daemon
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..048e22091f81
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,10 @@
+*
+!.gitignore
+!.SRCINFO
+!PKGBUILD
+!amule-daemon.install
+!amule.sysuser
+!amuled.service
+!amuled@.service
+!amuleweb.service
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..987a88553cd7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,59 @@
+# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com>
+
+pkgname=amule-daemon
+pkgver=10871
+pkgrel=1
+pkgdesc='An eMule-like client for the eD2k and Kademlia p2p networks. (Only Daemon, CLI tools and Webserver)'
+url='http://www.amule.org'
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('wxbase2.8' 'crypto++' 'libupnp' 'libpng')
+makedepends=('boost')
+conflicts=('amule')
+optdepends=('kamule: AmuleGUI for KDE')
+source=("http://amule.sourceforge.net/tarballs/aMule-SVN-r${pkgver}.tar.bz2"
+ 'amuled.service'
+ 'amuled@.service'
+ 'amuleweb.service'
+ 'amule.sysuser')
+sha1sums=('97dc76ec98ba4cac2f2d9cb083b865fc152acd0c'
+ '3a2b451c3a35ab1745dd88726fe1454bc1227542'
+ '4c4638e39f01c782e0e32d950fd29b4a6f4a398a'
+ '128049ba8dce9dedc16357b7027736d99d583761'
+ '266dd97212b5e269f6c9b0665880cd76e68d83ea')
+install="amule-daemon.install"
+options=('!ccache')
+
+prepare() {
+ cd "aMule-SVN-r${pkgver}"
+ sed -e 's|Add(Debug)LogLineM()|Add(Debug)LogLineM()\nDEFINE_LOCAL_EVENT_TYPE(MULE_EVT_LOGLINE)|' -i src/LoggerConsole.cpp
+ ./autogen.sh
+}
+
+build() {
+ cd "aMule-SVN-r${pkgver}"
+ ./configure \
+ --prefix=/usr \
+ --disable-{monolithic,debug} \
+ --enable-{alcc,amule-daemon,amulecmd,ccache,fileview,optimize,upnp,webserver,mmap} \
+ --with-toolkit=base \
+ --with-wxversion=2.8 \
+ --with-wx-config=/usr/lib/wx/config/base-unicode-release-2.8
+ make
+}
+
+package() {
+ cd "aMule-SVN-r${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ install -Dm755 src/utils/fileview/mulefileview "${pkgdir}/usr/bin/mulefileview"
+ install -Dm755 src/utils/scripts/mldonkey_importer.pl "${pkgdir}/usr/share/amule/mldonkey_importer.pl"
+ install -Dm755 src/utils/scripts/kadnodescreate.pl "${pkgdir}/usr/share/amule/kadnodescreate.pl"
+
+ install -Dm644 ../amuled.service "${pkgdir}/usr/lib/systemd/system/amuled.service"
+ install -Dm644 ../amuled@.service "${pkgdir}/usr/lib/systemd/system/amuled@.service"
+ install -Dm644 ../amuleweb.service "${pkgdir}/usr/lib/systemd/system/amuleweb.service"
+ install -Dm644 ../amule.sysuser "${pkgdir}/usr/lib/sysusers.d/amule.conf"
+
+ rm -fr "${pkgdir}/usr/share/"{pixmaps,applications}
+}
diff --git a/amule-daemon.install b/amule-daemon.install
new file mode 100644
index 000000000000..8604eff049b6
--- /dev/null
+++ b/amule-daemon.install
@@ -0,0 +1,67 @@
+all_off="$(tput sgr0)"
+bold="${all_off}$(tput bold)"
+yellow="${bold}$(tput setaf 3)"
+blue="${bold}$(tput setaf 4)"
+green="${bold}$(tput setaf 2)"
+
+_instructions() {
+ printf "${yellow}==>${all_off} ${bold}ATENTION:${all_off}
+ ${blue}->${all_off} If you plan to use external client (e.g. amuleGUI or amuleweb) then you need to
+ provide ${bold}[ExternalConnect]${all_off} configuration.
+ ${blue}->${all_off} You also need to specify amuleweb password.
+ Please follow ${bold}https://wiki.archlinux.org/index.php/AMule${all_off} for more information.
+ ${blue}->${all_off} Service '${bold}amule${all_off}' can be started as '${bold}systemctl start amule${all_off}'.
+ ${blue}->${all_off} Service' ${bold}amule@${all_off}' (by user) can be started as '${bold}systemctl start amule@${all_off}'.\n"
+ ${blue}->${all_off} Service '${bold}amuleweb${all_off}' can be started as '${bold}systemctl start amuleweb${all_off}'.\n".\n"
+}
+
+_notice_if_amuled_exist() {
+ printf "${yellow}==>${all_off} ${bold}ATENTION:${all_off}
+ ${green}==>${all_off} ${bold}Deprecated 'amuled' user/group found:${all_off}
+ ${blue}->${all_off} The deprecated user/group '${bold}amuled${all_off}' has been removed.
+ ${blue}->${all_off} New '${bold}amule${all_off}' user/group has been created instead.\n"
+}
+
+_instructions_if_amuled_exist() {
+ printf "${yellow}==>${all_off} ${bold}ATENTION:${all_off}
+ ${blue}->${all_off} The new aMule data path is ${bold}/var/lib/amule${all_off}
+ Please move your Amule data to new path with:
+
+ # ${bold}mv /var/lib/amuled/* /var/lib/amule${all_off}
+ # ${bold}chown -R amule:amule /var/lib/amule${all_off}\n"
+}
+
+post_install() {
+ post_upgrade $1
+ _instructions
+}
+
+post_upgrade() {
+ if id -u amuled >/dev/null 2>&1; then
+ userdel amuled
+ groupdel amuled
+ _notice_if_amuled_exist
+ fi
+ if [ -d /var/lib/amuled ]; then
+ _instructions_if_amuled_exist
+ fi
+
+ systemd-sysusers amule.conf
+
+ install -dm744 -o amule -g amule /var/lib/amule
+}
+
+post_remove() {
+ paths=(/var/lib/amule)
+
+ first=true
+ for path in ${paths[@]}; do
+ if [ -d $path ]; then
+ if $first; then
+ first=false
+ printf "${green}==>${all_off} ${bold}Leftover Paths:${all_off}\n"
+ fi
+ printf "${blue} -> ${all_off} ${bold}$path${all_off}"
+ fi
+ done
+}
diff --git a/amule.sysuser b/amule.sysuser
new file mode 100644
index 000000000000..8612e6679aab
--- /dev/null
+++ b/amule.sysuser
@@ -0,0 +1,2 @@
+g amule - - -
+u amule - "aMule Daemon" /var/lib/amule
diff --git a/amuled.service b/amuled.service
new file mode 100644
index 000000000000..7ea5499ebf89
--- /dev/null
+++ b/amuled.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=aMule Daemon
+After=network.target
+
+[Service]
+User=amule
+ExecStart=/usr/bin/amuled
+
+[Install]
+WantedBy=multi-user.target
diff --git a/amuled@.service b/amuled@.service
new file mode 100644
index 000000000000..f3d64247ba06
--- /dev/null
+++ b/amuled@.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=aMule Daemon
+After=network.target
+
+[Service]
+User=%I
+ExecStart=/usr/bin/amuled
+
+[Install]
+WantedBy=multi-user.target
diff --git a/amuleweb.service b/amuleweb.service
new file mode 100644
index 000000000000..0da58921ba6b
--- /dev/null
+++ b/amuleweb.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Amule - ED2K (Edonkey) client. 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