summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7e1ed5e7645a374a5ff16cb5c8df1131cbcac065 (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
# Maintainer: Bart van Strien <bart.bes@gmail.com>
# Contributor: Linus Sjögren <thelinx@unreliablepollution.net>
# Contributor: Andrzej Giniewicz < gginiu@gmail.com >
pkgname=love-git
pkgver=20240406.92a03719
pkgrel=1
pkgdesc="An open-source 2D game engine which uses the versatile Lua scripting language to create dynamic gaming experiences."
arch=(i686 x86_64 armv6h armv7h)
url="https://love2d.org/"
license=('Zlib')
depends=(
	'luajit' 'freetype2' 'openal' 'libvorbis' 'libmodplug'
	'sdl2' 'zlib' 'libtheora' 'harfbuzz' 'libogg' 'gcc-libs' 'glibc'
)
replaces=('love-hg')
source=('git+https://github.com/love2d/love')
makedepends=('git' 'cmake')
options=(!strip)
sha256sums=('SKIP')

pkgver() {
	cd "$srcdir/love"
	git log -1 --format='%cd.%h' --date=short | tr -d -
}

build() {
	msg "Generating makefiles"
	cmake -B build -S "$srcdir/love" \
		-DLOVE_EXE_NAME='love-git' \
		-DCMAKE_BUILD_TYPE='None' \
		-DCMAKE_INSTALL_PREFIX='/usr' \
		-DCMAKE_SKIP_INSTALL_RPATH=YES \
		-Wno-dev

	msg "Building"
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build

	# Skip installing desktop files, icons, etc
	rm -r "${pkgdir}/usr/share"

	# Install the license file
	install -D -m644 "${srcdir}/love/license.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

# vim:set ts=4 sw=4 noet: