Package Details: exatorrent 0.1.2-1

Git Clone URL: https://aur.archlinux.org/exatorrent.git (read-only, click to copy)
Package Base: exatorrent
Description: Self-hostable, easy-to-use, lightweight, and feature-rich torrent client written in Go
Upstream URL: https://github.com/varbhat/exatorrent
Licenses: GPL3
Submitter: aditya
Maintainer: None
Last Packager: aditya
Votes: 2
Popularity: 0.000000
First Submitted: 2021-08-25 18:52 (UTC)
Last Updated: 2022-03-13 22:39 (UTC)

Required by (0)

Sources (1)

Latest Comments

aditya commented on 2021-08-26 23:53 (UTC)

Updated, thanks!

lmartinez-mirror commented on 2021-08-26 23:39 (UTC)

Wrote up this patch to address a few things with this package:

  • Since it requires compilation, it cannot be arch-independent
  • Packages should not provide themselves (this is already implied)
  • You don't need to rebuild in package()
  • Use a tarball wherever possible, that way you can verify it with sha256sum
diff --git a/PKGBUILD b/PKGBUILD
index 73b78cc..ca65347 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,17 +1,17 @@
 # Maintainer: Aditya Sirish <aditya@saky.in>
+# Contributor: Luis Martinez <luis dot martinez at disroot dot org>

-pkgname=('exatorrent')
+pkgname=exatorrent
 pkgver=0.0.1
-pkgrel=2
+pkgrel=3
 pkgdesc="Self-hostable, easy-to-use, lightweight, and feature-rich torrent client written in Go"
-provides=('exatorrent')
-arch=('any')
+arch=('x86_64')
 license=('GPL3')
 url="https://github.com/varbhat/exatorrent"
-source=("git+${url}.git#tag=v${pkgver}")
-makedepends=('go' 'git' 'npm')
-
-sha256sums=('SKIP')
+depends=('gcc-libs')
+makedepends=('go' 'npm')
+source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
+sha256sums=('b0e8037760b78ff99041cfd45b08cd7b6f302b8e1ce27b563bf984172f3188fc')

 build() {
     export CGO_CPPFLAGS="${CPPFLAGS}"
@@ -20,20 +20,15 @@ build() {
     export CGO_LDFLAGS="${LDFLAGS}"
     export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"

-    cd "${pkgname}"
-    make web
-    go build -o build/"${pkgname}" "${pkgname}.go"
+    cd "$pkgname-$pkgver"
+    pushd internal/web
+    npm ci --cache "$srcdir/npm-cache"
+    npm run build
+    popd
+    go build -o build/exatorrent
 }

 package() {
-    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"
-
-    cd "${pkgname}"
-    make web
-    go build -o build/"${pkgname}" "${pkgname}.go"
+    cd "$pkgname-$pkgver"
     install -Dm 755 -t "${pkgdir}/usr/bin" build/exatorrent
 }

aditya commented on 2021-08-26 20:05 (UTC)

Made some changes to how it's built. @kleintux let me know if this looks okay, thanks.

aditya commented on 2021-08-26 16:44 (UTC)

I'll be fixing a couple of things tonight.