archrelease: copy trunk to extra-x86_64
[arch-packages.git] / libsrtp / trunk / PKGBUILD
blob3a1ab43285508263d22c68fb07c43f4b7a4e04dd
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
3 # Contributor: Yejun Yang <yejunx AT gmail DOT com>
4 # Contributor: Michal Krenek <mikos@sg1.cz>
6 pkgbase=libsrtp
7 pkgname=(libsrtp libsrtp-docs)
8 pkgver=2.5.0
9 pkgrel=1
10 epoch=1
11 pkgdesc="Library for SRTP (Secure Realtime Transport Protocol)"
12 url="https://github.com/cisco/libsrtp"
13 arch=(x86_64)
14 license=(BSD)
15 depends=(nss)
16 makedepends=(
17   doxygen
18   git
19   libpcap
20   meson
22 checkdepends=(procps-ng)
23 _commit=a566a9cfcd619e8327784aa7cff4a1276dc1e895  # tags/v2
24 source=("git+https://github.com/cisco/libsrtp#commit=$_commit")
25 b2sums=('SKIP')
27 pkgver() {
28   cd libsrtp
29   git describe --tags | sed 's/^v//;s/[^-]*-g/r&/;s/-/+/g'
32 prepare() {
33   cd libsrtp
35   # Fixup pkgver: There are proper tags like v2.4.4
36   # but also "moving tags" like v2 and v2.4 that aren't stable
37   git tag | grep -Pv '^v\d+\.\d+\.\d+$' | xargs git tag -d
40 build() {
41   local meson_options=(
42     --buildtype release
43     -D crypto-library=nss
44     -D crypto-library-kdf=disabled
45   )
47   arch-meson libsrtp build "${meson_options[@]}"
48   meson compile -C build
49   meson compile -C build doc
52 check() {
53   meson test -C build --print-errorlogs
56 package_libsrtp() {
57   provides=("libsrtp${pkgver%%.*}.so")
59   meson install -C build --destdir "$pkgdir"
60   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 libsrtp/LICENSE
63 package_libsrtp-docs() {
64   pkgdesc+=" (documentation)"
65   depends=()
67   mkdir -p "$pkgdir/usr/share/doc"
68   cp -a build/html "$pkgdir/usr/share/doc/libsrtp"
70   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 libsrtp/LICENSE
73 # vim:set sw=2 sts=-1 et: