summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominic Harris2022-01-18 17:36:08 -0500
committerDominic Harris2022-01-18 17:36:08 -0500
commit00e09db8f8d38129cf2a31d7259b0d17410cae3d (patch)
treecbb7e0ed806756ddc126a94124de74da210065ce
downloadaur-00e09db8f8d38129cf2a31d7259b0d17410cae3d.tar.gz
inital
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD35
2 files changed, 47 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..69bd57ab5210
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,12 @@
+pkgbase = catfetch
+ pkgdesc = A small and cute fetch program written in Go
+ pkgver = 0.0.1
+ pkgrel = 1
+ url = https://github.com/Domterion/catfetch
+ arch = x86_64
+ license = MIT
+ makedepends = go
+ source = catfetch-0.0.1::git+https://github.com/Domterion/catfetch
+ sha256sums = SKIP
+
+pkgname = catfetch
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..759bbfb4c38c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Dominic Harris <dominic@domm.me>
+
+pkgname=catfetch-git
+pkgver=0.0.1
+pkgrel=1
+pkgdesc='A small and cute fetch program written in Go'
+arch=('x86_64')
+url="https://github.com/Domterion/catfetch"
+license=('MIT')
+makedepends=('go')
+source=("$pkgname-$pkgver::git+$url")
+sha256sums=('SKIP')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+ mkdir -p build/
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+
+ 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 -o build -ldflags "-linkmode=external -X main.version=${pkgver}" ./cmd/...
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+
+ install -Dm755 build/$pkgname "$pkgdir"/usr/bin/$pkgname
+} \ No newline at end of file