summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b492fa6f7c84e5f59410c23e22ccb33ba6f3f803 (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
55
56
57
58
59
60
# Maintainer: not_anonymous <nmlibertarian@gmail.com>
# Contributor: Ruslan Nabioullin <rnabioullin@gmail.com>
# Contributor: Vitaliy Berdinskikh, aka UR6LAD <ur6lad@archlinux.org.ua>

pkgname=owx
pkgver=r22
#.266923b
pkgrel=1
pkgdesc="HAM RADIO - CLI tool for programming Wouxun (KG669V,UVD1-3,UV1A, et al) HTs."
arch=('i686' 'x86_64')
url="http://owx.chmurka.net"
license=('Apache' 'custom:beerware')
depends=('gcc-libs')
makedepends=('git')
replaces=('wouxun')
source=("$pkgname-git::git+http://git.chmurka.net/$pkgname"
	LICENSE)
md5sums=('SKIP'
         '02ecf727fd7a0948393044fc17fc6f11')

pkgver() {
	cd "$srcdir/$pkgname-git/"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" \
		| sed "s/\..*//"
}

prepare() {
	cd "$srcdir/$pkgname-git/"
	sed -i -e s:SVN:${pkgver}: src/version.h
	sed -i -e s:' help':' README': src/cmds.cc

	sed -i -e s:'local/':'': docs/README
	sed -i -e s:'libexec':'lib/owx': docs/README
}

build() {
	cd "$srcdir/$pkgname-git/"
	make
}

package() {
	mkdir -p $pkgdir/usr/{bin,lib/$pkgname}
	mkdir -p $pkgdir/usr/share/{doc/$pkgname,licenses/$pkgname}

	cd $srcdir
	install -m 644 LICENSE $pkgdir/usr/share/licenses/$pkgname

	cd "$srcdir/$pkgname-git/docs"
	install -m 644 * $pkgdir/usr/share/doc/$pkgname
	rm  $pkgdir/usr/share/doc/$pkgname/LICENSE

	cd ../src
	install -D -m 755 $pkgname $pkgdir/usr/lib/$pkgname/$pkgname
	ln -sf ../lib/$pkgname/$pkgname $pkgdir/usr/bin/$pkgname-check
	ln -sf ../lib/$pkgname/$pkgname $pkgdir/usr/bin/$pkgname-get
	ln -sf ../lib/$pkgname/$pkgname $pkgdir/usr/bin/$pkgname-put
	ln -sf ../lib/$pkgname/$pkgname $pkgdir/usr/bin/$pkgname-export
	ln -sf ../lib/$pkgname/$pkgname $pkgdir/usr/bin/$pkgname-import
	ln -sf ../lib/$pkgname/$pkgname $pkgdir/usr/bin/$pkgname-fsk
}