summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Webster2020-04-29 11:33:20 -0700
committerDonald Webster2020-04-29 13:58:03 -0700
commitec9aabed5619befcfa8ee5523debed7a65f550d7 (patch)
tree3cae1faca299f7e6337a260cf73295a9bdc958ee
downloadaur-ec9aabed5619befcfa8ee5523debed7a65f550d7.tar.gz
Initial version of trackarr package.
-rw-r--r--.SRCINFO25
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD48
-rw-r--r--trackarr.service13
-rw-r--r--trackarr.sysusers2
-rw-r--r--trackarr.tmpfiles5
6 files changed, 98 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..78becb65dfa
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = trackarr
+ pkgdesc = Tracker announcements to Sonarr/Radarr/Lidarr..
+ pkgver = 1.7.0
+ pkgrel = 1
+ url = https://gitlab.com/cloudb0x/trackarr
+ arch = i686
+ arch = x86_64
+ arch = armv7h
+ arch = armv6h
+ arch = aarch64
+ license = GPL
+ makedepends = go
+ makedepends = go.rice
+ makedepends = yarn
+ source = https://gitlab.com/cloudb0x/trackarr/-/archive/v1.7.0/trackarr-v1.7.0.tar.bz2
+ source = trackarr.tmpfiles
+ source = trackarr.sysusers
+ source = trackarr.service
+ sha256sums = 2c364fb74979c2d87052259bdc3e2ca794d54025c282e2d292cb41950a069430
+ sha256sums = ce3cf95823f61845cef3c266f9fcf686cf332c859ab7afffe7e5b7f765cba3fa
+ sha256sums = 3512f2f072b1945cf5809bf803cfc00871281bef83536aadac847f5542604c67
+ sha256sums = 7348fdd9e1bd48b8d5eb76abecd00fe621d64c27f211ca97d61dbbc4c71ffdea
+
+pkgname = trackarr
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..e9b8daa7677
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+/*.xz
+/*.gz
+/*.bz2
+/pkg
+/src
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..e5bc0508eb1
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Donald Webster <fryfrog@gmail.com>
+
+pkgname=trackarr
+pkgver=1.7.0
+pkgrel=1
+pkgdesc="Tracker announcements to Sonarr/Radarr/Lidarr.."
+arch=('i686' 'x86_64' 'armv7h' 'armv6h' 'aarch64')
+url="https://gitlab.com/cloudb0x/trackarr"
+license=('GPL')
+makedepends=(
+ 'go'
+ 'go.rice'
+ 'yarn'
+)
+
+source=(
+ "https://gitlab.com/cloudb0x/trackarr/-/archive/v${pkgver}/trackarr-v${pkgver}.tar.bz2"
+ 'trackarr.tmpfiles'
+ 'trackarr.sysusers'
+ 'trackarr.service'
+)
+sha256sums=('2c364fb74979c2d87052259bdc3e2ca794d54025c282e2d292cb41950a069430'
+ 'ce3cf95823f61845cef3c266f9fcf686cf332c859ab7afffe7e5b7f765cba3fa'
+ '3512f2f072b1945cf5809bf803cfc00871281bef83536aadac847f5542604c67'
+ '7348fdd9e1bd48b8d5eb76abecd00fe621d64c27f211ca97d61dbbc4c71ffdea')
+
+# Adapted from Makefile via `make -n`
+prepare() {
+ cd "${srcdir}/${pkgname}-v${pkgver}"
+ go mod vendor
+
+ cd "${srcdir}/${pkgname}-v${pkgver}/web/trackarr-ui" && yarn install && yarn build
+ cd "${srcdir}/${pkgname}-v${pkgver}/web" && rice embed-go
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-v${pkgver}"
+ go build -mod vendor -trimpath -ldflags "-extldflags $LDFLAGS -X main.buildVersion=${pkgver}" -o ${pkgname} .
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-v${pkgver}"
+ install -D -m 0755 trackarr "${pkgdir}/usr/bin/trackarr"
+
+ install -D -m 644 "${srcdir}/trackarr.sysusers" "${pkgdir}/usr/lib/sysusers.d/trackarr.conf"
+ install -D -m 644 "${srcdir}/trackarr.service" "${pkgdir}/usr/lib/systemd/system/trackarr.service"
+ install -D -m 644 "${srcdir}/trackarr.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/trackarr.conf"
+}
diff --git a/trackarr.service b/trackarr.service
new file mode 100644
index 00000000000..f75688af920
--- /dev/null
+++ b/trackarr.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Trackarr Service
+Wants=network-online.target
+After=network-online.target
+
+[Service]
+User=trackarr
+Group=trackarr
+ExecStart=/usr/bin/trackarr --config-dir=/var/lib/trackarr
+Type=simple
+
+[Install]
+WantedBy=multi-user.target
diff --git a/trackarr.sysusers b/trackarr.sysusers
new file mode 100644
index 00000000000..b069570717a
--- /dev/null
+++ b/trackarr.sysusers
@@ -0,0 +1,2 @@
+u trackarr - - /var/lib/trackarr
+g trackarr -
diff --git a/trackarr.tmpfiles b/trackarr.tmpfiles
new file mode 100644
index 00000000000..ccaa79ca58d
--- /dev/null
+++ b/trackarr.tmpfiles
@@ -0,0 +1,5 @@
+# Override this file with a modified version in /etc/tmpfiles.d/
+d /var/lib/trackarr 0755 trackarr trackarr
+Z /var/lib/trackarr - trackarr trackarr
+Z /usr/lib/trackarr - trackarr trackarr
+L /var/log/trackarr - - - - /var/lib/trackarr/logs/