summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorGeorge Rawlinson2019-10-27 17:05:26 +1300
committerGeorge Rawlinson2019-10-27 17:05:26 +1300
commita294425aabadaf50ebda3bd46fbd1612dd66caaf (patch)
treee2c4dd14032b07630d17dc3eb0585f3ef3392472 /PKGBUILD
parent58b499256f8978dac759da87bbcccb3c374f0526 (diff)
downloadaur-realize.tar.gz
refactor package due to tooling changes
This project has essentially been abandoned, so it has been patched the minimum required in order to compile and run successfully.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD53
1 files changed, 26 insertions, 27 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9b15cd4d9895..97453fcac39d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,45 +1,44 @@
# Maintainer: George Rawlinson <george@rawlinson.net.nz>
pkgname=realize
pkgver=2.0.2
-pkgrel=2
+pkgrel=3
pkgdesc="Golang live reload and task runner"
arch=('x86_64')
url="https://github.com/oxequa/realize"
license=('GPL')
conflicts=('realize-git')
-provides=('realize')
-depends=('glibc')
-makedepends=('go>=1.11' 'git')
-options=('!strip')
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/oxequa/${pkgname}/archive/v${pkgver}.tar.gz")
-sha512sums=('8e68504710552a487dcec92e6295d18ea830d29192c4c3d1af316589861a04325b99765eb0051adb7ecb8ff344d98bf667453d7bbd8e6d588a44db446f267a56')
+makedepends=('go' 'git' 'dep')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/oxequa/${pkgname}/archive/v${pkgver}.tar.gz"
+ "$pkgname.patch")
+sha512sums=('8e68504710552a487dcec92e6295d18ea830d29192c4c3d1af316589861a04325b99765eb0051adb7ecb8ff344d98bf667453d7bbd8e6d588a44db446f267a56'
+ '60f5eddc6efc3a4767f2fb0aa3f174ed1188d379fec24b3009103c27ba5c02d623990b313d424dc0f5bcb5d9e7ac5e2276649ab0d2c6ab270b8902ba8b770ab5')
prepare() {
- # setup env variables & dirs
- mkdir -p "${srcdir}/go"
- export GOPATH="${srcdir}/go"
- export GO111MODULE=on
+ # patching
+ cd "$pkgname-$pkgver"
+ patch -p1 -i "$srcdir/realize.patch"
- # initialize module & add dependencies to go.mod
- cd "${srcdir}/${pkgname}-${pkgver}"
- if [ ! -f go.mod ]; then
- go mod init github.com/oxequa/realize
- go mod tidy
- fi
+ # symlink extracted archive to $GOPATH
+ cd "$srcdir"
+ mkdir -p gopath/src/github.com/oxequa
+ ln -srfT $pkgname-$pkgver gopath/src/github.com/oxequa/realize
+ export GOPATH="$srcdir"/gopath
- # download dependencies
- go mod download
+ # download dependencies with dep
+ cd "$srcdir/gopath/src/github.com/oxequa/realize"
+ dep ensure -v
}
-
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- go build -o "${pkgname}-${pkgver}"
+ export GOPATH="$srcdir"/gopath
+ cd gopath/src/github.com/oxequa/realize
+ go install \
+ -trimpath \
+ -ldflags "-extldflags $LDFLAGS" \
+ -v ./...
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- install -Dm755 "${pkgname}-${pkgver}" "${pkgdir}/usr/bin/realize"
- install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ cd "$srcdir"
+ install -Dm755 "gopath/bin/$pkgname" "${pkgdir}/usr/bin/realize"
+ install -Dm644 "$pkgname-$pkgver/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}