blob: 23fd009f3a1c29c48d773f07ea0d687ef7ccfb22 (
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
56
57
58
59
60
61
62
63
64
65
|
# Maintainer: Pierre Neidhardt <ambrevar@gmail.com>
_pkgname=demlo
pkgname=$_pkgname-git
pkgver=2018.02.13.g0317d78
pkgrel=1
pkgdesc="A dynamic and extensible music library organizer"
arch=("i686" "x86_64")
url="https://github.com/Ambrevar/demlo/"
license=("MIT")
depends=("ffmpeg" "lua" "taglib")
makedepends=("go" "git")
optdepends=("chromaprint: Internet tagging")
source=("git+https://github.com/Ambrevar/$_pkgname.git")
md5sums=('SKIP')
_gourl="github.com/ambrevar/$_pkgname"
pkgver() {
cd "$srcdir/demlo"
git log -1 --format="%cd.g%h" --date=short | sed 's/-/./g'
}
prepare() {
## Move source extracted folder to its proper location in the GOPATH.
cd "$srcdir"
rm -rfv "src/$_gourl"
mkdir -p "src/github.com/ambrevar"
cp -a "$_pkgname" "src/$_gourl"
}
build() {
case "$CARCH" in
x86_64) GOARCH=amd64 ;;
i686) GOARCH=386 ;;
esac
export GOPATH="$srcdir"
go get -v -x -d github.com/aarzilli/golua/lua
cd "$srcdir"/src/github.com/aarzilli/golua/lua
git checkout lua5.3
go install -v -x -tags llua
go get -v -x -ldflags "-X main.version=$pkgver" "$_gourl"
}
check() {
GOPATH="$srcdir" go test -v -x "$_gourl"
}
package() {
cd "$srcdir"
install -Dm755 "bin/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
install -Dm644 "src/$_gourl/LICENSE" "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
install -Dm644 "src/$_gourl/config.lua" "$pkgdir/usr/share/$_pkgname/config.lua"
cd "src/$_gourl"
for i in scripts/*; do
install -Dm644 "$i" "$pkgdir/usr/share/$_pkgname/$i"
done
for i in actions/*; do
install -Dm644 "$i" "$pkgdir/usr/share/$_pkgname/$i"
done
install -Dm644 completion/$_pkgname.fish "$pkgdir/usr/share/fish/vendor_completions.d/$_pkgname.fish"
}
|