- Support staging

- Improve highscore dir handling
- Remove DESKTOP_ENTRIES, game installs its own
- Use new OPTIONS features
- Convert USE_BZIP2 to USES
This commit is contained in:
Dmitry Marakasov 2014-05-12 01:28:50 +00:00
parent 0d931e95f7
commit 2e8dd386b2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=353758
4 changed files with 49 additions and 140 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= kobodeluxe
PORTVERSION= 0.5.1
PORTREVISION= 9
PORTREVISION= 10
CATEGORIES= games
MASTER_SITES= http://olofson.net/kobodl/download/ \
http://mirror.amdmi3.ru/distfiles/
@ -12,37 +12,25 @@ DISTNAME= KoboDeluxe-${DISTVERSION}
MAINTAINER= amdmi3@FreeBSD.org
COMMENT= An SDL port of the scrolling game XKobo
USE_BZIP2= yes
USES= tar:bzip2
USE_SDL= image sdl
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --sharedstatedir=${SCOREDIR} --enable-oss
MAN6= kobodl.6
SCOREDIR= /var/games/${PORTNAME}
PLIST_SUB= SCOREDIR="${SCOREDIR}"
SUB_FILES= pkg-deinstall pkg-install
SUB_LIST= SCOREDIR="${SCOREDIR}"
DATADIR= ${PREFIX}/share/kobo-deluxe
PORTDOCS= *
PORTDATA= *
DESKTOP_ENTRIES="Kobo Deluxe" \
"An SDL port of the scrolling game XKobo" \
"${DATADIR}/" \
"kobodeluxe" \
"Game;ArcadeGame;" \
false
OPTIONS_DEFINE= OPENGL
OPTIONS_DEFINE= DOCS OPENGL
OPTIONS_DEFAULT=OPENGL
NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MOPENGL}
USE_GL= yes
CONFIGURE_ARGS+= --enable-opengl
.else
CONFIGURE_ARGS+= --disable-opengl
.endif
OPENGL_USE= GL=gl
OPENGL_CONFIGURE_ENABLE= opengl
post-extract:
@cd ${WRKSRC} && ${TAR} -xzf icons.tar.gz
@ -57,12 +45,12 @@ post-patch:
${WRKSRC}/enemy.cpp
post-install:
${CHGRP} games ${PREFIX}/bin/kobodl
${CHMOD} g+s ${PREFIX}/bin/kobodl
${INSTALL} -d -o root -g games -m 775 ${SCOREDIR}
@${RM} -rf ${STAGEDIR}/var
${INSTALL_DATA} ${WRKSRC}/icons/Ubuntu/kobodeluxe.desktop \
${PREFIX}/share/applications/
${STAGEDIR}${PREFIX}/share/applications/
${INSTALL_DATA} ${WRKSRC}/icons/Ubuntu/kobo-icon.xpm \
${PREFIX}/share/pixmaps/
${STAGEDIR}${PREFIX}/share/pixmaps/
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>

View File

@ -0,0 +1,18 @@
#!/bin/sh
#
# $FreeBSD$
[ "$2" != "POST-DEINSTALL" ] && exit 0
rmdir "%%SCOREDIR%%/kobo-deluxe/scores" 2>/dev/null
rmdir "%%SCOREDIR%%/kobo-deluxe" 2>/dev/null
rmdir "%%SCOREDIR%%" 2>/dev/null
if [ -e "%%SCOREDIR%%" ]; then
echo
echo "To completely remove the port, please remove the following"
echo "directory manually, if it's no longer needed:"
echo
echo " %%SCOREDIR%%"
echo
fi

View File

@ -0,0 +1,10 @@
#!/bin/sh
#
# $FreeBSD$
[ "$2" != "POST-INSTALL" ] && exit 0
[ -e "%%SCOREDIR%%/kobo-deluxe/scores" ] && exit 0
mkdir -p "%%SCOREDIR%%/kobo-deluxe/scores"
chgrp -R games "%%SCOREDIR%%"
chmod g+w "%%SCOREDIR%%/kobo-deluxe/scores"

View File

