aboutsummaryrefslogtreecommitdiffstats
path: root/testing/hamlib/APKBUILD
blob: 81e88738e136a1304f137792fd6e640bded2860b (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
# Contributor: Bradford D. Boyle <bradford.d.boyle@gmail.com>
# Maintainer: Bradford D. Boyle <bradford.d.boyle@gmail.com>
pkgname=hamlib
pkgver=3.0
pkgrel=0
pkgdesc="Library to control radio transceivers and receivers"
url="http://www.hamlib.org/"
arch="all"
license="LGPL-2.0-or-later"
depends=""
depends_dev=""
makedepends="$depends_dev linux-headers perl-dev python-dev swig tcl-dev chrpath"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-perl $pkgname-python $pkgname-tcl"
source="http://downloads.sourceforge.net/project/hamlib/hamlib/3.0/hamlib-3.0.tar.gz"

builddir="$srcdir"/$pkgname-$pkgver
build() {
	cd "$builddir"
	./configure --prefix=/usr --sbindir=/usr/bin \
		--with-perl-binding \
		--with-python-binding \
		--with-tcl-binding
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install

	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

perl() {
	depends="perl"

	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/perl5 "$subpkgdir"/usr/lib/

	# fix perl module location
	cd "$subpkgdir"/usr/lib/perl5/site_perl/
	mkdir current
	mv auto current
	mv Hamlib.pm current
	rm perltest.pl

	chrpath --delete "$subpkgdir"/usr/lib/perl5/site_perl/current/auto/Hamlib/Hamlib.so
}

python() {
	depends="python"

	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python2.7 "$subpkgdir"/usr/lib/
}

tcl() {
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/tcl "$subpkgdir"/usr/lib/
}

md5sums="ffe192ff83c5935966367efe5bb33334  hamlib-3.0.tar.gz"
sha256sums="bc16546161a47e21a44a710a40aeb0bce478f112bffcc4f253eb27e150f1c21e  hamlib-3.0.tar.gz"
sha512sums="16ac66ab91d44c364054aa6ba8292a6538886744d83a83eb0887f55407f836e1d4a402cc7a41576594bea8100c2eefa26bae212f767a68b2a4db7a709166cbd2  hamlib-3.0.tar.gz"