summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorShulhan2020-05-30 23:12:40 +0700
committerShulhan2020-05-30 23:12:40 +0700
commita59152b55cc6bf02631578bf16154da8e99384b6 (patch)
tree69656b17590f11170e2c35a209f9accee5c0a5f3
downloadaur-a59152b55cc6bf02631578bf16154da8e99384b6.tar.gz
awwan: first release v0.1.0
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore2
-rw-r--r--Makefile10
-rw-r--r--PKGBUILD49
4 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1bf33b262851
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = awwan-git
+ pkgdesc = Configuration management software
+ pkgver = 0.0.0.20200530150425.8ac2120686d7
+ pkgrel = 1
+ url = https://sr.ht/~shulhan/awwan
+ arch = i686
+ arch = x86_64
+ arch = armv7h
+ license = custom:BSD
+ makedepends = git
+ makedepends = go>=1.13
+ provides = awwan
+ source = awwan-git::git+https://git.sr.ht/~shulhan/awwan
+ sha1sums = SKIP
+
+pkgname = awwan-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..c554899b2e6d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+*.tar
+/awwan-git
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000000..172791ae974a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,10 @@
+.PHONY: all check release
+
+all:
+ makepkg -sd
+
+check:
+ namcap PKGBUILD
+
+release:
+ makepkg --printsrcinfo > .SRCINFO
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b45b18e45f66
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: shulhan <ms@kilabit.info>
+pkgname=awwan-git
+pkgver=0.1.1.20200530150425.8ac2120686d7
+pkgrel=1
+pkgdesc="Configuration management software"
+arch=('i686' 'x86_64' 'armv7h')
+url="https://sr.ht/~shulhan/awwan"
+license=('custom:BSD')
+
+provides=('awwan')
+
+makedepends=('git' 'go>=1.13')
+source=(
+ "$pkgname::git+https://git.sr.ht/~shulhan/awwan"
+)
+sha1sums=(
+ 'SKIP'
+)
+
+pkgver() {
+ cd ${pkgname}
+
+ GIT_LAST_COMMIT=$(git log -n 1 --date=local --pretty=format:'%ct')
+ DATE=$(date -u --date=@${GIT_LAST_COMMIT} +%Y%0m%0d%0H%0M%0S)
+ HASH=$(git log -n 1 --pretty=format:'%h' --abbrev=12)
+ TAG=$(git describe --abbrev=0 --tags || echo "")
+
+ if [[ "${TAG}" == "" ]]; then
+ TAG="0.0.0"
+ else
+ TAG=$(echo ${TAG} | sed 's/v//')
+ IFS=. read MAJOR MINOR PATCH <<<"${TAG}"
+ PATCH=$((PATCH+1))
+ TAG=${MAJOR}.${MINOR}.${PATCH}
+ fi
+
+ echo ${TAG}.${DATE}.${HASH}
+}
+
+build() {
+ cd ${pkgname}
+ make
+}
+
+package() {
+ cd ${pkgname}
+ install -D ./awwan ${pkgdir}/usr/bin/awwan
+ install -Dm644 ./LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+}