summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PKGBUILD34
1 files changed, 12 insertions, 22 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 8fb7e2e..ba0cf85 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,34 +1,24 @@
1# Maintainer: syui <syui@users.noreply.github.com> 1# Maintainer: syui <syui@users.noreply.github.com>
2pkgname=xq 2pkgname=xq
3pkgver=0.3.3 3pkgver=0.3.4
4pkgrel=1 4pkgrel=1
5pkgdesc="xml to json convert parser" 5pkgdesc="xml to json convert parser"
6arch=('x86_64' 'i686') 6arch=('x86_64' 'i686')
7url="https://github.com/syui/xq" 7url="https://github.com/syui/xq"
8options=('!strip' '!emptydirs') 8makedepends=('go-pie')
9license=('MIT') 9license=('MIT')
10source=("$url/releases/download/$pkgver/linux_386_$pkgname" 10source=("${pkgname}-${pkgver}::${url}/archive/$pkgver.tar.gz")
11 "$url/releases/download/$pkgver/linux_amd64_$pkgname") 11sha256sums=('6dc017cf06a598f8bc781a508ff0e63bbc5d7828026b8e7733dc387aec280ceb')
12noextract=(${source[@]%%::*}) 12build(){
13sha1sums=('c47fa451d0f9f24a174f152a927d095b0cd3dde6' 13 cd "${pkgname}-${pkgver}"
14 'a92b5523373e8d2f0ca8da1974f7be8eb0fb75e1') 14 go build \
15 15 -trimpath \
16 -ldflags "-extldflags ${LDFLAGS}" \
17 -o $pkgname .
18}
16package() { 19package() {
17 mkdir -p ${srcdir}/${pkgname}-${pkgver} 20 cd "${pkgname}-${pkgver}"
18 cd "${srcdir}/${pkgname}-${pkgver}"
19
20 if [ "`uname -m`" = "x86_64" ];then
21 mv ../linux_amd64_$pkgname $pkgname
22 chmod +x $pkgname
23 fi
24
25 if [ "`uname -m`" = "i684" ];then
26 mv ../linux_386_$pkgname $pkgname
27 chmod +x $pkgname
28 fi
29
30 install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname" 21 install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
31 #sudo install -Dm755 "$pkgdir/usr/bin/$pkgname" /usr/bin
32} 22}
33 23
34# vim:set ts=2 sw=2 et: 24# vim:set ts=2 sw=2 et: