blob: f0ceda587391c0adff7244110a8ada73ab73a31c (
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
|
# Contributor: Fabricio Silva <hi@fabricio.dev>
# Maintainer: Fabricio Silva <hi@fabricio.dev>
pkgname=autoscan
pkgver=1.4.0
pkgrel=1
pkgdesc="Autoscan replaces the default Plex and Emby behaviour for picking up changes on the file system."
url="https://github.com/Cloudbox/autoscan"
arch="x86_64 aarch64 armv7"
license="MIT"
options="net" # for downloading Go modules
makedepends="go"
subpackages="$pkgname-openrc"
install="$pkgname.pre-install"
source="
$pkgname-v$pkgver.tar.gz::https://github.com/Cloudbox/autoscan/archive/v$pkgver.tar.gz
autoscan.initd
autoscan.confd
"
export CGO_ENABLED=0
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
build() {
# strings used to parse "$Version ($GitCommit@$Timestamp)"
local ldflags="
-X main.Version=$pkgver
-X main.GitCommit=alpine
-X main.Timestamp=r$pkgrel
"
go build -ldflags "$ldflags" -o bin/autoscan ./cmd/autoscan
}
check() {
go test ./...
}
package() {
install -Dm755 bin/autoscan -t "$pkgdir"/usr/bin
install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
}
sha512sums="
4527a988797fcee2049e0d9c00a4544948c056d30402abefc9bedfa7b0c5d6e141c3ec9c23caefea3875378db2ba0cdc99cc1bed12aca2e66fc908af8296a133 autoscan-v1.4.0.tar.gz
d567c68c0b346c96292dad19389f7c4a83609aae406f577d7cca9a1b2a336de3044224cb252ddb9a49dab874182e9a05fd549f102ad39ff12cc3b30bedf6a061 autoscan.initd
7d1e0accbe7c5e7fe26652bd234ad4b7e5877c640ddf15cf5d1f6c621d1e7d1a5729af270414ddddaed4f0eee51ca88dd403f81fadb10fcc403100f56fd42629 autoscan.confd
"
|