diff options
author | syui | 2020-02-29 09:08:23 +0900 |
---|---|---|
committer | syui | 2020-02-29 09:08:23 +0900 |
commit | fb4b46ffaac0db52ee9d13592a4426cacc620a84 (patch) | |
tree | fa2fa2005f4e2e0e55f8778ec2f60cf0c718517b | |
parent | 29a9db381002b5b703157c50f93ff87b88091001 (diff) | |
download | packages-fb4b46ffaac0db52ee9d13592a4426cacc620a84.tar.gz packages-fb4b46ffaac0db52ee9d13592a4426cacc620a84.tar.bz2 packages-fb4b46ffaac0db52ee9d13592a4426cacc620a84.zip |
fix pkgbuild
-rw-r--r-- | PKGBUILD | 34 |
1 files changed, 12 insertions, 22 deletions
@@ -1,34 +1,24 @@ | |||
1 | # Maintainer: syui <syui@users.noreply.github.com> | 1 | # Maintainer: syui <syui@users.noreply.github.com> |
2 | pkgname=xq | 2 | pkgname=xq |
3 | pkgver=0.3.3 | 3 | pkgver=0.3.4 |
4 | pkgrel=1 | 4 | pkgrel=1 |
5 | pkgdesc="xml to json convert parser" | 5 | pkgdesc="xml to json convert parser" |
6 | arch=('x86_64' 'i686') | 6 | arch=('x86_64' 'i686') |
7 | url="https://github.com/syui/xq" | 7 | url="https://github.com/syui/xq" |
8 | options=('!strip' '!emptydirs') | 8 | makedepends=('go-pie') |
9 | license=('MIT') | 9 | license=('MIT') |
10 | source=("$url/releases/download/$pkgver/linux_386_$pkgname" | 10 | source=("${pkgname}-${pkgver}::${url}/archive/$pkgver.tar.gz") |
11 | "$url/releases/download/$pkgver/linux_amd64_$pkgname") | 11 | sha256sums=('6dc017cf06a598f8bc781a508ff0e63bbc5d7828026b8e7733dc387aec280ceb') |
12 | noextract=(${source[@]%%::*}) | 12 | build(){ |
13 | sha1sums=('c47fa451d0f9f24a174f152a927d095b0cd3dde6' | 13 | cd "${pkgname}-${pkgver}" |
14 | 'a92b5523373e8d2f0ca8da1974f7be8eb0fb75e1') | 14 | go build \ |
15 | 15 | -trimpath \ | |
16 | -ldflags "-extldflags ${LDFLAGS}" \ | ||
17 | -o $pkgname . | ||
18 | } | ||
16 | package() { | 19 | package() { |
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: |