@ -1,115 +1,8 @@
@group games
@mode 2555
bin/kobodl
%%DATADIR%%/gfx/bigfont3.png
%%DATADIR%%/gfx/bigship.png
%%DATADIR%%/gfx/bmr-green.png
%%DATADIR%%/gfx/bmr-pink.png
%%DATADIR%%/gfx/bmr-purple.png
%%DATADIR%%/gfx/bolt.png
%%DATADIR%%/gfx/boltexpl.png
%%DATADIR%%/gfx/bomb.png
%%DATADIR%%/gfx/bombdeto.png
%%DATADIR%%/gfx/brushes.png
%%DATADIR%%/gfx/bullet5b.png
%%DATADIR%%/gfx/bulletexpl2.png
%%DATADIR%%/gfx/counterfont.png
%%DATADIR%%/gfx/crosshair.png
%%DATADIR%%/gfx/deluxe.png
%%DATADIR%%/gfx/explo1e.png
%%DATADIR%%/gfx/explo3e.png
%%DATADIR%%/gfx/explo4e.png
%%DATADIR%%/gfx/explo5e.png
%%DATADIR%%/gfx/fighter.png
%%DATADIR%%/gfx/flatstars1.png
%%DATADIR%%/gfx/focusfx.png
%%DATADIR%%/gfx/goldfont.png
%%DATADIR%%/gfx/hitnoise.png
%%DATADIR%%/gfx/icefont2.png
%%DATADIR%%/gfx/loading3.png
%%DATADIR%%/gfx/logo-outline.png
%%DATADIR%%/gfx/logomask3.png
%%DATADIR%%/gfx/missile.png
%%DATADIR%%/gfx/missile2.png
%%DATADIR%%/gfx/missile3.png
%%DATADIR%%/gfx/noise.png
%%DATADIR%%/gfx/player.png
%%DATADIR%%/gfx/ring.png
%%DATADIR%%/gfx/ringexpl2b.png
%%DATADIR%%/gfx/rock1c.png
%%DATADIR%%/gfx/rock2.png
%%DATADIR%%/gfx/rockexpl.png
%%DATADIR%%/gfx/screen2.png
%%DATADIR%%/gfx/shinyrock.png
%%DATADIR%%/gfx/tiles-blood.png
%%DATADIR%%/gfx/tiles-chrome.png
%%DATADIR%%/gfx/tiles-double.png
%%DATADIR%%/gfx/tiles-green.png
%%DATADIR%%/gfx/tiles-metal.png
%%DATADIR%%/sfx/aguitar1.agw
%%DATADIR%%/sfx/bassdrum5.agw
%%DATADIR%%/sfx/bleep1.agw
%%DATADIR%%/sfx/bleep3.agw
%%DATADIR%%/sfx/boltfire2.agw
%%DATADIR%%/sfx/boltfire2e.agw
%%DATADIR%%/sfx/boltfire2o.agw
%%DATADIR%%/sfx/boltfire2s.agw
%%DATADIR%%/sfx/brass2.agw
%%DATADIR%%/sfx/bzzzt1.agw
%%DATADIR%%/sfx/cannon1.agw
%%DATADIR%%/sfx/claps1.agw
%%DATADIR%%/sfx/edge2.agw
%%DATADIR%%/sfx/explo1b-rg.agw
%%DATADIR%%/sfx/explo1b.agw
%%DATADIR%%/sfx/explo1c-rg.agw
%%DATADIR%%/sfx/explo1c.agw
%%DATADIR%%/sfx/explo3d.agw
%%DATADIR%%/sfx/explo4d.agw
%%DATADIR%%/sfx/explo5.agw
%%DATADIR%%/sfx/explo5b.agw
%%DATADIR%%/sfx/explo5c.agw
%%DATADIR%%/sfx/explo6.agw
%%DATADIR%%/sfx/fmthump1b.agw
%%DATADIR%%/sfx/gameover1.agw
%%DATADIR%%/sfx/hardsync1.agw
%%DATADIR%%/sfx/impact2.agw
%%DATADIR%%/sfx/impact2b.agw
%%DATADIR%%/sfx/impact2c.agw
%%DATADIR%%/sfx/klank2b.agw
%%DATADIR%%/sfx/klank3.agw
%%DATADIR%%/sfx/klank3b.agw
%%DATADIR%%/sfx/klank3c.agw
%%DATADIR%%/sfx/klank4.agw
%%DATADIR%%/sfx/kobosfx.h
%%DATADIR%%/sfx/launch.agw
%%DATADIR%%/sfx/launch2.agw
%%DATADIR%%/sfx/launch3b.agw
%%DATADIR%%/sfx/launch4.agw
%%DATADIR%%/sfx/metallic7.agw
%%DATADIR%%/sfx/metallic7rs.agw
%%DATADIR%%/sfx/music.agw
%%DATADIR%%/sfx/music_c.agw
%%DATADIR%%/sfx/noiseburst2.agw
%%DATADIR%%/sfx/phattpad2.agw
%%DATADIR%%/sfx/pioing1b.agw
%%DATADIR%%/sfx/rockexplo.agw
%%DATADIR%%/sfx/save_waves.agw
%%DATADIR%%/sfx/schwoom1.agw
%%DATADIR%%/sfx/schwoop2.agw
%%DATADIR%%/sfx/schwoop3.agw
%%DATADIR%%/sfx/sfx.agw
%%DATADIR%%/sfx/sfx_c.agw
%%DATADIR%%/sfx/sine.agw
%%DATADIR%%/sfx/snare1.agw
%%DATADIR%%/sfx/synbass1.agw
%%DATADIR%%/sfx/test2.agw
%%DATADIR%%/sfx/test2.mid
%%DATADIR%%/sfx/thunder1.agw
%%DATADIR%%/sfx/trance1.agw
%%DATADIR%%/sfx/trance1.mid
%%DATADIR%%/sfx/trance1_c.agw
%%DATADIR%%/sfx/zapp1.agw
@mode
@group
man/man6/kobodl.6.gz
share/applications/kobodeluxe.desktop
share/pixmaps/kobo-icon.xpm
@dirrm %%DATADIR%%/sfx
@dirrm %%DATADIR%%/gfx
@dirrm %%DATADIR%%
@exec install -d -o root -g games -m 775 %%SCOREDIR%%
@dirrmtry %%SCOREDIR%%