add arch pkgbuild

This commit is contained in:
Valentin Boettcher 2020-08-02 13:30:37 +02:00
parent 017db9ce0e
commit 7cb54ccab7
3 changed files with 63 additions and 0 deletions

2
packaging/arch/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
*.tar.xz
stream

49
packaging/arch/PKGBUILD Normal file
View file

@ -0,0 +1,49 @@
# Maintainer: Valentin Boettcher <hiro@protagon.space>
pkgname='stream'
pkgver="0.1.1"
pkgrel=1
pkgdesc='A rtmp->rtmp transcoding monitor for ffmpeg. Written in clojure.'
arch=('any')
url='https://github.com/vale981/stream'
license=('EPL')
depends=('java-environment')
makedepends=('clojure' 'leiningen' 'ffmpeg')
source=('git+https://github.com/vale981/stream'
'stream.service')
md5sums=('SKIP'
'fa413a06dbca8bf711a73cbaf2b61829')
prepare() {
cd "$pkgname"
git checkout $(git describe --tags `git rev-list --tags --max-count=1`) \
-b latest
}
pkgver() {
cd "$pkgname"
clojure -e '(-> "project.clj" slurp read-string (nth 2))'
}
build() {
cd "$pkgname"
lein uberjar
}
check() {
cd "$pkgname"
lein test
}
package() {
cd "$pkgname"
install -d "$pkgdir/opt/$pkgname/"
install -D "target/uberjar/$pkgname-$pkgver-standalone.jar" "$pkgdir/opt/$pkgname/$pkgname.jar"
install -D "$srcdir/$pkgname.service" "$pkgdir/etc/systemd/system/$pkgname.service"
}
# vim:set ts=2 sw=2 et:

View file

@ -0,0 +1,12 @@
[Unit]
Description="STREAM - the Simple Transmission Emitter And Monitor"
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/usr/bin/java -jar /opt/stream/stream.jar
Restart=on-failure
SyslogIdentifier=stream
[Install]
WantedBy=multi-user.target