diff options
author | PumpkinCheshire | 2020-11-09 00:51:55 +1100 |
---|---|---|
committer | PumpkinCheshire | 2020-11-09 00:51:55 +1100 |
commit | 27889cd5995bddf67e5646797a95135edcd3c7c4 (patch) | |
tree | 874b237498fd28e769af3262c042d1944f782b91 | |
download | aur-golang-github-voxelbrain-goptions.tar.gz |
init build
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | .gitignore | 18 | ||||
-rw-r--r-- | PKGBUILD | 35 |
3 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..dcb904840ea4 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = golang-github-voxelbrain-goptions + pkgdesc = A flexible parser for command line options + pkgver = 2.5.11 + pkgrel = 1 + url = https://github.com/voxelbrain/goptions + arch = x86_64 + arch = i686 + license = MIT + depends = go + options = !strip + options = !emptydirs + source = goptions-2.5.11-1.tar.gz::https://github.com/voxelbrain/goptions/archive/2.5.11.tar.gz + sha256sums = cf4df6a6a7764867f50c278c87f941ab81722566d5e1198346c65a428ab5c874 + +pkgname = golang-github-voxelbrain-goptions + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..36de99b73cd9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +*.xz +*.bz2 +*.log +*.rpm +*.deb +*.tar* +*.gz +*.zip +*.run +*.whl +*.AppImage +*.jar +*.tgz +*.pdf + +src/ +pkg/ +*LICENSE diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..61f313210ade --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,35 @@ +# Maintainer: PumpkinCheshire <sollyonzou@gmail.com> + +_name=goptions +_author=voxelbrain +pkgname="golang-github-${_author}-${_name}" +pkgver=2.5.11 +pkgrel=1 +pkgdesc="A flexible parser for command line options" +arch=('x86_64' 'i686') +url="https://github.com/${_author}/${_name}" +license=('MIT') +depends=('go') +options=('!strip' '!emptydirs') +source=("$_name-$pkgver-$pkgrel.tar.gz::https://github.com/${_author}/${_name}/archive/$pkgver.tar.gz") +sha256sums=('cf4df6a6a7764867f50c278c87f941ab81722566d5e1198346c65a428ab5c874') + +check() { + export GOPATH="$srcdir/build:/usr/share/gocode" + mkdir -p "$srcdir"/build/src/github.com/$_author + cp -a "$srcdir"/$_name-$pkgver "$srcdir"/build/src/github.com/$_author/$_name + cd "$srcdir/build/src/github.com/$_author/$_name" + go test -v $(go list ./...) +} + +package() { + mkdir -p "$pkgdir/usr/share/gocode/src/github.com/$_author/" + cp -a --preserve=timestamps "${_name}-${pkgver}" "$pkgdir/usr/share/gocode/src/github.com/$_author/$_name" + + # Package license (if available) + for f in LICENSE COPYING LICENSE.txt COPYING.*; do + if [ -e "$srcdir/${_name}-${pkgver}/$f" ]; then + install -Dm644 "$srcdir/${_name}-${pkgver}/$f" "$pkgdir/usr/share/licenses/$pkgname/$f" + fi + done +} |