From 3eaff6bea83ee8bcaa8b5457797ecd5d463e26bc Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 22 May 2012 14:22:04 +0000 Subject: main/pjproject: upgrade to 2.0 --- main/pjproject/APKBUILD | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) (limited to 'main/pjproject') diff --git a/main/pjproject/APKBUILD b/main/pjproject/APKBUILD index a807ebf672..4215fe172d 100644 --- a/main/pjproject/APKBUILD +++ b/main/pjproject/APKBUILD @@ -1,26 +1,51 @@ # Contributor: Michael Mason # Maintainer: Natanael Copa pkgname=pjproject -pkgver=1.10 +pkgver=2.0 pkgrel=0 pkgdesc="CLI Softphone" url="http://www.pjsip.org/pjsua.htm" arch="all" license="GPL" depends= -makedepends="openssl-dev pth-dev" +makedepends="openssl-dev pth-dev alsa-lib-dev gsm-dev speex-dev portaudio-dev" install= subpackages="$pkgname-dev pjsua" source="http://www.pjsip.org/release/$pkgver/$pkgname-$pkgver.tar.bz2" +prepare() { + cd "$srcdir/$pkgname-$pkgver" + # Remove target name from lib names + sed -i -e 's/-$(TARGET_NAME)//g' \ + -e 's/= $(TARGET_NAME).a/= .a/g' \ + -e 's/-$(LIB_SUFFIX)/$(LIB_SUFFIX)/g' \ + $(find . -name '*.mak*' -o -name Makefile) || return 1 + + # Fix hardcoded prefix and flags + sed -i \ + -e 's/poll@/poll@\nexport PREFIX := @prefix@\n/g' \ + -e 's!prefix = /usr/local!prefix = $(PREFIX)!' \ + -e '/PJLIB_CFLAGS/ s/(_CFLAGS)/(_CFLAGS) -fPIC/g' \ + -e '/PJLIB_UTIL_CFLAGS/ s/(_CFLAGS)/(_CFLAGS) -fPIC/g' \ + Makefile \ + build.mak.in || return 1 +} + build() { cd "$srcdir/$pkgname-$pkgver" ./configure --build=${CHOST:-i486-alpine-linux-uclibc} \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ - --infodir=/usr/share/info - make -j1 dep || return 1 + --infodir=/usr/share/info \ + --with-external-speex \ + --with-external-gsm \ + --with-external-pa \ + || return 1 + + # TODO: make it build with only shared libs from system + # rm -r third_party + make dep || return 1 make -j1 all || return 1 } @@ -32,9 +57,7 @@ package() { pjsua() { pkgdesc="pjsua is an open source command line SIP user agent (softphone)" cd "$srcdir/$pkgname-$pkgver"/pjsip-apps/bin/ - install -D -m755 pjsua-${CHOST:-i486-alpine-linux-uclibc} \ - "$subpkgdir"/usr/bin/pjsua + install -D -m755 pjsua "$subpkgdir"/usr/bin/pjsua } - - -md5sums="e215d0637d3422d49a63c2cde6673951 pjproject-1.10.tar.bz2" + +md5sums="6d7291960f2f341eb39694754586e0e9 pjproject-2.0.tar.bz2" -- cgit v1.2.3