aboutsummaryrefslogtreecommitdiffstats
path: root/main/freeswitch/APKBUILD
blob: 8280a8489fd1fbcc99575b83c999212cf9a6f8f5 (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
# Contributor: Michael Mason <ms13sp@gmail.com>
pkgname=freeswitch
pkgver=1.0.6
pkgrel=4
pkgdesc="A communications platform written in C from the ground up"
url="http://www.freeswitch.org"
license="GPL"
depends=""
makedepends="curl-dev unixodbc-dev zlib-dev openssl-dev
	autoconf automake libtool"
install=
subpackages="$pkgname-dev"
source="http://files.freeswitch.org/freeswitch-$pkgver.tar.gz
	modules.conf
	freeswitch.confd
	freeswitch.initd
	freeswitch.post-install
	freeswitch.pre-install
	"

build() {
	cd "$srcdir/$pkgname-$pkgver"
	cp -f "$srcdir/modules.conf" modules.conf || return 1

	# i think our max cmd len is 32768
	# by specifying it here we save our selves from some CPU cycles
	export lt_cv_sys_max_cmd_len=8192

	./configure --prefix=/usr \
		--sysconfdir=/etc/freeswitch \
		--with-modinstdir=/usr/lib/freeswitch \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \

	# check how/when parallel builds are fixed here:
	# http://jira.freeswitch.org/browse/FSBUILD-6

	# build the libs and prerequisites in parallel first
	make libs/apr/libapr-1.la \
		libs/apr-util/libaprutil-1.la \
		libs/speex/libspeex/libspeexdsp.la \
		libs/sqlite/libsqlite3.la \
		libs/pcre/libpcre.la \
		libs/srtp/libsrtp.la \
		src/include/switch_version.h

	# then the rest should build in parallel too
	make || return 1
}
package(){
	cd "$srcdir/$pkgname-$pkgver"
	make -j1 DESTDIR="$pkgdir" install
	mkdir "$pkgdir"/var/run/freeswitch
	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
}

md5sums="388effee587887a81fe7f411b7350590  freeswitch-1.0.6.tar.gz
c05f2356be159e99b3845f5260a33599  modules.conf
c608cca8ad773acebf201f581438c7e7  freeswitch.confd
dd3a6535c54fc6ed8399d6bb57d88369  freeswitch.initd
697f8069eb8eaa158fa6c063d0e5fed7  freeswitch.post-install
661e2dff4022522b95c875f2f88aa66a  freeswitch.pre-install"