summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e4d12c1e6c79956151ee8de71dad36acf0d2972f (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
# Maintainer: Charlotte Ausel <ettolrach@disroot.org>
# Maintainer: Echo J. <aidas957 at gmail dot com>

_pkgname=vgmtrans
pkgname=${_pkgname}-git
pkgver=r1550.b684e65
pkgrel=1
pkgdesc="Converter for sequenced videogame music"
arch=("x86_64")
url="https://github.com/vgmtrans/vgmtrans"
license=("BSD-3-Clause" "Zlib")
depends=("hicolor-icon-theme" "qt6-base" "qt6-svg")
makedepends=("cmake" "git" "qt6-tools")
source=("${_pkgname}::git+${url}"
        "git+https://github.com/fmtlib/fmt.git"
        "git+https://github.com/rtissera/libchdr.git"
        "git+https://github.com/gabime/spdlog.git"
        "git+https://github.com/madler/zlib.git")
sha256sums=("SKIP"
            "SKIP"
            "SKIP"
            "SKIP"
            "SKIP")

prepare() {
	cd "${srcdir}/${_pkgname}"

	# Setup the submodules
	git submodule init
	for module in fmt libchdr spdlog zlib; do
		git config submodule.lib/"${module}".url "${srcdir}/${module}"
		git -c protocol.file.allow=always submodule update lib/"${module}"
	done

	mkdir build || true
}

pkgver() {
	cd "${srcdir}/${_pkgname}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

build() {
	cd "${srcdir}/${_pkgname}/build"

	cmake -DCMAKE_INSTALL_PREFIX=/usr \
			-DCMAKE_INSTALL_LIBDIR="lib/${_pkgname}" \
			-DNO_QT_DEPLOY=ON \
			-DINSTALL_SHELL=ON \
			..
	make
}

package() {
	cd "${srcdir}/${_pkgname}/build"

	make DESTDIR="${pkgdir}" install

	# Move the licenses to the right place
	mv "${pkgdir}/usr/share/licenses/${_pkgname}" "${pkgdir}/usr/share/licenses/${pkgname}"
}