summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rawlinson2020-06-20 19:19:02 +1200
committerGeorge Rawlinson2020-06-20 19:19:02 +1200
commit76c50f7ce1f0afaa011b7151b2542b40390ac02a (patch)
tree6cfaa99ebd532fbcc6c969782611537eaf0f0a6c
downloadaur-76c50f7ce1f0afaa011b7151b2542b40390ac02a.tar.gz
addpkg: air 1.12.1-1
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD38
2 files changed, 51 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..51abf08fb743
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,13 @@
+pkgbase = air
+ pkgdesc = Live reload for Go apps
+ pkgver = 1.12.1
+ pkgrel = 1
+ url = https://github.com/cosmtrek/air
+ arch = x86_64
+ license = GPL3
+ makedepends = go
+ source = air-1.12.1.tar.gz::https://github.com/cosmtrek/air/archive/v1.12.1.tar.gz
+ sha512sums = a64421a46af30c4e1bdf865de25d36108100702ba3b5cdac6431f4bff246d3aa949b2ae5b610afa35e8f00ab5bda333c469246ffe2d9b99af21f0f8e5e8db42c
+
+pkgname = air
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e7f9f9874af2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: George Rawlinson <george@rawlinson.net.nz>
+
+pkgname=air
+pkgver=1.12.1
+pkgrel=1
+pkgdesc="Live reload for Go apps"
+arch=(x86_64)
+_url="github.com/cosmtrek/air"
+url="https://$_url"
+license=(GPL3)
+makedepends=(go)
+source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
+sha512sums=('a64421a46af30c4e1bdf865de25d36108100702ba3b5cdac6431f4bff246d3aa949b2ae5b610afa35e8f00ab5bda333c469246ffe2d9b99af21f0f8e5e8db42c')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+ go mod vendor
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+ go build -v \
+ -buildmode=pie \
+ -trimpath \
+ -mod=vendor \
+ -modcacherw \
+ -ldflags "-extldflags $LDFLAGS -X "main.Version=${pkgver}" -X "main.BuildTimestamp="$(date --iso-8601=seconds --utc)""" \
+ "$_url"
+}
+
+package() {
+ # binary
+ install -Dm755 -t "$pkgdir/usr/bin" "$pkgname-$pkgver/$pkgname"
+
+ # documentation
+ install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname" \
+ "$pkgname-$pkgver/"{README.md,air_example.conf}
+}