widelands: multiple random changes to make me happy.

- Split data files into -data subpkg (noarch).
- Move binary to datadir/widelands
- Update script wrapper and desktop file for new paths.

Close #1505
This commit is contained in:
Juan RP 2015-05-05 10:42:09 +02:00
parent 622c6ab354
commit 57365d7b1b
4 changed files with 31 additions and 8 deletions

1
srcpkgs/widelands-data Symbolic link
View File

@ -0,0 +1 @@
widelands

View File

@ -16,7 +16,7 @@ GenericName[ru]=Стратегическая игра
GenericName[sk]=Strategická hra
Comment=A a real-time build-up strategy game
Comment[de]=Echtzeitbasiertes Aufbau-Strategiespiel
Icon=/usr/share/games/widelands/pics/wl-ico-128.png
TryExec=/usr/games/widelands
Icon=/usr/share/widelands/pics/wl-ico-128.png
TryExec=/usr/share/widelands/widelands
Exec=/usr/bin/widelands
Categories=Application;Game;StrategyGame;

View File

@ -2,9 +2,9 @@
#
# Startup script for widelands to recognize the user's LANG setting, if any.
WL_DATA="/usr/share/games/widelands"
WL_DATA="/usr/share/widelands"
WL_LOCALE="$WL_DATA/locale"
WL_LANG="$LANG"
[ -z "$WL_LANG" ] && WL_LANG="en_US.UTF-8"
exec /usr/games/widelands --datadir="$WL_DATA" --localedir="$WL_LOCALE" --language="$WL_LANG"
exec /usr/share/widelands/widelands --datadir="$WL_DATA" --localedir="$WL_LOCALE" --language="$WL_LANG"

View File

@ -1,15 +1,18 @@
# Template file for 'widelands'
pkgname=widelands
version=18
revision=1
revision=2
wrksrc=${pkgname}-build${version}-src
build_style=cmake
configure_args="
-DOPENGL_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include
-DLUA_LIBRARY=${XBPS_CROSS_BASE}/usr/lib/liblua5.1.a
-DLUA_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include/lua5.1"
-DLUA_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include/lua5.1
-DWL_INSTALL_DATADIR=share/widelands
-DWL_INSTALL_BINDIR=share/widelands"
hostmakedepends="cmake python pkg-config"
makedepends="boost-devel minizip-devel glu-devel glew-devel SDL_gfx-devel SDL_image-devel SDL_net-devel SDL_mixer-devel SDL_ttf-devel lua51-devel"
depends="${pkgname}-data-${version}_${revision}"
short_desc="A real-time strategy game"
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
license="GPL-2"
@ -21,3 +24,22 @@ post_install() {
vinstall ${FILESDIR}/${pkgname}.desktop 644 usr/share/applications
vbin ${FILESDIR}/${pkgname}.sh ${pkgname}
}
widelands-data_package() {
noarch=yes
short_desc+=" - data files"
pkg_install() {
vmove usr/share/widelands/campaigns
vmove usr/share/widelands/fonts
vmove usr/share/widelands/global
vmove usr/share/widelands/locale
vmove usr/share/widelands/maps
vmove usr/share/widelands/music
vmove usr/share/widelands/pics
vmove usr/share/widelands/scripting
vmove usr/share/widelands/sound
vmove usr/share/widelands/tribes
vmove usr/share/widelands/txts
vmove usr/share/widelands/worlds
}
}