opentyrian: clean properly

This commit is contained in:
Đoàn Trần Công Danh 2020-10-05 07:28:10 +07:00
parent 62a8867036
commit 08e2ba5404
2 changed files with 12 additions and 18 deletions

View file

@ -1 +0,0 @@
opentyrian

View file

@ -1,45 +1,40 @@
# Template file for 'opentyrian' # Template file for 'opentyrian'
pkgname=opentyrian pkgname=opentyrian
version=2.1.20130907 version=2.1.20130907
revision=2 revision=3
_dataver=21 _dataver=21
create_wrksrc=yes
build_wrksrc=$pkgname-$version
build_style=gnu-makefile build_style=gnu-makefile
hostmakedepends="pkg-config unzip" hostmakedepends="pkg-config unzip"
makedepends="SDL_net-devel" makedepends="SDL_net-devel"
depends="${pkgname}-data"
short_desc="OSS port of the DOS shoot-em-up Tyrian" short_desc="OSS port of the DOS shoot-em-up Tyrian"
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>" maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
license="GPL-2" license="GPL-2.0-or-later"
homepage="https://bitbucket.org/${pkgname}/${pkgname}/wiki/Home" homepage="https://bitbucket.org/opentyrian/opentyrian/wiki/Home"
distfiles="http://www.camanis.net/${pkgname}/releases/${pkgname}-${version}-src.tar.gz distfiles="http://www.camanis.net/${pkgname}/releases/${pkgname}-${version}-src.tar.gz
http://camanis.net/tyrian/tyrian${_dataver}.zip" http://camanis.net/tyrian/tyrian${_dataver}.zip"
checksum="f54b6b3cedcefa187c9f605d6164aae29ec46a731a6df30d351af4c008dee45f checksum="f54b6b3cedcefa187c9f605d6164aae29ec46a731a6df30d351af4c008dee45f
7790d09a2a3addcd33c66ef063d5900eb81cc9c342f4807eb8356364dd1d9277" 7790d09a2a3addcd33c66ef063d5900eb81cc9c342f4807eb8356364dd1d9277"
replaces="opentyrian-data>=0"
CFLAGS="-Wno-error -fcommon" CFLAGS="-Wno-error -fcommon"
pre_build() { pre_build() {
sed -i ${wrksrc}/Makefile -e "s;-g0;$CFLAGS;" vsed -i Makefile -e "s;-g0;$CFLAGS;"
} }
do_install() { do_install() {
vbin ${pkgname} vbin ${pkgname}
vman linux/man/${pkgname}.6 vman linux/man/${pkgname}.6
vinstall linux/${pkgname}.desktop 644 usr/share/applications vinstall linux/${pkgname}.desktop 644 usr/share/applications
vinstall ${wrksrc}/linux/icons/tyrian-128.png 644 usr/share/pixmaps ${pkgname}.png vinstall linux/icons/tyrian-128.png 644 usr/share/pixmaps ${pkgname}.png
cat <<EOT > ${wrksrc}/manual.txt vmkdir usr/share/${sourcepkg}/data
vcopy "${wrksrc}/tyrian${_dataver}/*" usr/share/${sourcepkg}/data
cat <<EOT > manual.txt
******** This is the original manual of the DOS game. The install ******** This is the original manual of the DOS game. The install
instructions are obsolete, while the story and gameplay instructions instructions are obsolete, while the story and gameplay instructions
starting in section "V) THE STORY" may still be useful. ******** starting in section "V) THE STORY" may still be useful. ********
EOT EOT
sed 's/\r//' ${XBPS_BUILDDIR}/tyrian${_dataver}/manual.doc >> ${wrksrc}/manual.txt sed 's/\r//' ${wrksrc}/tyrian${_dataver}/manual.doc >> manual.txt
vdoc manual.txt vdoc manual.txt
} }
opentyrian-data_package() {
short_desc+=" - data files"
archs=noarch
pkg_install() {
vmkdir usr/share/${sourcepkg}/data
vcopy "${XBPS_BUILDDIR}/tyrian${_dataver}/*" usr/share/${sourcepkg}/data
}
}