diff options
Diffstat (limited to 'xq/PKGBUILD')
| -rw-r--r-- | xq/PKGBUILD | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/xq/PKGBUILD b/xq/PKGBUILD index 45edffc..6b24edd 100644 --- a/xq/PKGBUILD +++ b/xq/PKGBUILD | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | # Contributor: George Rawlinson <grawlinson@archlinux.org> | 2 | # Contributor: George Rawlinson <grawlinson@archlinux.org> |
| 3 | 3 | ||
| 4 | pkgname=xq | 4 | pkgname=xq |
| 5 | pkgver=1.3.0 | 5 | pkgver=1.4.0 |
| 6 | pkgrel=2 | 6 | pkgrel=1 |
| 7 | pkgdesc='Command-line XML and HTML beautifier and content extractor' | 7 | pkgdesc='Command-line XML and HTML beautifier and content extractor' |
| 8 | arch=('x86_64') | 8 | arch=('x86_64') |
| 9 | url='https://github.com/sibprogrammer/xq' | 9 | url='https://github.com/sibprogrammer/xq' |
| @@ -11,28 +11,31 @@ license=('MIT') | |||
| 11 | makedepends=('go') | 11 | makedepends=('go') |
| 12 | conflicts=('yq') | 12 | conflicts=('yq') |
| 13 | source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz") | 13 | source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz") |
| 14 | sha256sums=('6f75b4433ac83b9ddbc60e1106349e22654d14bb58e198f811b2f9d10181ee8f') | 14 | sha256sums=('6cc922d2241e10968d8985b2a8a8abe1328d8bd0ebcf5f7741d8387022436f00') |
| 15 | 15 | ||
| 16 | prepare() { | 16 | prepare() { |
| 17 | cd "${pkgname}-${pkgver}" | 17 | cd "${pkgname}-${pkgver}" |
| 18 | mkdir -p build/ | 18 | mkdir -p build/ |
| 19 | export GOPATH="${srcdir}" | ||
| 20 | go mod download -modcacherw | ||
| 19 | } | 21 | } |
| 20 | 22 | ||
| 21 | build() { | 23 | build() { |
| 22 | cd "${pkgname}-${pkgver}" | 24 | cd "${pkgname}-${pkgver}" |
| 23 | export CGO_CPPFLAGS="${CPPFLAGS}" | 25 | export CGO_CPPFLAGS="${CPPFLAGS}" |
| 24 | export CGO_CFLAGS="${CFLAGS}" | 26 | export CGO_CFLAGS="${CFLAGS}" |
| 25 | export CGO_CXXFLAGS="${CXXFLAGS}" | 27 | export CGO_CXXFLAGS="${CXXFLAGS}" |
| 26 | export CGO_LDFLAGS="${LDFLAGS}" | 28 | export CGO_LDFLAGS="${LDFLAGS}" |
| 27 | export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" | 29 | export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" |
| 28 | go build -o build . | 30 | export GOPATH="${srcdir}" |
| 31 | go build -o build . | ||
| 29 | } | 32 | } |
| 30 | 33 | ||
| 31 | package() { | 34 | package() { |
| 32 | cd "${pkgname}-${pkgver}" | 35 | cd "${pkgname}-${pkgver}" |
| 33 | 36 | ||
| 34 | #binary | 37 | #binary |
| 35 | install -Dm755 build/$pkgname "$pkgdir/usr/bin/$pkgname" | 38 | install -Dm755 build/$pkgname "$pkgdir/usr/bin/$pkgname" |
| 36 | 39 | ||
| 37 | # documentation | 40 | # documentation |
| 38 | install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md | 41 | install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md |
