summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lublin2020-06-22 12:01:21 +0200
committerDaniel Lublin2020-06-22 12:01:21 +0200
commitf6ad8cf016497cf73ba3ef817aeee0558021e593 (patch)
treeab30fbd528676d509fe6f083b71ef3a006e0bbf8
downloadaur-hd-git.tar.gz
Init
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD37
2 files changed, 54 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..7ed957b8968f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = hd-git
+ pkgdesc = Small hex dumper utility (with optional HexII output)
+ pkgver = 1.0.0.r5.g4bc9165
+ pkgrel = 1
+ url = https://github.com/kastelo/hd
+ arch = i686
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = go-pie
+ provides = hd
+ conflicts = hd
+ source = hd::git+https://github.com/kastelo/hd
+ sha256sums = SKIP
+
+pkgname = hd-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..31cf74f4753e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Daniel Lublin <daniel@lublin.se>
+
+_pkgname=hd
+pkgname=$_pkgname-git
+pkgver=1.0.0.r5.g4bc9165
+pkgrel=1
+pkgdesc='Small hex dumper utility (with optional HexII output)'
+arch=('i686' 'x86_64')
+url="https://github.com/kastelo/$_pkgname"
+license=('MIT')
+makedepends=('git' 'go-pie')
+provides=($_pkgname)
+conflicts=($_pkgname)
+source=("$_pkgname::git+$url")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd $_pkgname
+ git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd $_pkgname
+ go build \
+ -trimpath \
+ -buildmode=pie \
+ -modcacherw \
+ -ldflags "-extldflags \"${LDFLAGS}\"" \
+ -o $_pkgname \
+ .
+}
+
+package() {
+ cd $_pkgname
+ install -Dm755 $_pkgname "$pkgdir"/usr/bin/$_pkgname
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
+}