diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-05-22 14:22:04 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-05-22 14:22:04 +0000 |
commit | 3eaff6bea83ee8bcaa8b5457797ecd5d463e26bc (patch) | |
tree | 5413d086b61560bf6dc46b4348adc2daa4f1bd48 | |
parent | 8858d79535898587e2ff85f11fce372765c32289 (diff) | |
download | aports-3eaff6bea83ee8bcaa8b5457797ecd5d463e26bc.tar.bz2 aports-3eaff6bea83ee8bcaa8b5457797ecd5d463e26bc.tar.xz |
main/pjproject: upgrade to 2.0
-rw-r--r-- | main/pjproject/APKBUILD | 41 |
1 files changed, 32 insertions, 9 deletions
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 <ms13sp@gmail.com> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> 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" |