blob: d8900778cd191625f2d19ab60d1b32389b4b0c38 (
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
66
|
# Maintainer: Stella <stellarinfinity@riseup.net>
pkgname=danser
url="https://github.com/Wieku/danser-go"
pkgver=0.9.1
pkgrel=1
pkgdesc="Dancing visualizer of osu! maps and custom osu! client written in Go."
arch=('any')
license=('GPL3')
conflicts=('danser-git')
source=(
"https://github.com/Wieku/danser-go/archive/refs/tags/${pkgver}.tar.gz"
)
sha256sums=('4dc24b1367774a6e973934b0beb3cf68b10caed24811bc59b097ae33ba30115b')
depends=(
'libyuv'
'ffmpeg'
'gtk3'
)
makedepends=(
'gcc'
'go>=1.21'
'libxi'
'libxinerama'
'libxrandr'
'xorg-server-devel'
)
build() {
cd "${srcdir}/danser-go-${pkgver}"
# build the library first for the gui and the hollowed out cli
go build \
-trimpath \
-modcacherw \
-mod=readonly \
-ldflags "-s -w -X 'github.com/wieku/danser-go/build.VERSION=$pkgver'
-X 'github.com/wieku/danser-go/build.Stream=Release'
-X 'github.com/wieku/danser-go/build.DanserExec=danser'" \
-buildmode=c-shared \
-o danser-core.so \
-v -x
mv danser-core.so libdanser-core.so
# build the CLI
cc -o danser -I. cmain/main_danser.c -Wl,-rpath,. -Wl,-rpath,/usr/lib/danser -L. -ldanser-core
# build the launcher
cc -D LAUNCHER -o danser-launcher -I. cmain/main_danser.c -Wl,-rpath,. -Wl,-rpath,/usr/lib/danser -L. -ldanser-core
go run tools/assets/assets.go ./
}
package() {
cd "${srcdir}/danser-go-${pkgver}"
mkdir -p "${pkgdir}/usr/lib/danser" "${pkgdir}/usr/bin"
install -Dm755 libdanser-core.so libbass.so libbass_fx.so libbassmix.so assets.dpak "${pkgdir}/usr/lib/danser"
install -Dm755 danser "${pkgdir}/usr/lib/danser/danser"
install -Dm755 danser-launcher "${pkgdir}/usr/lib/danser/danser-gui"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
ln -s "/usr/lib/danser/danser" "${pkgdir}/usr/bin/danser"
ln -s "/usr/lib/danser/danser-gui" "${pkgdir}/usr/bin/danser-gui"
}
|