diff options
Diffstat (limited to 'xq')
-rw-r--r-- | xq/.SRCINFO | 13 | ||||
-rw-r--r-- | xq/.gitignore | 3 | ||||
-rw-r--r-- | xq/PKGBUILD | 46 |
3 files changed, 62 insertions, 0 deletions
diff --git a/xq/.SRCINFO b/xq/.SRCINFO new file mode 100644 index 0000000..37ac4a7 --- /dev/null +++ b/xq/.SRCINFO | |||
@@ -0,0 +1,13 @@ | |||
1 | pkgbase = xq | ||
2 | pkgdesc = Command-line XML and HTML beautifier and content extractor | ||
3 | pkgver = 1.2.5 | ||
4 | pkgrel = 2 | ||
5 | url = https://github.com/sibprogrammer/xq | ||
6 | arch = x86_64 | ||
7 | license = MIT | ||
8 | makedepends = go | ||
9 | conflicts = yq | ||
10 | source = xq-1.2.5.tar.gz::https://github.com/sibprogrammer/xq/archive/refs/tags/v1.2.5.tar.gz | ||
11 | sha256sums = 9432a992d2f0ab82a7350da6317e27f835713c340177518dd08581bd0e918365 | ||
12 | |||
13 | pkgname = xq | ||
diff --git a/xq/.gitignore b/xq/.gitignore new file mode 100644 index 0000000..c0d838f --- /dev/null +++ b/xq/.gitignore | |||
@@ -0,0 +1,3 @@ | |||
1 | linux_amd64_xq | ||
2 | linux_386_xq | ||
3 | xq | ||
diff --git a/xq/PKGBUILD b/xq/PKGBUILD new file mode 100644 index 0000000..5a4f12c --- /dev/null +++ b/xq/PKGBUILD | |||
@@ -0,0 +1,46 @@ | |||
1 | # Maintainer: Yigit Sever <yigit at yigitsever dot com> | ||
2 | # Contributor: George Rawlinson <grawlinson@archlinux.org> | ||
3 | |||
4 | pkgname=xq | ||
5 | pkgver=1.2.5 | ||
6 | pkgrel=2 | ||
7 | pkgdesc='Command-line XML and HTML beautifier and content extractor' | ||
8 | arch=('x86_64') | ||
9 | url='https://github.com/sibprogrammer/xq' | ||
10 | license=('MIT') | ||
11 | makedepends=('go') | ||
12 | conflicts=('yq') | ||
13 | source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz") | ||
14 | sha256sums=('9432a992d2f0ab82a7350da6317e27f835713c340177518dd08581bd0e918365') | ||
15 | |||
16 | prepare() { | ||
17 | cd "${pkgname}-${pkgver}" | ||
18 | mkdir -p build/ | ||
19 | } | ||
20 | |||
21 | build() { | ||
22 | cd "${pkgname}-${pkgver}" | ||
23 | export CGO_CPPFLAGS="${CPPFLAGS}" | ||
24 | export CGO_CFLAGS="${CFLAGS}" | ||
25 | export CGO_CXXFLAGS="${CXXFLAGS}" | ||
26 | export CGO_LDFLAGS="${LDFLAGS}" | ||
27 | export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" | ||
28 | go build -o build . | ||
29 | } | ||
30 | |||
31 | package() { | ||
32 | cd "${pkgname}-${pkgver}" | ||
33 | |||
34 | #binary | ||
35 | install -Dm755 build/$pkgname "$pkgdir/usr/bin/$pkgname" | ||
36 | |||
37 | # documentation | ||
38 | install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md | ||
39 | cp -vr assets "$pkgdir/usr/share/doc/$pkgname" | ||
40 | |||
41 | # man | ||
42 | install -vDm644 docs/xq.man "$pkgdir/usr/share/man/man1/$pkgname.1" | ||
43 | |||
44 | # license | ||
45 | install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE | ||
46 | } | ||