aboutsummaryrefslogtreecommitdiffstats
path: root/main/gsm/APKBUILD
blob: d29d8f584bc823f38cc0f037ec0e761ceae24181 (plain) (blame)
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
65
66
67
68
69
70
71
72
73
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gsm
pkgver=1.0.14
pkgrel=0
_soname=1.0.12
pkgdesc="Shared libraries for GSM speech compressor"
url="http://www.quut.com/gsm/"
arch="all"
license="MIT"
depends=
depends_dev=
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
source="http://www.quut.com/gsm/gsm-$pkgver.tar.gz
	gsm-64bit.patch
	gsm-makefile.patch
	"

_builddir="$srcdir"/gsm-${pkgver%.*}-pl${pkgver##*.}
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	export RPM_OPT_FLAGS="$CFLAGS -fPIC"
	make all || return 1
}

package() {
	cd "$_builddir"
	mkdir -p "$pkgdir"/usr/bin \
		"$pkgdir"/usr/include/gsm \
		"$pkgdir"/usr/lib \
		"$pkgdir"/usr/share/man/man1 \
		"$pkgdir"/usr/share/man/man3

	make install \
		INSTALL_ROOT="$pkgdir"/usr \
		GSM_INSTALL_INC="$pkgdir"/usr/include/gsm \
		GSM_INSTALL_LIB="$pkgdir"/usr/lib \
		|| return 1
	cp -p lib/libgsm.so.$_soname "$pkgdir"/usr/lib/ || return 1
	ln -s libgsm.so.$_soname "$pkgdir"/usr/lib/libgsm.so.1 || return 1
	ln -s libgsm.so.$_soname "$pkgdir"/usr/lib/libgsm.so || return 1

	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
}

md5sums="4cbb4e7b73842de3d12d30b0d74200d4  gsm-1.0.14.tar.gz
1e4f975729e58fe309bda013b26020d9  gsm-64bit.patch
5d7da37bbc094b392c406df24a15958b  gsm-makefile.patch"
sha256sums="5814a16a30b3c026871b3739812dc4a2a84299331182c987da1c212c93e9352c  gsm-1.0.14.tar.gz
2b00d592f7b69e0e223e821a19f155d5e98648df07e34e338cb1b1420e4e0751  gsm-64bit.patch
c400c9fad3b4f154929deb9cf987996ff554d725749de76acbb18427c101a2e7  gsm-makefile.patch"
sha512sums="eefe19bdbc1fd3bc7499db664067b997c57d718e40598d6d330be971d9d2b0a744fc92b135acb5bbad83aacea59bdb061b4230dc0ebcf063bf4afede0e4a2827  gsm-1.0.14.tar.gz
5b01f6d2fd3ee7cd859da70870463e2ccc6614c5fb1bd5efc88a223a0c5477271221557fef13ba46697e70cc5820c13efff738413f8990d5884b95cc89c30152  gsm-64bit.patch
8a9b32ca6bf049e92840ac4ada40b6963fac7ffec23f4764f353795d29d58e1be28e83a927fa0919b95da42f97f603fe82764e999aaed566f88b4031a12877ca  gsm-makefile.patch"