summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorcaltlgin2020-07-29 17:36:39 +1200
committercaltlgin2020-07-29 17:36:39 +1200
commitdf2ebe94bcbde4c0ec44e47c277c5acc4caa95ec (patch)
tree3dcd5500b94637e0ff115cd22eda5f552cc59b3a
downloadaur-df2ebe94bcbde4c0ec44e47c277c5acc4caa95ec.tar.gz
Add to AUR
-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..05bbe9c48af5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = anew-git
+ pkgdesc = Append lines from stdin to a file, but only if they dont already appear in the file
+ pkgver = r6.f212493
+ pkgrel = 1
+ url = https://github.com/tomnomnom/anew
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = go
+ provides = anew
+ source = git+https://github.com/tomnomnom/anew.git
+ sha256sums = SKIP
+
+pkgname = anew-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..88c53223ed76
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Caltlgin Stsodaat <contact@fossdaily.xyz>
+
+_pkgname=anew
+pkgname=${_pkgname}-git
+pkgver=r6.f212493
+pkgrel=1
+pkgdesc='Append lines from stdin to a file, but only if they dont already appear in the file'
+arch=('x86_64')
+url='https://github.com/tomnomnom/anew'
+license=('MIT')
+makedepends=('git' 'go')
+provides=("${_pkgname}")
+source=("git+${url}.git")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "${_pkgname}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
+
+ cd "${_pkgname}"
+ go build -v -o "${_pkgname}" main.go
+}
+
+package() {
+ install -Dm755 "${_pkgname}/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
+ install -Dm644 "${_pkgname}/README.mkd" "${pkgdir}/usr/share/doc/${_pkgname}/README.md"
+ install -Dm644 "${_pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
+}
+
+# vim: ts=2 sw=2 et: