summaryrefslogtreecommitdiff
path: root/pcr/rfc5766-turn-server/PKGBUILD
blob: c070ad309d3d99fa348291977e5af79b220e996d (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Maintainer: Vladimir Tsanev <tsachev@gmail.com>

pkgname=rfc5766-turn-server
_portname=turnserver
pkgver=2.6.2.1
pkgrel=1
pkgdesc="STUN and TURN Relay Server for VoIP and WebRTC"
arch=('i686' 'x86_64' 'mips64el')
url="http://code.google.com/p/rfc5766-turn-server/"
license=('custom:BSDNew')
depends=('libevent' 'postgresql-libs' 'libmysqlclient' 'hiredis')
optdepends=('postgresql-client: to use postgresql'
            'mariadb: mariadb backend'
            'redis: redis backend')
backup=("etc/turnserver.conf" "etc/turnuserdb.conf")
changelog=ChangeLog
source=(https://${pkgname}.googlecode.com/files/${_portname}-$pkgver.tar.gz
        turn.service stun.service)

build() {
  cd "${srcdir}/$_portname-${pkgver}"
  
  ./configure --prefix=/usr \
              --manprefix=/usr/share \
              --examplesdir="/usr/share/$_portname/examples"

  make
}

check() {
  cd "${srcdir}/$_portname-${pkgver}"
  make check
}

package() {
  cd "${srcdir}/$_portname-${pkgver}"
  make DESTDIR="$pkgdir" install
  
  
  install -D "$pkgdir/usr/share/$_portname/examples/etc/turnserver.conf" \
             "$pkgdir/etc/turnserver.conf"
  install -D "$pkgdir/usr/share/$_portname/examples/etc/turnuserdb.conf" \
             "$pkgdir/etc/turnuserdb.conf"
  install -D "$srcdir/stun.service" \
             "$pkgdir/usr/lib/systemd/system/stun.service"
  install -D "$srcdir/turn.service" \
             "$pkgdir/usr/lib/systemd/system/turn.service"
  rm -r "$pkgdir/usr/etc"

  chmod 644 "$pkgdir/usr/lib/libturnclient.a"

  install -Dm 644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
  install -dm 755 "$pkgdir/var/log/$_portname"

  sed \
          -e '/^#log-file=\/var\/tmp\/turn.log$/c log-file=\/var\/log\/turnserver\/turn.log' \
          -i "${pkgdir}"/etc/turnserver.conf
}
sha1sums=('d7f01e6fadbe56fe4535d67a7d178a9cfba110b8'
          '0c5b348e793bd52ce0ee38d420b26c9b2a2e2ca5'
          'b12805c049787cd1433181afaba4111f89740e63')
sha256sums=('4d131f353aadb15901d175755075af65abf2a0e820d7281c9c164285642ff9c1'
            '319030c1916d353bfc3375626cc7f60d6eeca762fe4fce354f010212902c49dc'
            '63198e4f802c7b4b44e671e0fcaebca36589ebb11405e51ab9f36c80327ac4d9')