blob: 52e97126e4e184eaeb16c7bd58e1d9f635cb456b (
plain)
1 # Description: Multimedia communication library
2 # URL: https://www.pjsip.org/
3 # Packager: Alan Mizrahi, alan at mizrahi dot com dot ve
4 # Depends on: pjproject swig
5
6 name=pjsua
7 version=2.10
8 release=1
9 source=(https://github.com/pjsip/pjproject/archive/$version/pjproject-$version.tar.gz
10 config_site.h 0001-Don-t-build-Java-bindings.patch)
11
12 # Related ports:
13 # pjsua: Standalone user-agent.
14 # pjsip: The minimum that asterisk needs for res_pjsip.so and friends. Dynamic libraries.
15 # pjproject: Libraries with most things enabled. Static and dynamic libraries.
16
17 build() {
18 cd pjproject-$version
19 patch -Np1 -i $SRC/0001-Don-t-build-Java-bindings.patch
20
21 export CFLAGS+=" -fPIC -DNDEBUG -Wno-error=deprecated-declarations"
22 export CXXFLAGS+=" -fPIC -DNDEBUG -Wno-error=deprecated-declarations"
23
24 # pjsua will be dynamically linked as long as pjproject is installed beforehand.
25 # otherwise it will be statically linked.
26 ./configure \
27 --prefix=/usr \
28 --with-external-pa \
29 --with-external-gsm \
30 --with-external-speex \
31 --with-external-srtp \
32 --with-sdl=/usr \
33 --disable-openh264 \
34 --enable-libsamplerate \
35 --disable-resample_dll \
36 $( [ -f /usr/lib/libpjsua.so ] && echo --enable-shared )
37
38 cp $SRC/config_site.h pjlib/include/pj/config_site.h
39
40 make -j1 dep
41 make -j1
42
43 make -j1 -C pjsip-apps/src/swig
44 pushd pjsip-apps/src/swig/python
45 python3 setup.py build
46 python3 setup.py install --root=$PKG --optimize=1 --skip-build
47 popd
48 make DESTDIR=$PKG -j1 -C pjsip-apps/src/swig
49
50 # install pjsua only
51 install -D -m755 pjsip-apps/bin/pjsua-`./config.guess` $PKG/usr/bin/pjsua
52 }
|