summaryrefslogtreecommitdiff
path: root/pcr/pjproject/PKGBUILD
blob: cfdaeb0e88743f9f12ae8f941bd85b3d82dbeda9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Maintainer (AUR): Xavier Devlamynck <magicrhesus@ouranos.be>
# Contributor (AUR): Marti Raudsepp <marti@juffo.org>
#Contributor (AUR): Travis Hegner <travis.hegner@gmail.com>

# parabola changes and rationale:
#  fixing misdetection of x86 intrinsics on armv7h

pkgname=pjproject
pkgver=2.7.1
pkgrel=1
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')
install=pjproject.install
source=(http://www.pjsip.org/release/${pkgver}/pjproject-${pkgver}.tar.bz2
        arm-build.patch)
sha256sums=('59fabc62a02b2b80857297cfb10e2c68c473f4a0acc6e848cfefe8421f2c3126'
            'fc6ccc004586e504d89fd14bbe2c26747849b1b9b617f4427e593de6a1c6b3db')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -Np1 < "${srcdir}/arm-build.patch"
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  export CXXFLAGS="${CXXFLAGS} -fPIC -march=native"
  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
  echo "#define PJ_HAS_IPV6 1" >> "${srcdir}/${pkgname}-${pkgver}/pjlib/include/pj/config_site.h"
  make -j1 dep 
  make -j1 
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make -j1 DESTDIR=${pkgdir} install
  install -D -m755 pjsip-apps/bin/pjsua-* ${pkgdir}/usr/bin/pjsua
}