summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPumpkinCheshire2020-11-09 00:14:06 +1100
committerPumpkinCheshire2020-11-09 00:14:06 +1100
commit51c59c2e3262cba3905d6deab2eada2b3a291efd (patch)
tree6631e90cec66447964e2d494d88a990476b42b6e
downloadaur-golang-github-dustin-go-humanize.tar.gz
init build
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore18
-rw-r--r--PKGBUILD35
3 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..754ba7f23426
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = golang-github-dustin-go-humanize
+ pkgdesc = Go Humans! (formatters for units to human friendly sizes)
+ pkgver = 1.0.0
+ pkgrel = 1
+ url = https://github.com/dustin/go-humanize
+ arch = x86_64
+ arch = i686
+ license = MIT
+ depends = go
+ options = !strip
+ options = !emptydirs
+ source = go-humanize-1.0.0-1.tar.gz::https://github.com/dustin/go-humanize/archive/v1.0.0.tar.gz
+ sha256sums = e4540bd50ac855143b4f2e509313079c50cf5d8774f09cc10dbca5ae9803d8ba
+
+pkgname = golang-github-dustin-go-humanize
+
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..ad4232ad4833
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: PumpkinCheshire <sollyonzou@gmail.com>
+
+_name=go-humanize
+_author=dustin
+pkgname="golang-github-${_author}-${_name}"
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="Go Humans! (formatters for units to human friendly sizes)"
+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/dustin/${_name}/archive/v$pkgver.tar.gz")
+sha256sums=('e4540bd50ac855143b4f2e509313079c50cf5d8774f09cc10dbca5ae9803d8ba')
+
+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.* COPYING.*; do
+ if [ -e "${_name}-${pkgver}/$f" ]; then
+ install -Dm644 "${_name}-${pkgver}/$f" "$pkgdir/usr/share/licenses/$pkgname/$f"
+ fi
+ done
+}