summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEgor Kovetskiy2016-05-30 17:41:25 +0600
committerEgor Kovetskiy2016-05-30 17:41:25 +0600
commit89d1098d780cd7454f109c4d70b79f66185354f8 (patch)
treedaae1404ad5c53620be30f46b57d2642aa637811
downloadaur-89d1098d780cd7454f109c4d70b79f66185354f8.tar.gz
initial commit
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD65
3 files changed, 85 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..56274cec517
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+# Generated by mksrcinfo v8
+# Mon May 30 11:41:21 UTC 2016
+pkgbase = blankd
+ pkgdesc = util for testing http clients or software which makes a http requests
+ pkgver = autogenerated
+ pkgrel = 1
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = go
+ makedepends = git
+ source = blankd::git://github.com:kovetskiy/http-soul.git
+ md5sums = SKIP
+
+pkgname = blankd
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..05ab13949dc
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/*.tar.xz
+/pkg
+/src
+/blankd
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..dd7a0ddbcb5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,65 @@
+# Maintainer: Egor Kovetskiy <e.kovetskiy@office.ngs.ru>
+pkgname=blankd
+pkgver=${PKGVER:-autogenerated}
+pkgrel=${PKGREL:-1}
+pkgdesc="util for testing http clients or software which makes a http requests"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=(
+)
+makedepends=(
+ 'go'
+ 'git'
+)
+
+source=(
+ "blankd::git://github.com:kovetskiy/http-soul.git"
+)
+
+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"
+
+ git submodule init
+ git submodule update
+
+ echo "Running 'go get'..."
+ GO15VENDOREXPERIMENT=1 go get \
+ -ldflags="-X main.version=$pkgver-$pkgrel"
+}
+
+package() {
+ find "$srcdir/.go/bin/" -type f -executable | while read filename; do
+ install -DT "$filename" "$pkgdir/usr/bin/$(basename $filename)"
+ done
+}