APKBUILD 1.7 KB
Newer Older
Natanael Copa's avatar
Natanael Copa committed
1 2 3
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gsm
Pedro Filipe's avatar
Pedro Filipe committed
4
pkgver=1.0.18
Natanael Copa's avatar
Natanael Copa committed
5 6 7 8 9
pkgrel=0
_soname=1.0.12
pkgdesc="Shared libraries for GSM speech compressor"
url="http://www.quut.com/gsm/"
arch="all"
10
license="custom:TU-Berlin-2.0"
Natanael Copa's avatar
Natanael Copa committed
11 12 13 14 15 16 17
makedepends="$depends_dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
source="http://www.quut.com/gsm/gsm-$pkgver.tar.gz
	gsm-64bit.patch
	gsm-makefile.patch
	"

18
builddir="$srcdir"/gsm-${pkgver%.*}-pl${pkgver##*.}
Pedro Filipe's avatar
Pedro Filipe committed
19

Natanael Copa's avatar
Natanael Copa committed
20
build() {
21
	cd "$builddir"
Natanael Copa's avatar
Natanael Copa committed
22
	export RPM_OPT_FLAGS="$CFLAGS -fPIC"
23
	make all
Natanael Copa's avatar
Natanael Copa committed
24 25
}

Pedro Filipe's avatar
Pedro Filipe committed
26 27 28 29 30
check() {
	cd "$builddir"
	make addtst
}

Natanael Copa's avatar
Natanael Copa committed
31
package() {
32
	cd "$builddir"
Natanael Copa's avatar
Natanael Copa committed
33 34 35 36 37
	mkdir -p "$pkgdir"/usr/bin \
		"$pkgdir"/usr/include/gsm \
		"$pkgdir"/usr/lib \
		"$pkgdir"/usr/share/man/man1 \
		"$pkgdir"/usr/share/man/man3
Natanael Copa's avatar
Natanael Copa committed
38

Natanael Copa's avatar
Natanael Copa committed
39 40 41
	make install \
		INSTALL_ROOT="$pkgdir"/usr \
		GSM_INSTALL_INC="$pkgdir"/usr/include/gsm \
42 43 44 45
		GSM_INSTALL_LIB="$pkgdir"/usr/lib
	cp -p lib/libgsm.so.$_soname "$pkgdir"/usr/lib/
	ln -s libgsm.so.$_soname "$pkgdir"/usr/lib/libgsm.so.1
	ln -s libgsm.so.$_soname "$pkgdir"/usr/lib/libgsm.so
Natanael Copa's avatar
Natanael Copa committed
46 47 48 49 50 51 52 53 54 55 56

	ln -s gsm/gsm.h "$pkgdir"/usr/include/
	rm -f "$pkgdir"/usr/lib/lib*.a
}

tools() {
	pkgdesc="GSM speech compressor tools"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr
}

Pedro Filipe's avatar
Pedro Filipe committed
57
sha512sums="c5b597f68d4a270e1d588f480dcde66fda8302564c687d753f2bd4fc41d246109243e567568da61eddce170f5232d869984743ddf1eea7696d673014a1a453b7  gsm-1.0.18.tar.gz
Natanael Copa's avatar
Natanael Copa committed
58
5b01f6d2fd3ee7cd859da70870463e2ccc6614c5fb1bd5efc88a223a0c5477271221557fef13ba46697e70cc5820c13efff738413f8990d5884b95cc89c30152  gsm-64bit.patch
59
1d92b7eacf52e5281c9f1a0f08313d10f15c35d22fb2292e5a885ceb3cb766557a5e3a08954db75fb13db59345ef9f6b08939881ba38c9d384e09a1c96b47bc5  gsm-makefile.patch"