summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Venturini2016-12-10 14:11:04 +0100
committerAndrea Venturini2016-12-10 14:11:04 +0100
commit90439613f24effd8b51b6f5c977ffc14af2de2bd (patch)
tree02b0806694d9e60d1a8147b7e86691fcf28b4677
downloadaur-90439613f24effd8b51b6f5c977ffc14af2de2bd.tar.gz
First commit
-rw-r--r--.SRCINFO33
-rw-r--r--PKGBUILD68
-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
7 files changed, 203 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..e126efb0d29
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,33 @@
+pkgbase = amule-adnza-daemon-svn
+ pkgdesc = aMule patched for Fastweb Network (Italy) by Adunanza forum. (Only Daemon, CLI tools and Webserver)
+ pkgver = 458
+ pkgrel = 1
+ url = http://amule-adunanza.sourceforge.net/
+ install = amule-daemon.install
+ arch = i686
+ arch = x86_64
+ arch = armv7h
+ license = GPL
+ makedepends = ccache
+ makedepends = boost
+ makedepends = subversion
+ depends = wxbase-light
+ depends = crypto++
+ depends = libupnp
+ depends = libpng
+ depends = boost-libs
+ optdepends = kamule: AmuleGUI for KDE
+ conflicts = amule
+ source = svn+https://svn.code.sf.net/p/amule-adunanza/code/branches/MoonRiver/
+ source = amuled.service
+ source = amuled@.service
+ source = amuleweb.service
+ source = amule.sysuser
+ sha1sums = SKIP
+ sha1sums = 6c5cc047fc0c7e91b5f0904ced43bec76b3f2889
+ sha1sums = 306822f859ec994b1ef8f231920cf74e2aedc8e9
+ sha1sums = 05135172914890d2be2487b6686416c17cfa3fac
+ sha1sums = 266dd97212b5e269f6c9b0665880cd76e68d83ea
+
+pkgname = amule-adnza-daemon-svn
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..15ce6608f73
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,68 @@
+# Maintainer: Andrea Venturini <andrea.ventutini@tiscali.it>
+
+pkgname=amule-adnza-daemon-svn
+pkgver=458
+pkgrel=1
+pkgdesc='aMule patched for Fastweb Network (Italy) by Adunanza forum. (Only Daemon, CLI tools and Webserver)'
+url='http://amule-adunanza.sourceforge.net/'
+arch=('i686' 'x86_64' 'armv7h')
+license=('GPL')
+depends=('wxbase-light'
+ 'crypto++'
+ 'libupnp'
+ 'libpng'
+ 'boost-libs'
+ )
+makedepends=('ccache'
+ 'boost'
+ 'subversion'
+ )
+conflicts=('amule')
+optdepends=('kamule: AmuleGUI for KDE')
+source=('svn+https://svn.code.sf.net/p/amule-adunanza/code/branches/MoonRiver/'
+ 'amuled.service'
+ 'amuled@.service'
+ 'amuleweb.service'
+ 'amule.sysuser'
+ )
+sha1sums=('SKIP'
+ '6c5cc047fc0c7e91b5f0904ced43bec76b3f2889'
+ '306822f859ec994b1ef8f231920cf74e2aedc8e9'
+ '05135172914890d2be2487b6686416c17cfa3fac'
+ '266dd97212b5e269f6c9b0665880cd76e68d83ea'
+ )
+
+install=amule-daemon.install
+
+prepare() {
+ rm -rf ../MoonRiver
+ cd "${srcdir}/MoonRiver"
+
+ mkdir -p build
+ ./autogen.sh
+}
+
+build() {
+ cd "${srcdir}/MoonRiver"
+
+ ./configure \
+ --prefix=/usr \
+ --disable-monolithic \
+ --enable-{alcc,amule-daemon,amulecmd,ccache,fileview,optimize,upnp,webserver,mmap} \
+ --with-boost=/usr/include \
+ --with-toolkit=base \
+ --with-wx-config=/usr/lib/wx/config/base-unicode-3.0
+ make
+}
+
+package() {
+ cd "${srcdir}/MoonRiver"
+ make build DESTDIR="${pkgdir}" install
+
+ install -Dm644 "${srcdir}/amuled.service" "${pkgdir}/usr/lib/systemd/system/amuled.service"
+ install -Dm644 "${srcdir}/amuled@.service" "${pkgdir}/usr/lib/systemd/system/amuled@.service"
+ install -Dm644 "${srcdir}/amuleweb.service" "${pkgdir}/usr/lib/systemd/system/amuleweb.service"
+ install -Dm644 "${srcdir}/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 00000000000..6e561e84461
--- /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}'
+ ${blue}->${all_off} Service '${bold}amuleweb${all_off}' can be started as '${bold}systemctl start amuleweb${all_off}'.\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}\n"
+ fi
+ done
+}
diff --git a/amule.sysuser b/amule.sysuser
new file mode 100644
index 00000000000..8612e6679aa
--- /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 00000000000..37cb4abed2c
--- /dev/null
+++ b/amuled.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=aMule Adunanza 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 00000000000..a34387b1512
--- /dev/null
+++ b/amuled@.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=aMule Adunanza 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 00000000000..c143bc78586
--- /dev/null
+++ b/amuleweb.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Amule Adunanza 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