summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 24c935a215792f6e2e21099799c1eb2c17117fcb (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
# Maintainer: ROllerozxa (temporaryemail4meh [gee mail])
pkgname=minecraft-c
pkgver=1.0
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')
makedepends=('git' 'clang')
source=("${pkgname}::git+https://github.com/johnpayne-dev/MinecraftC"
		"${pkgname}.desktop"
		"${pkgname}.png")
md5sums=('SKIP' 'SKIP' 'SKIP')

build() {
	cd "${pkgname}"

	# 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/Utilities/*.c \
		-lm -lSDL2 -lGL -lGLU \
		-o Output/MinecraftC
}

package() {
	install -Dm755 "${srcdir}/${pkgname}/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"
}