void-packages/srcpkgs/rocksndiamonds/template
2022-01-28 04:31:00 -03:00

31 lines
1.1 KiB
Bash

# Template file for 'rocksndiamonds'
pkgname=rocksndiamonds
version=4.3.1.0
revision=1
build_style=gnu-makefile
hostmakedepends="pkg-config"
makedepends="SDL2_image-devel SDL2_mixer-devel SDL2_net-devel"
short_desc="Arcade style game"
maintainer="Clyhtsuriva <void-packages@adjutor.xyz>"
license="GPL-2.0-only"
homepage="http://www.artsoft.org/rocksndiamonds"
distfiles="http://www.artsoft.org/RELEASES/unix/${pkgname}/${pkgname}-${version}.tar.gz"
checksum=33390e8079ecb5b451a235ca286b5a775ff86eaa7ab1697b816f45a8f4fdffa8
replaces="rocksndiamonds-data>=0"
do_build() {
vsed -i Makefile -e "s;^\(MAKE_CMD = \$(MAKE)\);& ${makejobs};"
CFLAGS+=" -DTARGET_SDL2"
CFLAGS+=" -DBASE_PATH='\"/usr/share/${pkgname}\"'"
CFLAGS+=" $(sdl2-config --cflags)"
LDFLAGS+=" $(sdl2-config --libs) -lSDL2_image -lSDL2_mixer -lSDL2_net -lm -lz"
make CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
}
do_install() {
vmkdir usr/share/${pkgname}
cp -aR graphics levels music sounds ${DESTDIR}/usr/share/${pkgname}
vbin rocksndiamonds
vinstall ${FILESDIR}/${pkgname}.desktop 644 usr/share/applications
vinstall ${FILESDIR}/${pkgname}.png 644 usr/share/pixmaps
}