makedeb


tic-80 1.1.2837-1


fantasy computer for making, playing, and sharing tiny games.

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for tic-80.

# Maintainer: Jomar Milan <jomarm@jomarm.tech>

_minor=2837
pkgname=tic-80
pkgver="1.1.$_minor"
pkgrel=1
pkgdesc='fantasy computer for making, playing, and sharing tiny games.'
arch=('any')
url='https://tic80.com'
license=('MIT')
makedepends=('build-essential' 'cmake' 'libpipewire-0.3-dev' 'libwayland-dev' 'libsdl2-dev' 'ruby-dev' 'libcurl4-openssl-dev' 'libglvnd-dev' 'libglu1-mesa-dev' 'freeglut3-dev' 'git')
depends=()
# The GitHub-provided archives for the source code neither include submodules nor are git repositories.
source=("git+https://github.com/nesbox/TIC-80.git#tag=v$pkgver" 'static-revision.patch')
sha256sums=('SKIP' '6b90215c282d904a0722c10134d44a4217f024472b15c2f014ccca2f8080e50a')

prepare() {
	cd "$srcdir/TIC-80"
	git submodule update --init --recursive --depth=1
	
	# Workaround for accurate revision version, avoids outdated version
	# alert on start
	patch --strip=1 --input="$srcdir/static-revision.patch"
	sed -i "s/VERSION_REVISION 0/VERSION_REVISION $_minor/" "$srcdir/TIC-80/CMakeLists.txt"
}

build() {
	cd "$srcdir/TIC-80/build"
	cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SDLGPU=On
	cmake --build . --config Release --parallel
}

package() {
	install -Dm755 "$srcdir/TIC-80/build/bin/tic80" "$pkgdir/usr/bin/tic80"
	install -Dm755 "$srcdir/TIC-80/build/bin/player-sdl" "$pkgdir/usr/bin/player-sdl"
	install -Dm755 "$srcdir/TIC-80/build/bin/bin2txt" "$pkgdir/usr/bin/bin2txt"
	install -Dm644 "$srcdir/TIC-80/build/linux/tic80.desktop" "$pkgdir/usr/share/applications/tic80.desktop"
	install -Dm644 "$srcdir/TIC-80/build/linux/tic80.png" "$pkgdir/usr/share/icons/hicolor/256x256/apps/tic80.png"
	install -Dm755 "$srcdir/TIC-80/build/bin/cart2prj" "$pkgdir/usr/bin/cart2prj"
	install -Dm755 "$srcdir/TIC-80/build/bin/prj2cart" "$pkgdir/usr/bin/prj2cart"
	install -Dm755 "$srcdir/TIC-80/build/bin/wasmp2cart" "$pkgdir/usr/bin/wasmp2cart"
	install -Dm755 "$srcdir/TIC-80/build/bin/xplode" "$pkgdir/usr/bin/xplode"
}