summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8212e93252b81a5e14ecfdf389d60566c55df7c0 (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
61
62
63
64
# Maintainer: not_anonymous <nmlibertarian@gmail.com>
# Contributor: Carsten Feuls <archlinux at carstenfeuls dot de>
# Contributor: Wijnand Modderman-Lenstra <maze@pyth0n.org>
# Contributor: Vitaliy Berdinskikh <ur6lad@archlinux.org.ua>
# Original Submission: Bob Finch <w9ya@qrparci.net>

pkgname=hamlib-git-python3
_pkgname=hamlib-git
__pkgname=hamlib
pkgver=53476dd1
pkgrel=1
pkgdesc="Ham radio equipment control libraries - compiled for Python3"
arch=('i686' 'x86_64' 'armv5h' 'armv6h' 'armv7h')
url="http://hamlib.org"
license=('GPL' 'LGPL')
depends=('tcl' 'python' 'libxml2' 'libusb')
makedepends=('autoconf' 'automake' 'libtool' 'swig' 'git')
source=("$_pkgname::git+git://git.code.sf.net/p/$__pkgname/code")
options=('!emptydirs')
conflicts=('hamlib' 'hamlib-git')
provides=('hamlib' 'hamlib-git')
md5sums=('SKIP')
sha256sums=('SKIP')


pkgver() {
	cd $srcdir/$_pkgname
	git describe --always
# | sed 's|-|.|g'	# <- this might be needed in the future.
}

build() {
	export PYTHON=/usr/bin/python3

	cd $srcdir/$_pkgname
#	./autogen.sh \
	autoreconf -i
	./configure \
		--prefix=/usr \
		--sbindir=/usr/bin \
		--with-perl-binding \
		--with-python-binding \
		--with-xml-support \
		--with-tcl-binding
	make
}

package() {
	cd $srcdir/$_pkgname

	make DESTDIR=$pkgdir install

	# fix perl module location
#	cd $pkgdir/usr/lib/perl5/site_perl/
	eval $(perl -V:sitearch)
	cd $pkgdir$sitearch
	mkdir -p current/
	mv auto current
	mv Hamlib.pm current
	rm perltest.pl

	/usr/bin/find $pkgdir -name '.packlist' -delete
	/usr/bin/find $pkgdir -name '*.pod' -delete
}