summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMubashshir2020-10-28 00:55:19 +0600
committerMubashshir2020-10-28 00:55:19 +0600
commitf6b67970e6024c4e2ae8b318b76cfc5af1c27434 (patch)
treedcebd71a59bb65666ecd5be15fe88d7123a14f4b
downloadaur-f6b67970e6024c4e2ae8b318b76cfc5af1c27434.tar.gz
init
-rw-r--r--.SRCINFO22
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD41
-rw-r--r--transmission-trackers.install15
-rw-r--r--transmission-trackers.service5
-rw-r--r--transmission-trackers.timer9
6 files changed, 98 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..fae76de31f6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = transmission-trackers-git
+ pkgver = r21.10849a0
+ pkgrel = 1
+ url = https://github.com/blind-oracle/transmission-trackers
+ install = transmission-trackers.install
+ arch = any
+ license = unknown
+ depends = systemd
+ depends = transmission-cli
+ depends = python-transmissionrpc
+ depends = python-toml
+ provides = transmission-trackers
+ conflicts = transmission-trackers
+ source = git+https://github.com/blind-oracle/transmission-trackers.git
+ source = transmission-trackers.service
+ source = transmission-trackers.timer
+ sha256sums = SKIP
+ sha256sums = 52304cf9430f274eb90cb0929787560703b74230b2485a2c4633793c876c4900
+ sha256sums = 0b7ff86930e1732c65d323c8641b43ec5f3aa2a6c9a8b108b0421ca92d977db4
+
+pkgname = transmission-trackers-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..7f5a1f01b0d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*
+!.SRCINFO
+!PKGBUILD
+!transmission-trackers.install
+!transmission-trackers.service
+!transmission-trackers.timer
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..cdf74a173c2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Ahmad Hasan Mubashshir <ahmubashshir@gmail.com>
+# pkg: git
+pkgname=transmission-trackers-git
+pkgver=r21.10849a0
+pkgrel=1
+pkgdesc=""
+arch=('any')
+url="https://github.com/blind-oracle/transmission-trackers"
+license=('unknown')
+depends=(
+ 'systemd'
+ 'transmission-cli'
+ 'python-transmissionrpc'
+ 'python-toml'
+)
+provides=('transmission-trackers')
+conflicts=('transmission-trackers')
+install=${pkgname%*-git}.install
+source=(
+ "git+https://github.com/blind-oracle/transmission-trackers.git"
+ "transmission-trackers.service"
+ "transmission-trackers.timer"
+)
+sha256sums=('SKIP'
+ '52304cf9430f274eb90cb0929787560703b74230b2485a2c4633793c876c4900'
+ '0b7ff86930e1732c65d323c8641b43ec5f3aa2a6c9a8b108b0421ca92d977db4')
+
+pkgver()
+{
+ cd "$srcdir/${pkgname%*-git}"
+ ( set -o pipefail
+ git describe --tags --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+package() {
+ install -Dm755 "$srcdir/${pkgname%*-git}/transmission-trackers.py" "$pkgdir/usr/bin/transmission-trackers"
+ install -Dm644 "$srcdir/transmission-trackers.service" "$pkgdir/usr/lib/systemd/user/transmission-trackers.service"
+ install -Dm644 "$srcdir/transmission-trackers.timer" "$pkgdir/usr/lib/systemd/user/transmission-trackers.timer"
+}
diff --git a/transmission-trackers.install b/transmission-trackers.install
new file mode 100644
index 00000000000..21f202b911e
--- /dev/null
+++ b/transmission-trackers.install
@@ -0,0 +1,15 @@
+post_install()
+{
+ cat <<EOF
+First enable transmission-rpc in Transmission by checking
+ 'Menu > Edit > Preferences > Remote > Allow remote access'
+then run:
+ \`systemctl --user --now enable transmission-trackers.timer\`
+to start the timer.
+
+Optionally you can enable authentication on transmission-rpc.
+If you enable authentication,then you have to set client.user
+and client.password in \$XDG_CONFIG_HOME/transmission/trackers.toml
+
+EOF
+}
diff --git a/transmission-trackers.service b/transmission-trackers.service
new file mode 100644
index 00000000000..e6bf155b37e
--- /dev/null
+++ b/transmission-trackers.service
@@ -0,0 +1,5 @@
+[Unit]
+Description=Update Transmission trackers
+
+[Service]
+ExecStart=/usr/bin/transmission-trackers
diff --git a/transmission-trackers.timer b/transmission-trackers.timer
new file mode 100644
index 00000000000..199cfce3d4e
--- /dev/null
+++ b/transmission-trackers.timer
@@ -0,0 +1,9 @@
+[Unit]
+Description=Transmission trackers update timer
+
+[Timer]
+OnBootSec=1min
+OnUnitActiveSec=30
+
+[Install]
+WantedBy=timers.target