summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rawlinson2019-10-27 17:05:26 +1300
committerGeorge Rawlinson2019-10-27 17:05:26 +1300
commita294425aabadaf50ebda3bd46fbd1612dd66caaf (patch)
treee2c4dd14032b07630d17dc3eb0585f3ef3392472
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.
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD53
-rw-r--r--realize.patch50
3 files changed, 81 insertions, 32 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 814e9eefda96..5d1c6ba5516f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,18 @@
pkgbase = realize
pkgdesc = Golang live reload and task runner
pkgver = 2.0.2
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/oxequa/realize
arch = x86_64
license = GPL
- makedepends = go>=1.11
+ makedepends = go
makedepends = git
- depends = glibc
- provides = realize
+ makedepends = dep
conflicts = realize-git
- options = !strip
source = realize-2.0.2.tar.gz::https://github.com/oxequa/realize/archive/v2.0.2.tar.gz
+ source = realize.patch
sha512sums = 8e68504710552a487dcec92e6295d18ea830d29192c4c3d1af316589861a04325b99765eb0051adb7ecb8ff344d98bf667453d7bbd8e6d588a44db446f267a56
+ sha512sums = 60f5eddc6efc3a4767f2fb0aa3f174ed1188d379fec24b3009103c27ba5c02d623990b313d424dc0f5bcb5d9e7ac5e2276649ab0d2c6ab270b8902ba8b770ab5
pkgname = realize
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"
}
diff --git a/realize.patch b/realize.patch
new file mode 100644
index 000000000000..24608b68b579
--- /dev/null
+++ b/realize.patch
@@ -0,0 +1,50 @@
+diff --git a/Gopkg.toml b/Gopkg.toml
+index a0e9380..ee3699f 100644
+--- a/Gopkg.toml
++++ b/Gopkg.toml
+@@ -28,10 +28,6 @@
+ name = "github.com/fsnotify/fsnotify"
+ version = "1.4.2"
+
+-[[constraint]]
+- name = "github.com/go-siris/siris"
+- version = "7.4.0"
+-
+ [[constraint]]
+ name = "github.com/labstack/echo"
+ version = "3.2.5"
+diff --git a/realize/cli.go b/realize/cli.go
+index 81ed142..25d6ee5 100644
+--- a/realize/cli.go
++++ b/realize/cli.go
+@@ -3,7 +3,7 @@ package realize
+ import (
+ "fmt"
+ "github.com/fsnotify/fsnotify"
+- "github.com/go-siris/siris/core/errors"
++ "errors"
+ "go/build"
+ "log"
+ "os"
+@@ -18,7 +18,7 @@ var (
+ // RPrefix tool name
+ RPrefix = "realize"
+ // RVersion current version
+- RVersion = "2.1"
++ RVersion = "2.0.2"
+ // RExt file extension
+ RExt = ".yaml"
+ // RFile config file name
+diff --git a/realize/server.go b/realize/server.go
+index 250f118..cbc3e5f 100644
+--- a/realize/server.go
++++ b/realize/server.go
+@@ -14,7 +14,7 @@ import (
+ "os/exec"
+ "runtime"
+ "strconv"
+- "github.com/go-siris/siris/core/errors"
++ "errors"
+ )
+
+ // Dafault host and port