summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ac294eff845c864015e9ab21232e3846d451ad0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Maintainer: Tpaefawzen <GitHub: Tpaefawzen>

pkgname=parsrs-git
pkgver=r139.81c3593
pkgrel=2
pkgdesc="CSV, JSON, XML parsers/generators written in pure POSIX shellscript"
arch=('any')
url="https://github.com/ShellShoccar-jpn/Parsrs"
license=('Unlicense' 'custom:CC0')
depends=('git')
groups=('shellshoccar-jpn')
provides=("parsrs")
source=("${pkgname}::git+https://github.com/ShellShoccar-jpn/Parsrs.git")
md5sums=('SKIP')

_pkgname=${pkgname%-git}

pkgver() {
	cd "$srcdir/$pkgname"

	# nothing ever tagged yet!
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
	cd "$srcdir/$pkgname"

	# executables
	_bins=(convx2j.sh
		escj.sh
		makrc.sh
		makrj.sh
		makrx.sh
		parsrc.sh
		parsrj.sh
		parsrt.sh
		parsrx.sh
		unescj.sh
		xpathread.sh)
	install -dm755 "$pkgdir/usr/bin/"
	install -Dm755 ${_bins[@]} "$pkgdir/usr/bin/"

	# documents
	install -dm755 "$pkgdir/usr/share/licenses/$_pkgname/"
	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/"

	## manuals
	_mans=(MAN/ja/makrj.sh.txt
		MAN/ja/parsrj.sh.txt
		MAN/ja/parsrx.sh.txt
		MAN/ja/unescj.sh.txt)
	install -dm755 "$pkgdir/usr/share/doc/$_pkgname/MAN/ja/"
	install -Dm644 ${_mans[@]} "$pkgdir/usr/share/doc/$_pkgname/MAN/ja/"
}