summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dbb4012531e69bf6975f3654e3000b3ffa49bf77 (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
# Maintainer: Vaporeon <vaporeon@vaporeon.io>
# Contributor: Salvador PardiƱas <darkfm@vera.com.uy>
pkgname=blastem
pkgver=0.6.2
_srcver=8aeac7bd9fa7
pkgrel=1
pkgdesc="Fast and accurate Sega Genesis/Mega Drive emulator"
arch=('x86_64' 'i686')
url="https://www.retrodev.com/blastem/changes.html"
license=('GPL3')
depends=('sdl2' 'glew')
makedepends=('python2-pillow')
optdepends=('vasm: game selection menu (must rebuild)'
	    'xcftools: game selection menu (must rebuild)')
provides=("${pkgname}")
conflicts=("${pkgname}-hg")
source=(
	"https://www.retrodev.com/repos/blastem/archive/$_srcver.tar.gz"
	'menu.patch'
	)
sha1sums=('1953ebfd0eaf5e5630ff5488779eb8e6bb8fe9bf'
          '9336fcf3ee45f3861838d4633a74de6b6392a2fe')

prepare() {
	mv "$srcdir/blastem-$_srcver" "$srcdir/blastem"
	cd "$srcdir/${pkgname}"
	patch -Np1 -i "${srcdir}/menu.patch"
	chmod a+x menumake.sh install.sh
}

build() {
	cd "$srcdir/${pkgname}"
	make blastem
	./menumake.sh
}

package() {
	cd "$srcdir/${pkgname}"
	./install.sh
	mkdir -p "$pkgdir/opt/blastem"
	install -d -g games "$pkgdir/opt/blastem"
	install -m 755 -g games -D to_install/* "$pkgdir/opt/blastem"
	install -m 666 -g games -D default.cfg "$pkgdir/opt/blastem"
	install -m 666 -g games rom.db gamecontrollerdb.txt "$pkgdir/opt/blastem"
	install -m 644 -g games -d "$pkgdir/opt/blastem/shaders"
	install -m 644 -g games -D shaders/* "$pkgdir/opt/blastem/shaders"
	chmod 755 "$pkgdir/opt/blastem/blastem"
	chown root:games "$pkgdir/opt/blastem"
	chown root:games "$pkgdir/opt/blastem/shaders"
	chmod 755 "$pkgdir/opt/blastem/shaders"
	mkdir -p "$pkgdir/usr/bin"
	ln -s "/opt/blastem/blastem" "$pkgdir/usr/bin/blastem"
}