summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 069f514cac80e5f52bdd40d34421d13798be3462 (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
67
68
69
# Contributor: nalquas <nalquas.dev@gmail.com>
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=tvtower-bin
_pkgname=TVTower
pkgver=0.8.2
_subver=20231220
pkgrel=3
pkgdesc="A tribute to Mad TV. Written in BlitzMax, Lua and a bit of C.Prebuilt version."
arch=(
	'i686'
	'x86_64'
)
url="https://www.tvtower.org/"
_ghurl="https://github.com/TVTower/TVTower"
license=('LicenseRef-custom')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
	'libglvnd'
	'freetype2'
	'libxcb'
	'lib32-glu'
	'lib32-libxcb'
	'lib32-gcc-libs'
	'lib32-libglvnd'
	'lib32-glibc'
	'lib32-freetype2'
)
makedepends=(
	'gendesk'
)
noextract=("${pkgname%-bin}-${pkgver}.zip")
source=(
	"${pkgname%-bin}-${pkgver}.zip::${_ghurl}/releases/download/v${pkgver}/${_pkgname}_v${pkgver}_${_subver}.zip"
	"${pkgname%-bin}.sh"
)
sha256sums=('503e6ff876e5afbcbb56638c6076b54d5392e67e48651b3b7bdf44faf750f286'
            '66ba0a42698a2815cfec1c2a5a2b459e4ea9c054481c859acf5dd4aa84d49ce8')
build() {
	case "${CARCH}" in
		i686)
			_RUNNAME="${_pkgname}_Linux32"
		;;
		x86_64)
			_RUNNAME="${_pkgname}_Linux64"
		;;
	esac
	sed -e "
		s/@appname@/${pkgname%-bin}/g
        s/@runname@/${_RUNNAME}/g
    " -i "${srcdir}/${pkgname%-bin}.sh"
	gendesk -q -f -n --pkgname="${pkgname%-bin}" --pkgdesc="${pkgdesc}" --categories="Game" --name="${_pkgname}" --exec="${pkgname%-bin}"
	install -Dm755 -d "${srcdir}/usr/lib/${pkgname%-bin}/logfiles"
	bsdtar -xf "${srcdir}/${pkgname%-bin}-${pkgver}.zip" -C "${srcdir}/usr/lib/${pkgname%-bin}"
	rm -rf "${srcdir}/usr/lib/${pkgname%-bin}/"*.{bat,exe}
	for _logtxt in app ai1 ai2 ai3 ai4 app.error;do
		touch "${srcdir}/usr/lib/${pkgname%-bin}/logfiles/log.${_logtxt}.txt"
	done
	touch "${srcdir}/usr/lib/${pkgname%-bin}/log.profiler.txt"
}
package() {
	install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
	cp -r "${srcdir}/usr" "${pkgdir}"
	install -Dm644 "${srcdir}/usr/lib/${pkgname%-bin}/LICENCE.txt" -t "${pkgdir}/usr/share/licenses/${pkgname}"
	install -Dm644 "${srcdir}/usr/lib/${pkgname%-bin}/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps"
	install -Dm644 "${srcdir}/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
	chmod 777 "${pkgdir}/usr/lib/${pkgname%-bin}/savegames"
	find "${pkgdir}/usr/lib/${pkgname%-bin}/logfiles" -name "log.*.txt" -perm 644 -exec chmod 666 {} +
}