summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 804fd5ab3243170e54733c8383ae628c8b96d83c (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
# Maintainer: Eldred Habert <arch@eldred.fr>
pkgname=hugetracker-bin
pkgver=1.0.9
pkgrel=1
pkgdesc='The music composition suite for the Nintendo Game Boy'
arch=('x86_64')
url='https://nickfa.ro/index.php?title=HUGETracker'
license=('custom:public domain')
provides=('hugetracker')
conflicts=('hugetracker')
makedepends=(unzip)
# `rgbds` is shelled out to at runtime, but namcap doesn't know that.
# The program also explicitly makes calls to `fontconfig` and `pango`, so mark them
# explicitly, despite namcap's complaints.
depends=(fontconfig gdk-pixbuf2 glib2 glibc gtk2 libx11 pango 'rgbds>=0.5.0' sdl2
	 libatk-1.0.so libcairo.so)
optdepends=('ffmpeg: "Export song" functionality')
source=("hUGETracker-$pkgver.zip::https://github.com/SuperDisk/hUGETracker/releases/download/v$pkgver/hUGETracker-$pkgver-linux.zip"
        LICENSE)
sha256sums=('e806ef0f356f948bb670aff3981c8d32c74b4926b4378226912eb1a3b58c077d'
            '89e3f0dbfb531db8d9ba1b20865407b35a0aad5b3f5468bd8527a17a5026e836')
noextract=('hUGETracker-$pkgver.zip')


prepare() {
	unzip -od hugetracker hUGETracker-$pkgver.zip
}

package() {
	install -Dvm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

	for f in hugetracker/*; do
		if [[ "$f" = hugetracker/uge2source ]]; then
			install -Dvsm 755 -T "$f" "$pkgdir/usr/bin/$(basename "${f@L}")"
		elif [[ "$f" = hugetracker/rgb* || "$f" = hugetracker/ffmpeg ]]; then
			: # Avoid using the bundled dependencies.
		elif ! [[ -d "$f" ]]; then
			install -Dvm 644 -T "$f" "$pkgdir/usr/share/$f"
		elif [[ "$f" = hugetracker/hUGEDriver ]]; then
			install -Dvm 644 -t "$pkgdir/usr/share/$f" "$f"/*.asm
			install -Dvm 644 -t "$pkgdir/usr/share/$f/include" "$f"/include/*
		else
			find "$f" -type f -exec install -Dvm 644 -T '{}' "$pkgdir/usr/share/{}" \;
		fi
	done
	chmod +x "$pkgdir/usr/share/hugetracker/hUGETracker"
	ln -s ../share/hugetracker/hUGETracker "$pkgdir/usr/bin/hugetracker"
}