void-packages/srcpkgs/cdogs-sdl/template

52 lines
1.7 KiB
Bash
Raw Normal View History

2014-04-03 20:58:43 +00:00
# Template file for 'cdogs'
pkgname=cdogs-sdl
2015-04-16 12:27:50 +00:00
version=0.5.8
revision=1
2014-04-03 20:58:43 +00:00
build_style=cmake
2014-09-08 09:55:15 +00:00
_hqxrev=2a8a05854ad2147425d0b55a3c40e81c368c97fd
_tinydirrev=53aab97d6a11d70d669ce9c36d0d90ec6937c33d
2014-04-03 20:58:43 +00:00
hostmakedepends="cmake"
makedepends="physfs-devel SDL-devel SDL_mixer-devel SDL_image-devel SDL_net-devel"
2014-04-03 20:58:43 +00:00
short_desc="A classic overhead run-and-gun game"
maintainer="Enno Boland <gottox@voidlinux.eu>"
2014-04-03 20:58:43 +00:00
homepage="http://cxong.github.io/cdogs-sdl/"
license="GPL2"
distfiles="https://github.com/cxong/cdogs-sdl/archive/$version.tar.gz
https://github.com/cxong/tinydir/archive/$_tinydirrev.tar.gz
https://github.com/cxong/hqx/archive/$_hqxrev.tar.gz"
2015-04-16 12:27:50 +00:00
checksum="08e1f47b43c229ce0d20a32c9e287abc9f47cdc658ac38726a414083256401d3
2014-09-08 09:55:15 +00:00
2d71972034d570ac506dee5909cfac72c1870734228a61b266e354f2d9acf277
fca25adefd14af3584dcf0e48c69647aa46a924ddbfcb75ec6053528f1bd80bc"
2014-04-03 20:58:43 +00:00
lib32disabled=yes
post_extract() {
rmdir ${XBPS_BUILDDIR}/$pkgname-$version/src/cdogs/hqx
ln -sf ${XBPS_BUILDDIR}/hqx-$_hqxrev \
${XBPS_BUILDDIR}/$pkgname-$version/src/cdogs/hqx
rmdir ${XBPS_BUILDDIR}/$pkgname-$version/src/tinydir
ln -sf ${XBPS_BUILDDIR}/tinydir-$_tinydirrev \
${XBPS_BUILDDIR}/$pkgname-$version/src/tinydir
}
pre_configure() {
# disable tests
sed -i "/add_subdirectory(tests)/d" src/CMakeLists.txt
# fix the broken build system and build
sed -i \
-e "s/add_definitions(-Winline -Werror)/add_definitions(-Winline)/" \
-e "/PROGRAMS /s#src/#build/\0#g" \
-e "/FILES /s#build/linux/#build/\0#g" \
-e "s#\(SET(CMAKE_INSTALL_PREFIX\) .*#\1 /usr/share/cdogs)#" \
-e "s#\(set(CDOGS_DATA_DIR\) .*#\1 /usr/share/cdogs/)#" \
CMakeLists.txt
2014-05-03 21:21:39 +00:00
# workaround bug
ln -rs build build/build
2014-04-03 20:58:43 +00:00
}
post_install() {
mv $DESTDIR/usr/share/cdogs/bin $DESTDIR/usr/bin
}