summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStanislav Seletskiy2015-09-28 21:54:25 +0600
committerStanislav Seletskiy2015-09-28 21:54:25 +0600
commite55cad136ce69cf8328cb32bbcca5920e30e9c6f (patch)
tree27e6d5af21984863e26713eb87a9521638a7e6e9
downloadaur-e55cad136ce69cf8328cb32bbcca5920e30e9c6f.tar.gz
pkgbuild initial commit
-rw-r--r--.SRCINFO19
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD54
3 files changed, 77 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0a02b23557ff
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = hastur
+ pkgdesc = zero-configuration systemd containers
+ pkgver = autogenerated
+ pkgrel = 1
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = go
+ makedepends = git
+ depends = bridge-utils
+ depends = iproute2
+ depends = util-linux
+ depends = arch-install-scripts
+ depends = systemd
+ source = hastur::git://github.com/seletskiy/hastur
+ md5sums = SKIP
+
+pkgname = hastur
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..4e882ef2d370
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/*.tar.xz
+/pkg
+/src
+/hastur
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ef4b2ac26b42
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+pkgname=hastur
+pkgver="autogenerated"
+pkgrel=1
+pkgdesc="zero-configuration systemd containers"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('bridge-utils' 'iproute2' 'util-linux' 'arch-install-scripts' 'systemd')
+makedepends=('go' 'git')
+
+source=(
+ "hastur::git://github.com/seletskiy/hastur"
+)
+
+md5sums=(
+ 'SKIP'
+)
+
+backup=(
+)
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ local date=$(git log -1 --format="%cd" --date=short | sed s/-//g)
+ local count=$(git rev-list --count HEAD)
+ local commit=$(git rev-parse --short HEAD)
+ echo "$date.${count}_$commit"
+}
+
+build() {
+ cd "$srcdir/$pkgname"
+
+ if [ -L "$srcdir/$pkgname" ]; then
+ rm "$srcdir/$pkgname" -rf
+ mv "$srcdir/.go/src/$pkgname/" "$srcdir/$pkgname"
+ fi
+
+ rm -rf "$srcdir/.go/src"
+
+ mkdir -p "$srcdir/.go/src"
+
+ export GOPATH="$srcdir/.go"
+
+ mv "$srcdir/$pkgname" "$srcdir/.go/src/"
+
+ cd "$srcdir/.go/src/$pkgname/"
+ ln -sf "$srcdir/.go/src/$pkgname/" "$srcdir/$pkgname"
+
+ echo "Running 'go get'..."
+ go get
+}
+
+package() {
+ install -DT "$srcdir/.go/bin/$pkgname" "$pkgdir/usr/bin/$pkgname"
+}