summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD41
1 files changed, 41 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2d1ef80e3adf
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Paul-Louis Ageneau <paul-louis at ageneau dot org>
+
+pkgname=violet
+pkgver=v0.2.1
+pkgrel=1
+pkgdesc="Lightweight STUN/TURN server"
+arch=('x86_64')
+url="https://github.com/paullouisageneau/$pkgname"
+license=('AGPL')
+makedepends=('git' 'cmake')
+depends=()
+provides=("$pkgname")
+conflicts=("$pkgname")
+source=("git+https://github.com/paullouisageneau/$pkgname.git#tag=$pkgver")
+md5sums=('SKIP')
+
+prepare() {
+ cd "$pkgname"
+ git submodule update --init --recursive
+}
+
+build() {
+ cd "$pkgname"
+ rm -rf build
+ cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
+ cd build
+ make
+}
+
+package() {
+ cd "$pkgname"
+ install -m755 -d "$pkgdir"/usr/bin
+ install -m755 build/"$pkgname" "$pkgdir"/usr/bin
+ install -m755 -d "$pkgdir"/usr/lib/systemd/system
+ install -m644 "$pkgname".service "$pkgdir"/usr/lib/systemd/system
+ install -m755 -d "$pkgdir"/etc/violet
+ install -m644 example.conf "$pkgdir"/etc/violet/violet.conf
+ install -m755 -d "$pkgdir"/usr/lib/sysusers.d
+ echo "u violet - \"Violet STUM/TURN server user\"" > "$pkgdir"/usr/lib/sysusers.d/violet.conf
+}
+