updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / owx / PKGBUILD
blob5c35bff87ccc5928db14ba30a3858b1caf0d0488
1 # Maintainer: Ruslan Nabioullin <rnabioullin@gmail.com>
2 # Contributor: Vitaliy Berdinskikh, aka UR6LAD <ur6lad@archlinux.org.ua>
3 pkgname=owx
4 pkgver=7
5 pkgrel=2
6 pkgdesc="A CLI tool for programming KG669V (Wouxun) HTs."
7 arch=('i686' 'x86_64')
8 url="http://owx.chmurka.net"
9 license=('Apache' 'custom:beerware')
10 depends=('gcc-libs')
11 makedepends=('gcc' 'sed' 'subversion')
12 replaces=('wouxun')
13 source=(LICENSE)
14 md5sums=('04c8deadd6984048760870d0fb397f25')
15 sha256sums=('fd0d0ebbd3437872fe147bc5c86a25234b1d166f6bb6f9399900ca2aebb78ec2')
17 _svntrunk=http://svn.chmurka.net/owx/trunk
18 _svnmod=owx
20 build() {
21         cd $srcdir
23         msg "Connecting to SVN server...."
24         if [ -d $_svnmod/.svn ]; then
25           svn up -r $pkgver $_svnmod
26         else
27           svn co -r $pkgver $_svntrunk $_svnmod
28         fi
30         msg "SVN checkout done or server timeout"
31         msg "Starting make..."
32         svn export --force $_svnmod $_svnmod-build
33         cd $_svnmod-build/$_svnmod
34         # set version as the package version
35         sed -i -e s:SVN:${pkgver}: src/version.h
36         make
39 package() {
40         mkdir -p $pkgdir/usr/{bin,lib/$pkgname}
41         mkdir -p $pkgdir/usr/share/{doc/$pkgname,licenses/$pkgname}
43         cd $srcdir
44         install -m 644 LICENSE $pkgdir/usr/share/licenses/$pkgname
46         cd $_svnmod-build/$_svnmod/docs
47         install -m 644 * $pkgdir/usr/share/doc/$pkgname
49         cd ../src
50         install -D -m 755 $pkgname $pkgdir/usr/lib/$pkgname/$pkgname
51         ln -sf ../lib/$pkgname/$pkgname $pkgdir/usr/bin/$pkgname-check
52         ln -sf ../lib/$pkgname/$pkgname $pkgdir/usr/bin/$pkgname-get
53         ln -sf ../lib/$pkgname/$pkgname $pkgdir/usr/bin/$pkgname-put
54         ln -sf ../lib/$pkgname/$pkgname $pkgdir/usr/bin/$pkgname-export
55         ln -sf ../lib/$pkgname/$pkgname $pkgdir/usr/bin/$pkgname-import