contrib/pjsua/Pkgfile
2015-08-05 23:41:54 +09:00

56 lines
1.3 KiB
Plaintext

# Description: Command line SIP phone
# URL: http://www.pjsip.org/
# Packager: Alan Mizrahi, alan at mizrahi dot com dot ve
# Depends on: pjproject
name=pjsua
version=2.4
release=3
source=(
http://www.pjsip.org/release/$version/pjproject-$version.tar.bz2
pjmedia-libsamplerate.patch
config_site.h
)
# Related ports:
# pjsua: Standalone user-agent.
# pjsip: The minimum that asterisk needs for res_pjsip.so and friends. Dynamic libraries.
# pjproject: Libraries with most things enabled. Static and dynamic libraries.
build() {
cd pjproject-$version
export CFLAGS="$CFLAGS -DNDEBUG"
# pjsua will be dynamically linked as long as pjproject is installed beforehand.
# otherwise it will be statically linked.
./configure \
--enable-shared"$([ -f /usr/lib/libpjsua.so ] || echo =no)" \
--prefix=/usr \
--with-external-pa \
--with-external-gsm \
--with-external-speex \
--with-external-srtp \
--with-sdl=/usr \
--disable-openh264 \
--enable-libsamplerate \
--disable-resample_dll
cp $SRC/config_site.h pjlib/include/pj/config_site.h
# use system's libsamplerate
patch -p1 -i $SRC/pjmedia-libsamplerate.patch
make dep
# would be nice if something like this worked:
# make -j1 -C pjsip-apps/build pjsua-`./config.guess`
# but for now:
make
# install pjsua only
install -D -m755 pjsip-apps/bin/pjsua-* $PKG/usr/bin/pjsua
}