summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authortuxxx2023-09-04 10:05:26 +0200
committertuxxx2023-09-04 10:05:26 +0200
commiteb225aaff4d6b1aba58644872e534fd9d048a222 (patch)
treeeb746a9ae5ee4e13ee03cc41c60bcdf77805bcf8
downloadaur-nzb-monkey-go-git.tar.gz
initial commit
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD35
-rw-r--r--nzb-monkey-go.install16
3 files changed, 68 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ad67036b5f57
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = nzb-monkey-go-git
+ pkgdesc = NZBLNK-URI handler supporting SABnzbd, NZBGet & Synology DS (Go-based)
+ pkgver = r57.2c2c189
+ pkgrel = 1
+ url = https://github.com/Tensai75/nzb-monkey-go
+ install = nzb-monkey-go.install
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = go
+ optdepends = xdg-utils: register nzblink handler
+ provides = nzb-monkey-go
+ conflicts = nzb-monkey-go-bin
+ source = git+https://github.com/Tensai75/nzb-monkey-go.git#branch=main
+ sha256sums = SKIP
+
+pkgname = nzb-monkey-go-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b91d2cca3c7c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: tuxxx <nzb_tuxxx@proton.me>
+pkgname=nzb-monkey-go-git
+pkgver=r57.2c2c189
+pkgrel=1
+pkgdesc="NZBLNK-URI handler supporting SABnzbd, NZBGet & Synology DS (Go-based)"
+arch=('x86_64')
+url="https://github.com/Tensai75/nzb-monkey-go"
+license=('MIT')
+makedepends=('git' 'go')
+optdepends=('xdg-utils: register nzblink handler')
+provides=("nzb-monkey-go")
+conflicts=("nzb-monkey-go-bin")
+install=nzb-monkey-go.install
+source=("git+$url.git#branch=main")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/nzb-monkey-go"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "$srcdir/nzb-monkey-go"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+ go build
+}
+
+package() {
+ cd "$srcdir/nzb-monkey-go"
+ install -Dm755 "nzb-monkey-go" "$pkgdir/usr/bin/nzb-monkey-go"
+}
diff --git a/nzb-monkey-go.install b/nzb-monkey-go.install
new file mode 100644
index 000000000000..9ab919676d28
--- /dev/null
+++ b/nzb-monkey-go.install
@@ -0,0 +1,16 @@
+post_install() {
+ echo ">>> To complete the installation of nzb-monkey-go, please run (as normal user):"
+ echo ">>> nzb-monkey-go --register"
+ echo ">>> This will create a .conf file in your home .config folder, a .desktop file in ~/.local/share/applications/ and add the nzblink handler to mimeapps.list using xdg-mime"
+ echo ">>> After this, the config will be OPENED AUTOMATICALLY WITH YOUR DEFAULT DESKTOP EDITOR. Make sure to edit the config to your needs."
+}
+
+post_remove() {
+ echo ">>> If you no longer need the nzb-monkey-go desktop integration, consider removing:"
+ echo ">>> ~/.config/nzb-monkey-go.conf"
+ echo ">>> ~/.local/share/applications/nzblnk.desktop"
+ echo ">>> Also, please review your default application for 'x-scheme-handler/nzblnk' using:"
+ echo ">>> xdg-mime query default x-scheme-handler/nzblnk"
+ echo ">>> And adjust as necessary."
+}
+