widelands: multiple packaging fixes

- widelands looks for it's data relative to the path were the binary resides,
  use an absolute path instead so the data will be found
- wl_render_richtext was installed in /usr, move it to /usr/bin
- COPYING, CREDITS, Changelog and VERSION are installed in /usr, remove them
  before packaging

Closes: #11367 [via git-merge-pr]
This commit is contained in:
Helmut Pozimski 2018-02-03 11:48:58 +01:00 committed by Jürgen Buchmüller
parent cde54c87ef
commit 428a537d6c

View file

@ -1,13 +1,13 @@
# Template file for 'widelands'
pkgname=widelands
version=19
revision=4
revision=5
wrksrc=${pkgname}-build${version}-src
build_style=cmake
configure_args="
-DOPENGL_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include
-DOPTION_BUILD_WEBSITE_TOOLS=OFF
-DWL_INSTALL_DATADIR=share/widelands"
-DWL_INSTALL_DATADIR=/usr/share/widelands"
hostmakedepends="python pkg-config"
makedepends="boost-devel icu-devel minizip-devel gettext-devel glu-devel
glew-devel SDL2_gfx-devel SDL2_image-devel SDL2_net-devel
@ -34,6 +34,10 @@ post_install() {
# For some reason the binary is installed as /usr/widelands - move it
vmkdir usr/bin
mv ${DESTDIR}/usr/${pkgname} ${DESTDIR}/usr/bin
mv ${DESTDIR}/usr/wl_render_richtext ${DESTDIR}/usr/bin
# Remove files not needed in the package
rm -f ${DESTDIR}/usr/COPYING ${DESTDIR}/usr/CREDITS ${DESTDIR}/usr/ChangeLog ${DESTDIR}/usr/VERSION
vinstall ${FILESDIR}/${pkgname}.desktop 644 usr/share/applications
}