summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorChristian Muehlhaeuser2020-11-16 03:00:11 +0100
committerChristian Muehlhaeuser2020-11-16 03:00:11 +0100
commit2f544e800c1d4c2da0b64b0cd668ff64c2292b2f (patch)
tree821caeda570ba9e8e88b7c4c45dc8321a6c97e34 /PKGBUILD
downloadaur-2f544e800c1d4c2da0b64b0cd668ff64c2292b2f.tar.gz
Initial package prism-git
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..fcbbaf739d21
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Christian Muehlhaeuser <muesli at gmail dot com>
+
+pkgname=prism-git
+pkgver=r5.869794b
+pkgrel=1
+pkgdesc="An RTMP stream recaster / splitter"
+arch=('x86_64' 'i686' 'armv6h' 'armv7h' 'aarch64')
+url="https://github.com/muesli/${pkgname%-git}"
+license=('MIT')
+makedepends=('go' 'git')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=($pkgname::git://github.com/muesli/${pkgname%-git}.git)
+sha256sums=('SKIP')
+
+prepare() {
+ export GOPATH="$srcdir/gopath"
+ export GO111MODULE=on
+
+ go clean -modcache
+}
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "$srcdir/$pkgname"
+
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+
+ go build \
+ -trimpath \
+ -buildmode=pie \
+ -mod=readonly \
+ -modcacherw \
+ -ldflags "-X main.Version=$pkgver -linkmode external -extldflags \"${LDFLAGS}\"" \
+ -o "${pkgname%-git}" .
+
+ go clean -modcache
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+
+ install -Dm755 "${pkgname%-git}" "$pkgdir/usr/bin/${pkgname%-git}"
+ install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/${pkgname%-git}/LICENSE"
+}