diff options
author | caltlgin | 2020-07-29 17:36:39 +1200 |
---|---|---|
committer | caltlgin | 2020-07-29 17:36:39 +1200 |
commit | df2ebe94bcbde4c0ec44e47c277c5acc4caa95ec (patch) | |
tree | 3dcd5500b94637e0ff115cd22eda5f552cc59b3a | |
download | aur-df2ebe94bcbde4c0ec44e47c277c5acc4caa95ec.tar.gz |
Add to AUR
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 38 |
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: |