blob: dd706201697e16f71fd13bea6532f5db64ac7c02 (
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
48
49
50
51
52
53
54
55
|
# Maintainer: Brenek Harrison <brenekharrison @ gmail d0t com>
pkgname=encodarr-runner
pkgver=0.3.2
pkgrel=2
pkgdesc="Client software for encoding media files to a user-defined format."
arch=("x86_64")
url="https://github.com/BrenekH/encodarr#readme"
license=("MPL-2.0")
depends=("glibc" "ffmpeg")
makedepends=("go")
source=("encodarr-$pkgver.tar.gz"::"https://github.com/BrenekH/encodarr/archive/$pkgver.tar.gz")
sha256sums=('d700d3d172310f2cb72e999eda03b370d2960ba935727c0838f791a6e27f949f')
build() {
cd "encodarr-$pkgver/runner"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
# Store go caches in temp dirs (for those times when the home directory is locked down)
export GOMODCACHE="$(mktemp -d)"
export GOCACHE="$(mktemp -d)"
go build \
-trimpath \
-buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "-X 'github.com/BrenekH/encodarr/runner/options.Version=$pkgver' -linkmode external -extldflags \"${LDFLAGS}\"" \
-o encodarr-runner cmd/EncodarrRunner/main.go
# Clean up Go caches
go clean -modcache
go clean -cache
}
check() {
cd "encodarr-$pkgver/runner"
export ENCODARR_CONFIG_DIR=$(mktemp -d)
go test ./...
./encodarr-runner --version
rm -rf "${ENCODARR_CONFIG_DIR}"
}
package() {
cd "encodarr-$pkgver/runner"
install -Dm755 encodarr-runner "$pkgdir/usr/bin/encodarr-runner"
}
|