makedeb


sm64ex-git 1.951389c-1


Fork of sm64-port with additional features.

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for sm64ex-git.

# Maintainer: Jomar Milan <jomarm@jomarm.tech>
pkgname=sm64ex-git
pkgver=1.951389c
pkgrel=1
pkgdesc='Fork of sm64-port with additional features.'
arch=('any')
url='https://github.com/sm64pc/sm64ex'
license=('reverse-engineered and unlicensed')
makedepends=('git' 'python3' 'libglew-dev' 'libsdl2-dev')
depends=('libsdl2-2.0-0')
provides=(sm64ex)

_gitname=sm64ex
_region=us

source=("git+${url}.git" 'sm64ex.desktop' 'SuperMario64.png')
sha256sums=('SKIP' 'd0b5bc1a40b3d4fadc50c1be37b6b7fb0f2b2086fb79fecc991d94e07ece4da5' '598e46b4ea81d89f5e924dc7421df0eab547220465250265a2eba52f3dd4eb45')

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

prepare() {
	cd "$srcdir/$_gitname"
	cp "../../baserom.${_region}.z64" . || {
		printf \
			"No ROM was found. Copy your Super Mario 64 ROM to \"$(realpath ../../)\" with the name \"baserom.${_region}.z64\"." \
			"US is the default ROM region. The PKGBUILD must be modified to use another region.\n"
	}
}

build() {
	cd "$srcdir/$_gitname"
	make VERSION=$_region BETTERCAMERA=1 ${MAKEFLAGS:--j$(nproc)}
}

package() {
	install -Dm755 "$srcdir/$_gitname/build/${_region}_pc/sm64.${_region}".* "${pkgdir}/usr/bin/sm64ex"
	install -Dm755 "$srcdir/sm64ex.desktop" "${pkgdir}/usr/share/applications/sm64ex.desktop"
	install -Dm755 "$srcdir/SuperMario64.png" "${pkgdir}/usr/share/icons/hicolor/64x64/apps/SuperMario64.png"
}