summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorWüstengecko2019-05-12 17:00:50 +0200
committerCaleb Maclennan2019-06-18 16:00:11 +0300
commit978e9213287f1e9441aed4b8beb1ba55e85db19b (patch)
treeca2e6ad32a3a4ce3012ebdd2c94f75a130a9bf62 /PKGBUILD
parent0e2c0977f53a6490062e16e360afb58ab8066242 (diff)
downloadaur-978e9213287f1e9441aed4b8beb1ba55e85db19b.tar.gz
Rewrite for python3 and bindings as split package
Previously the package was applying a patch to build with python version 2. Since this is no longer necessary, and python 2 is nearing its end of life, this commit removes the patch. Furthermore this commit changes the PKGBUILD to now build the python language bindings in addition to the native PJSIP library. These bindings are built in a split package `python-pjproject`.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD60
1 files changed, 47 insertions, 13 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 5da55c37df2b..066958dd3fa8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,35 +3,69 @@
# Contributor: Marti Raudsepp <marti@juffo.org>
# Contributor: Travis Hegner <travis.hegner@gmail.com>
-pkgname=pjproject
+pkgbase=pjproject
+pkgname=(pjproject python-pjproject)
pkgver=2.8
-pkgrel=3
+pkgrel=4
pkgdesc='Open source SIP stack and media stack'
arch=('i686' 'x86_64' 'armv7h')
url='http://www.pjsip.org/'
license=('GPL')
-depends=('openssl' 'portaudio' 'speex' 'alsa-lib' 'libsamplerate' 'util-linux' 'ffmpeg' 'libsrtp' 'opus')
-makedepends=('e2fsprogs' 'python')
-optdepends=('alsa-lib' 'e2fsprogs' 'python')
-source=("http://www.pjsip.org/release/$pkgver/$pkgname-$pkgver.tar.bz2")
-sha256sums=('503d0bd7f9f13dc1492ac9b71b761b1089851fbb608b9a13996edc3c42006f79')
+makedepends=('alsa-lib' 'e2fsprogs' 'ffmpeg' 'libsamplerate' 'libsrtp' 'openssl' 'opus' 'portaudio' 'python' 'speex' 'swig' 'util-linux')
+source=("http://www.pjsip.org/release/$pkgver/$pkgname-$pkgver.tar.bz2"
+ 0001-Don-t-build-Java-bindings.patch
+ 0002-Query-python-executable-for-actual-version-in-use.patch)
+sha256sums=('503d0bd7f9f13dc1492ac9b71b761b1089851fbb608b9a13996edc3c42006f79'
+ '74bdd3f404bf27dc00c235caada2d9c4b0b43e44febc8905b507c815384cf8fb'
+ 'caa187ae9b75964bbf1a79996b6e89321ff83bc910fd5bbdac33924a2bdb0cfb')
+
+prepare() {
+ cd "$srcdir/$pkgbase-$pkgver"
+ patch -Np1 < "$srcdir/0001-Don-t-build-Java-bindings.patch"
+ patch -Np1 < "$srcdir/0002-Query-python-executable-for-actual-version-in-use.patch"
+ echo "#define PJ_HAS_IPV6 1" >> "pjlib/include/pj/config_site.h"
+}
build() {
- cd "$pkgname-$pkgver"
+ cd "$srcdir/$pkgbase-$pkgver"
export CXXFLAGS="$CXXFLAGS -fPIC"
if [ "$CARCH" = "i686" ]; then
export CXXFLAGS="$CXXFLAGS -march=i686"
- arch_opts="--disable-libwebrtc"
+ arch_opts=(--disable-libwebrtc)
fi
- export CFLAGS="$CXXFLAGS -DNDEBUG"
- ./configure --prefix=/usr --with-external-speex --with-external-srtp --with-external-pa --with-external-gsm --disable-oss --enable-shared --disable-opencore-amr --disable-v4l2 --disable-video --disable-sound ${arch_opts}
+ export CFLAGS="$CFLAGS -fPIC -DNDEBUG"
+ ./configure \
+ --prefix=/usr \
+ --with-external-speex \
+ --with-external-srtp \
+ --with-external-pa \
+ --with-external-gsm \
+ --disable-oss \
+ --enable-shared \
+ --disable-opencore-amr \
+ --disable-v4l2 \
+ --disable-video \
+ --disable-sound \
+ "${arch_opts[@]}"
+
echo "#define PJ_HAS_IPV6 1" >> "$srcdir/$pkgname-$pkgver/pjlib/include/pj/config_site.h"
make -j1 dep
make -j1
+
+ make -C pjsip-apps/src/swig -j1
}
-package() {
- cd "$pkgname-$pkgver"
+package_pjproject() {
+ depends=('openssl' 'portaudio' 'speex' 'alsa-lib' 'libsamplerate' 'util-linux' 'ffmpeg' 'libsrtp' 'opus')
+ optdepends=('e2fsprogs' 'python-pjproject: Python bindings')
+ cd "$srcdir/$pkgbase-$pkgver"
make -j1 DESTDIR="$pkgdir" install
install -D -m755 pjsip-apps/bin/pjsua-*gnu* "$pkgdir"/usr/bin/pjsua
}
+
+package_python-pjproject() {
+ depends=('pjproject' 'python')
+ cd "$srcdir/$pkgbase-$pkgver/pjsip-apps/src/swig/python"
+
+ python setup.py install --root="$pkgdir/" --optimize=1
+}