summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD47
2 files changed, 63 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..71cea074d1e7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = mangodl-git
+ pkgdesc = CLI tool for downloading manga
+ pkgver = 1.5.r1.ga3f98e6
+ pkgrel = 1
+ url = https://github.com/Gyro7/mangodl
+ arch = x86_64
+ license = GPL3
+ makedepends = git
+ makedepends = go
+ depends = glibc
+ provides = mangodl
+ conflicts = mangodl
+ source = mangodl-git::git+https://github.com/Gyro7/mangodl
+ sha256sums = SKIP
+
+pkgname = mangodl-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..efa802b44107
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
+# Maintainer: Gyro7 <gyro@sach1.tk>
+
+pkgname=mangodl-git
+pkgver=1.5.r1.ga3f98e6
+pkgrel=1
+pkgdesc="CLI tool for downloading manga"
+arch=('x86_64')
+url="https://github.com/Gyro7/mangodl"
+license=('GPL3')
+depends=('glibc')
+makedepends=('git' 'go')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=("$pkgname::git+$url")
+sha256sums=('SKIP')
+
+pkgver() {
+ git -C "$pkgname" describe --long --tags | awk -F '-' '{printf "%s.r%s.%s", $2, $4, $5}' | sed 's/^v//'
+}
+
+prepare() {
+ cd "$pkgname"
+ mkdir -p build
+}
+
+build() {
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+
+ cd "$pkgname"
+ go build -o build .
+}
+
+check() {
+ cd "$pkgname"
+ go test ./...
+}
+
+package() {
+ cd "$pkgname"
+ install -D build/mangodl -t "$pkgdir/usr/bin/"
+ install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
+}