summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorChocobo12024-04-19 13:19:16 +0800
committerChocobo12024-04-19 13:28:19 +0800
commit838abe56fd058d892d82c6cd78fd67a199c7a6f9 (patch)
treee90438a445d08394491f9a7fe8164f7f6ec62466 /PKGBUILD
downloadaur-838abe56fd058d892d82c6cd78fd67a199c7a6f9.tar.gz
newpkg: libsrtp-git 2.6.0.r59.ge53e106-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e6d56c460f67
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>
+
+pkgname=libsrtp-git
+pkgver=2.6.0.r59.ge53e106
+pkgrel=1
+pkgdesc="Library for SRTP (Secure Realtime Transport Protocol)"
+arch=('i686' 'x86_64')
+url="https://github.com/cisco/libsrtp"
+license=('BSD-3-Clause')
+depends=('glibc' 'nss')
+makedepends=('git' 'libpcap' 'meson')
+provides=("libsrtp=$pkgver")
+conflicts=('libsrtp')
+options=('staticlibs')
+source=("git+https://github.com/cisco/libsrtp.git")
+sha256sums=('SKIP')
+
+
+pkgver() {
+ cd "libsrtp"
+
+ _tag=$(git tag -l --sort -v:refname | grep -E '^v?[0-9\.]+$' | head -n1)
+ _rev=$(git rev-list --count $_tag..HEAD)
+ _hash=$(git rev-parse --short HEAD)
+ printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" | sed 's/^v//'
+}
+
+build() {
+ cd "libsrtp"
+
+ meson setup \
+ --buildtype=plain \
+ --prefix="/usr" \
+ --sbindir="bin" \
+ -Ddefault_library="both" \
+ -Dcrypto-library="nss" \
+ "_build"
+ meson compile -C "_build"
+}
+
+check() {
+ cd "libsrtp"
+
+ #meson test -C "_build"
+}
+
+package() {
+ cd "libsrtp"
+
+ meson install -C "_build" --destdir "$pkgdir"
+ install -Dm644 "LICENSE" -t "$pkgdir/usr/share/licenses/libsrtp"
+}