summaryrefslogtreecommitdiffstats
path: root/xq
diff options
context:
space:
mode:
Diffstat (limited to 'xq')
-rw-r--r--xq/.SRCINFO13
-rw-r--r--xq/.gitignore3
-rw-r--r--xq/PKGBUILD46
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 @@
1pkgbase = 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
13pkgname = 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 @@
1linux_amd64_xq
2linux_386_xq
3xq
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
4pkgname=xq
5pkgver=1.2.5
6pkgrel=2
7pkgdesc='Command-line XML and HTML beautifier and content extractor'
8arch=('x86_64')
9url='https://github.com/sibprogrammer/xq'
10license=('MIT')
11makedepends=('go')
12conflicts=('yq')
13source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
14sha256sums=('9432a992d2f0ab82a7350da6317e27f835713c340177518dd08581bd0e918365')
15
16prepare() {
17 cd "${pkgname}-${pkgver}"
18 mkdir -p build/
19}
20
21build() {
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
31package() {
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}