summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d62b6d85e43164c594dcb6e0b82bb6335a0ac2f0 (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
# Maintainer: ROllerozxa (temporaryemail4meh [gee mail])
pkgname=minecraft-c
pkgver=1.2
_pkghash=43928d42e1f32bd76a994f0bb22c0153a7271b3f
pkgrel=1
pkgdesc="Minecraft Classic 0.0.30a reimplemented in C."
arch=(x86_64)
url="https://github.com/johnpayne-dev/MinecraftC"
license=('MIT')
depends=('sdl2' 'stb')
makedepends=('git' 'clang')
source=("${url}/archive/${_pkghash}.zip"
		"https://raw.githubusercontent.com/johnpayne-dev/cute_headers/master/cute_sound.h"
		"${pkgname}.desktop"
		"${pkgname}.png")
md5sums=('SKIP' 'SKIP' 'SKIP' 'SKIP')

build() {
	cd "MinecraftC-${_pkghash}"
	
	cp ../cute_sound.h External/cute_headers/

	# Building
	mkdir -p Output
	clang \
		MinecraftC/*.c \
		MinecraftC/GUI/*.c \
		MinecraftC/Level/*.c \
		MinecraftC/Level/Generator/*.c \
		MinecraftC/Level/Tile/*.c \
		MinecraftC/Level/Generator/Noise/*.c \
		MinecraftC/Particle/*.c \
		MinecraftC/Physics/*.c \
		MinecraftC/Player/*.c \
		MinecraftC/Render/*.c \
		MinecraftC/Render/Texture/*.c \
		MinecraftC/Sound/*.c \
		MinecraftC/Utilities/*.c \
		-lm -lSDL2 -lGL -lGLU -O2 \
		-I"/usr/include/SDL2/" \
		-I"/usr/include/stb/" \
		-I"External/cute_headers/" \
		-o Output/MinecraftC
}

package() {
	install -Dm755 "${srcdir}/MinecraftC-${_pkghash}/Output/MinecraftC" "${pkgdir}/usr/bin/MinecraftC" 
	install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
	install -Dm644 "${srcdir}/${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
}