void-packages/srcpkgs/rocksndiamonds/template

34 lines
1.2 KiB
Bash

# Template file for 'rocksndiamonds'
pkgname=rocksndiamonds
version=4.2.0.2
revision=3
build_style=gnu-makefile
hostmakedepends="pkg-config"
makedepends="SDL2_image-devel SDL2_mixer-devel SDL2_net-devel"
short_desc="Arcade style game"
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
license="GPL-2.0-only"
homepage="http://www.artsoft.org/rocksndiamonds"
distfiles="http://www.artsoft.org/RELEASES/unix/${pkgname}/${pkgname}-${version}.tar.gz"
checksum=514299cbb05b8f9aaaf2266a746b8e8f54259a50e12f2280dbbbe9a763a50b84
replaces="rocksndiamonds-data>=0"
do_build() {
CFLAGS+=" -DTARGET_SDL2"
CFLAGS+=" -DRO_GAME_DIR='\"/usr/share/${pkgname}\"'"
CFLAGS+=" -DRW_GAME_DIR='\"/var/lib/${pkgname}\"'"
CFLAGS+=" $(sdl2-config --cflags)"
LDFLAGS+=" $(sdl2-config --libs) -lSDL2_image -lSDL2_mixer -lSDL2_net -lm -lz"
make ${makejobs} CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
}
do_install() {
vmkdir usr/share/${pkgname}
cp -aR graphics levels music sounds ${DESTDIR}/usr/share/${pkgname}
vbin rocksndiamonds
# Manual page is no longer supplied (WTF)
# vman rocksndiamonds.1
vinstall ${FILESDIR}/${pkgname}.desktop 644 usr/share/applications
vinstall ${FILESDIR}/${pkgname}.png 644 usr/share/pixmaps
}