summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorkleintux2022-06-19 20:25:28 +0200
committerkleintux2022-06-19 20:25:28 +0200
commitcc0964f10abf939cbe68262d7ca1d7303f41fbe5 (patch)
tree79337ffacb42a54f3951321ffce872ec1e443a04
downloadaur-cc0964f10abf939cbe68262d7ca1d7303f41fbe5.tar.gz
initial commit
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD38
2 files changed, 53 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..46b847f7489b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = mabel-git
+ pkgdesc = A fancy BitTorrent client for the terminal
+ pkgver = r232.93a0f10
+ pkgrel = 1
+ url = https://github.com/mr-karan/mabel
+ arch = any
+ license = GPL3
+ makedepends = git
+ makedepends = go
+ provides = mabel
+ conflicts = mabel
+ source = git+https://github.com/smmr-software/mabel.git
+ sha256sums = SKIP
+
+pkgname = mabel-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3869f43d4051
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: <reg-archlinux AT klein DOT tuxli DOT ch>
+pkgname=mabel-git
+_pkgname=mabel
+pkgver=r232.93a0f10
+pkgrel=1
+pkgdesc="A fancy BitTorrent client for the terminal"
+arch=('any')
+url="https://github.com/mr-karan/mabel"
+license=('GPL3')
+makedepends=('git' 'go')
+provides=('mabel')
+conflicts=('mabel')
+options=()
+source=(git+https://github.com/smmr-software/mabel.git)
+sha256sums=('SKIP')
+build() {
+ cd "${srcdir}"/"${_pkgname}"
+ 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"
+ BUILD_DATE=$(date '+%Y-%m-%d %H:%M:%S')
+ go build -o build/${_pkgname} -ldflags="-X 'main.buildVersion=${pkgver}' -X 'main.buildDate=${BUILD_DATE}'" ./
+}
+
+pkgver() {
+ cd "${_pkgname}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+package() {
+ cd "${srcdir}"/"${_pkgname}"
+ mkdir -p "$pkgdir"/usr/bin/
+ install -Dm644 "COPYING" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
+ install -Dm755 build/"${_pkgname}" "${pkgdir}"/usr/bin/"${_pkgname}"
+ install -Dm644 README.md "${pkgdir}"/usr/share/doc/"${_pkgname}"/README.md
+}