blob: 550a9ef36601a367f12647efae5b08df102b3dc8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# Maintainer: Christian Muehlhaeuser <muesli at gmail dot com>
pkgname=prism
pkgver=0.1.1
pkgrel=1
pkgdesc="An RTMP stream recaster / splitter"
arch=('x86_64' 'i686' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/muesli/${pkgname}"
license=('MIT')
makedepends=('go')
source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('da0171dcaa0a544bb32d2ec0ab8a2dd15cc9d36e07c83cbfc4241db6f388e7a4')
prepare() {
export GOPATH="$srcdir/gopath"
export GO111MODULE=on
go clean -modcache
}
build() {
cd "$pkgname-$pkgver"
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" .
go clean -modcache
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim:set ts=4 sw=4 et:
|