diff options
author | redfish | 2018-01-27 01:25:29 -0500 |
---|---|---|
committer | redfish | 2018-01-27 01:25:29 -0500 |
commit | b734df407732e7b12d38170895ba553028958f7f (patch) | |
tree | ed247849392382176e6fb966e219e9cc2a37221a | |
download | aur-b734df407732e7b12d38170895ba553028958f7f.tar.gz |
pkgbuild
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | PKGBUILD | 72 | ||||
-rw-r--r-- | m4-glib-gettext.patch | 15 | ||||
-rw-r--r-- | settings.json | 70 | ||||
-rw-r--r-- | transmission-i2p.install | 21 | ||||
-rw-r--r-- | transmission-i2p.service | 12 |
7 files changed, 222 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..d09ff61ebb48 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,25 @@ +# Generated by mksrcinfo v8 +# Sat Jan 27 06:25:25 UTC 2018 +pkgbase = transmission-i2p-git + pkgdesc = Standalone I2P BitTorrent Client over I2P network + pkgver = 2.82 + pkgrel = 1 + url = http://bioq5jbcnfopqwvk7qssaxcl7avzeta6mu72jmxjeowflpcrhf6q.b32.i2p/transmission + install = transmission-i2p.install + arch = any + makedepends = git + depends = i2pd + depends = openssl-1.0 + provides = transmission-i2p + conflicts = transmission-i2p + source = git+https://github.com/l-n-s/transmission-i2p.git + source = m4-glib-gettext.patch + source = settings.json + source = transmission-i2p.service + md5sums = SKIP + md5sums = e8b2a730396b9e1e90acb4424d704063 + md5sums = 8ca7b41404b7e7a6dc0818ebf473e8e2 + md5sums = f62153e9e02b0bd0df612feee80da12e + +pkgname = transmission-i2p-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..8959a2264b51 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +.*.swp +.*.swo + +src/ +pkg/ +*.tar.xz +transmission-i2p/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..86d14636855f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,72 @@ +# Maintainer: redfish <redfish at galactica dot pw> + +pkgname='transmission-i2p-git' +_gitname='transmission-i2p' +pkgver=2.82 +pkgrel=1 +arch=('any') +url="http://bioq5jbcnfopqwvk7qssaxcl7avzeta6mu72jmxjeowflpcrhf6q.b32.i2p/transmission" +depends=('i2pd' 'openssl-1.0') +#('curl' 'libidn2' 'libnghttp2' 'libssh2' 'libpsl') # TODO: are these deps transitive? +makedepends=('git') +#license=('?') +pkgdesc="Standalone I2P BitTorrent Client over I2P network" +provides=(transmission-i2p) +conflicts=(transmission-i2p) +source=("git+https://github.com/l-n-s/transmission-i2p.git" + "m4-glib-gettext.patch" + "settings.json" + "transmission-i2p.service") +md5sums=('SKIP' + 'e8b2a730396b9e1e90acb4424d704063' + '8ca7b41404b7e7a6dc0818ebf473e8e2' + 'f62153e9e02b0bd0df612feee80da12e') +install="transmission-i2p.install" +#backup=("etc/.conf") + +pkgver() { + cd "$srcdir/$_gitname" + #echo $(git describe --tags --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g') + printf "$(echo $pkgver | sed 's/\.r.*//').r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "$srcdir/$_gitname" + + patch -p1 < ../m4-glib-gettext.patch + + rm missing + + autoreconf || automake --add-missing + autoreconf +} + +build() { + cd "$srcdir/$_gitname" + + CFLAGS="-D_LINUX_QUOTA_VERSION=2" \ + LDFLAGS="-L/usr/lib/openssl-1.0" \ + OPENSSL_CFLAGS="-I/usr/include/openssl-1.0" \ + ./configure --prefix=$pkgdir/usr \ + --enable-utp --enable-cli --enable-daemon + + make +} + +package() { + cd "$srcdir/$_gitname" + + make install + + for t in create edit show daemon remote cli + do + mv $pkgdir/usr/bin/transmission{,-i2p}-$t + mv $pkgdir/usr/share/man/man1/transmission{,-i2p}-$t.1 + done + mv $pkgdir/usr/share/transmission{,-i2p} + + #install -D -m644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -D -m644 "$srcdir/settings.json" "$pkgdir/usr/share/transmission-i2p/settings.json.example" + + install -D -m644 "$srcdir/transmission-i2p.service" "$pkgdir/usr/lib/systemd/system/transmission-i2p.service" +} diff --git a/m4-glib-gettext.patch b/m4-glib-gettext.patch new file mode 100644 index 000000000000..241979d8d9c0 --- /dev/null +++ b/m4-glib-gettext.patch @@ -0,0 +1,15 @@ +--- a/m4/glib-gettext.m4 2018-01-26 23:05:34.433711507 -0500 ++++ b/m4/glib-gettext.m4 2018-01-26 22:11:57.277193787 -0500 +@@ -35,10 +35,10 @@ + dnl We go to great lengths to make sure that aclocal won't + dnl try to pull in the installed version of these macros + dnl when running aclocal in the glib directory. + dnl +-m4_copy([AC_DEFUN],[glib_DEFUN]) +-m4_copy([AC_REQUIRE],[glib_REQUIRE]) ++dnl m4_copy([AC_DEFUN],[glib_DEFUN]) ++dnl m4_copy([AC_REQUIRE],[glib_REQUIRE]) + dnl + dnl At the end, if we're not within glib, we'll define the public + dnl definitions in terms of our private definitions. + dnl diff --git a/settings.json b/settings.json new file mode 100644 index 000000000000..f7be123fa9ee --- /dev/null +++ b/settings.json @@ -0,0 +1,70 @@ +{ + "alt-speed-down": 50, + "alt-speed-enabled": false, + "alt-speed-time-begin": 540, + "alt-speed-time-day": 127, + "alt-speed-time-enabled": false, + "alt-speed-time-end": 1020, + "alt-speed-up": 50, + "bind-address-ipv4": "0.0.0.0", + "bind-address-ipv6": "::", + "blocklist-enabled": false, + "blocklist-url": "http://www.example.com/blocklist", + "cache-size-mb": 4, + "dht-enabled": false, + "download-dir": "/home/redfish/Downloads", + "download-queue-enabled": true, + "download-queue-size": 5, + "encryption": 1, + "i2p-bob-port": 2827, + "i2p-enabled": true, + "i2p-proxy-port": 4444, + "i2p-router": "127.0.0.1", + "i2p-tunnel-mode": 1, + "idle-seeding-limit": 30, + "idle-seeding-limit-enabled": false, + "incomplete-dir": "/home/redfish/Downloads", + "incomplete-dir-enabled": false, + "lpd-enabled": false, + "message-level": 2, + "peer-id-ttl-hours": 6, + "peer-limit-global": 200, + "peer-limit-per-torrent": 50, + "peer-port": 51412, + "peer-port-random-high": 65535, + "peer-port-random-low": 49152, + "peer-port-random-on-start": false, + "peer-socket-tos": "default", + "pex-enabled": true, + "port-forwarding-enabled": true, + "preallocation": 1, + "prefetch-enabled": true, + "queue-stalled-enabled": true, + "queue-stalled-minutes": 60, + "ratio-limit": 2, + "ratio-limit-enabled": false, + "rename-partial-files": true, + "rpc-authentication-required": false, + "rpc-bind-address": "0.0.0.0", + "rpc-enabled": true, + "rpc-password": "", + "rpc-port": 9092, + "rpc-url": "/transmission/", + "rpc-username": "", + "rpc-whitelist": "127.0.0.1", + "rpc-whitelist-enabled": true, + "scrape-paused-torrents-enabled": true, + "script-torrent-done-enabled": false, + "script-torrent-done-filename": "", + "seed-queue-enabled": false, + "seed-queue-size": 10, + "speed-limit-down": 100, + "speed-limit-down-enabled": false, + "speed-limit-up": 100, + "speed-limit-up-enabled": false, + "start-added-torrents": true, + "trash-original-torrent-files": false, + "umask": 18, + "upload-slots-per-torrent": 14, + "utp-enabled": false +} diff --git a/transmission-i2p.install b/transmission-i2p.install new file mode 100644 index 000000000000..3382bf655891 --- /dev/null +++ b/transmission-i2p.install @@ -0,0 +1,21 @@ +post_install() { + getent passwd transmission-i2p &>/dev/null || { + echo -n ">>> Creating transmission-i2p user... " + useradd --system --user-group -m --home /var/lib/transmission-i2p transmission-i2p + echo "done" + + mkdir -p /var/lib/transmission-i2p/.config/transmission-daemon + + # TODO: generate config with transmission-i2p-daemon -d (need to fix the defaults in code first) + cp /usr/share/transmission-i2p/settings.json.example /var/lib/transmission-i2p/.config/transmission-daemon/settings.json + + sudo chown -R transmission-i2p:transmission-i2p /var/lib/transmission-i2p/ + } # NOTE: we do not autoremove user due to security concerns (Arch policy) + + + echo ">>> Enable BOB in i2pd.conf:" + echo ">>> [bob]" + echo ">>> enabled = true" + echo ">>> address = 127.0.0.1" + echo ">>> port = 2827" +} diff --git a/transmission-i2p.service b/transmission-i2p.service new file mode 100644 index 000000000000..f5b901630b8f --- /dev/null +++ b/transmission-i2p.service @@ -0,0 +1,12 @@ +[Unit] +Description=Standalone I2P BitTorrent client over I2P network + +[Service] +User=transmission-i2p +Group=transmission-i2p +WorkingDirectory=~ +ExecStart=/usr/bin/transmission-daemon -f --log-error +#Restart=on-failure + +[Install] +WantedBy=default.target |