gzdoom: several improvements

- fix 'Cannot find gzdoom.pk3' with default config
 - install soundfont gzdoom.sf2
 - add .desktop file (from upstream .deb package)
 - set release date string

Closes: #11023 [via git-merge-pr]
This commit is contained in:
Michael Straube 2018-01-23 08:39:59 +01:00 committed by Jürgen Buchmüller
parent 2b374f9b83
commit b84456fbde
1 changed files with 17 additions and 4 deletions

View File

@ -1,7 +1,8 @@
# Template file for 'gzdoom' # Template file for 'gzdoom'
pkgname=gzdoom pkgname=gzdoom
version=3.2.5 version=3.2.5
revision=1 revision=2
_tagdate=2018-01-03
wrksrc=${pkgname}-g${version} wrksrc=${pkgname}-g${version}
build_style=cmake build_style=cmake
configure_args="-DINSTALL_PK3_PATH=share/gzdoom" configure_args="-DINSTALL_PK3_PATH=share/gzdoom"
@ -12,8 +13,11 @@ short_desc="Advanced Doom source port with OpenGL support"
maintainer="Michael Straube <straubem@gmx.de>" maintainer="Michael Straube <straubem@gmx.de>"
license="GPL-3" license="GPL-3"
homepage="http://www.zdoom.org" homepage="http://www.zdoom.org"
distfiles="https://github.com/coelckers/${pkgname}/archive/g${version}.tar.gz" distfiles="https://github.com/coelckers/${pkgname}/archive/g${version}.tar.gz
checksum=e9cf0aa5b7ee0b165532dee55e4965f6aabf1acadb79f7372f8e362540206748 https://github.com/coelckers/${pkgname}/releases/download/g${version}/${pkgname}_${version}_armhf.deb"
checksum="e9cf0aa5b7ee0b165532dee55e4965f6aabf1acadb79f7372f8e362540206748
2db1ea9c20ede1e07b6bcb6e6c45c984e1795c3ab716a6cca5c227ed6d900df5"
skip_extraction="${pkgname}_${version}_armhf.deb"
nocross=yes nocross=yes
case "$XBPS_MACHINE" in case "$XBPS_MACHINE" in
@ -24,11 +28,20 @@ case "$XBPS_MACHINE" in
esac esac
post_extract() { post_extract() {
sed -i "s|<unknown version>|${version}|" tools/updaterevision/updaterevision.c ar -p ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}_${version}_armhf.deb data.tar.xz |
tar --strip-components=4 -xJf - ./usr/share/{pixmaps/gzdoom.png,applications/gzdoom.desktop}
sed -i "s|GIT_DESCRIPTION|\"${version}\"|g" src/gitinfo.cpp
sed -i "s|VERSIONSTR|\"${version}\"|g" src/gitinfo.cpp
sed -i "s|GIT_TIME|\"${_tagdate}\"|g" src/gitinfo.cpp
sed -i 's|#define SHARE_DIR.*|#define SHARE_DIR "/usr/share/gzdoom/"|' src/posix/i_system.h sed -i 's|#define SHARE_DIR.*|#define SHARE_DIR "/usr/share/gzdoom/"|' src/posix/i_system.h
sed -i 's|"/usr/share/games/doom"|"/usr/share/gzdoom"|g' src/gameconfigfile.cpp
} }
post_install() { post_install() {
vmkdir usr/share/licenses vmkdir usr/share/licenses
mv ${PKGDESTDIR}/usr/share/{doc/gzdoom/licenses,licenses/${pkgname}} mv ${PKGDESTDIR}/usr/share/{doc/gzdoom/licenses,licenses/${pkgname}}
vinstall gzdoom.desktop 644 usr/share/applications
vinstall gzdoom.png 644 usr/share/pixmaps
vinstall soundfont/gzdoom.sf2 644 usr/share/gzdoom
} }