diff options
author | Tony Lambiris | 2019-02-20 18:50:46 -0500 |
---|---|---|
committer | Tony Lambiris | 2019-02-20 18:50:46 -0500 |
commit | cdd515b3e401d2301ec720cd00db3a183cd9b298 (patch) | |
tree | 7a25701168956f43f169c1256d192d15613a5c7c | |
download | aur-cdd515b3e401d2301ec720cd00db3a183cd9b298.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 51 |
3 files changed, 73 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..adc3ffab2966 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = gogololcat-git + pkgdesc = golang implementation of lolcat + pkgver = 3.236b66e + pkgrel = 1 + url = https://github.com/vbatts/gogololcat/ + arch = x86_64 + arch = i686 + license = MIT + makedepends = go + provides = gogololcat + provides = gogololcat-bin + conflicts = gogololcat + conflicts = gogololcat-bin + source = gogololcat-git::git+https://github.com/vbatts/gogololcat/ + sha256sums = SKIP + +pkgname = gogololcat-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..8a4bcd39377d --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +src +pkg +gogololcat-git +*pkg.tar.xz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..9da037e25057 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Tony Lambiris <tony@criticalstack.com> + +pkgname=gogololcat-git +pkgver=3.236b66e +pkgrel=1 +pkgdesc="golang implementation of lolcat" +url="https://github.com/vbatts/gogololcat/" +arch=('x86_64' 'i686') +license=('MIT') +conflicts=(gogololcat gogololcat-bin) +provides=(gogololcat gogololcat-bin) +makedepends=('go') +source=("${pkgname}::git+${url}") +sha256sums=('SKIP') + +pkgver() { + cd "${srcdir}/${pkgname}" + + echo "$(git rev-list --count HEAD).$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname}" + + install -m755 -d "${srcdir}/go/src/github.com/vbatts/" + ln -sf "${srcdir}/${pkgname}" "${srcdir}/go/src/github.com/vbatts/gogololcat" + + cd "${srcdir}/go/src/github.com/vbatts/gogololcat" + + export GOROOT="/usr/lib/go" GOPATH="${srcdir}/go" + go get -v ./... +} + +build() { + cd "${srcdir}/go/src/github.com/vbatts/gogololcat" + + mkdir -p build + + export GOROOT="/usr/lib/go" GOPATH="${srcdir}/go" + go build -ldflags "-s -w" \ + -gcflags="all=-trimpath=${GOPATH}/src" \ + -asmflags="all=-trimpath=${GOPATH}/src" \ + -o build/lolcat ./cmd/lolcat +} + +package() { + cd "${srcdir}/go/src/github.com/vbatts/gogololcat" + + install -Dm755 "./build/lolcat" "${pkgdir}/usr/bin/lolcat" + install -Dm644 "./LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} |