summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiachen YANG2019-03-13 21:44:43 +0900
committerJiachen YANG2019-03-13 21:44:43 +0900
commit06bf3467ddf0806c8511d35c7070389b2f455eeb (patch)
treee4487836e9291adf25e73da6e59536e4d0bba4ac
downloadaur-06bf3467ddf0806c8511d35c7070389b2f455eeb.tar.gz
add conoha-iso-git
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD37
2 files changed, 52 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f02fc9d47f5c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = conoha-iso-git
+ pkgdesc = ISO image management tool for ConoHa
+ pkgver = 0.4.3.r74.gc5bb13a
+ pkgrel = 1
+ url = https://github.com/hironobu-s/conoha-iso
+ arch = x86_64
+ license = MIT
+ makedepends = go
+ makedepends = git
+ makedepends = dep
+ source = git+https://github.com/hironobu-s/conoha-iso.git
+ md5sums = SKIP
+
+pkgname = conoha-iso-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..abdfacb114ef
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Jiachen YANG <farseerfc@gmail.com>
+_pkgname=conoha-iso
+pkgname=${_pkgname}-git
+pkgver=0.4.3.r74.gc5bb13a
+pkgrel=1
+pkgdesc="ISO image management tool for ConoHa"
+arch=(x86_64)
+url="https://github.com/hironobu-s/conoha-iso"
+license=('MIT')
+makedepends=(go git dep)
+source=("git+https://github.com/hironobu-s/conoha-iso.git")
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$_pkgname"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | sed "s/current/$(grep -oP 'APP_VERSION.*"\K([.0-9]*)(?=")' app.go)/g"
+# printf "0.4.3.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ mkdir -p gopath/src/github.com/$_pkgname
+ ln -rTsf $_pkgname gopath/src/github.com/$_pkgname/$_pkgname
+ export GOPATH="$srcdir"/gopath
+ cd gopath/src/github.com/$_pkgname/$_pkgname
+ dep ensure
+}
+
+build() {
+ export GOPATH="$srcdir"/gopath
+ cd gopath/src/github.com/$_pkgname/$_pkgname
+ make linux
+}
+
+package() {
+ cd gopath/src/github.com/$_pkgname/$_pkgname
+ install -Dm755 bin/linux/conoha-iso $pkgdir/usr/bin/conoha-iso
+}