aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2014-05-12 09:28:50 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2014-05-12 09:28:50 +0800
commit659608ecc1e1909a843a41b3c32a5cb89752bb19 (patch)
tree7dd4642ddca43ef150a7d1931c281f28d1cb4d37 /games
parent123345a08eff886954b9991eeb3d7f5b35ad8194 (diff)
downloadfreebsd-ports-gnome-659608ecc1e1909a843a41b3c32a5cb89752bb19.tar.gz
freebsd-ports-gnome-659608ecc1e1909a843a41b3c32a5cb89752bb19.tar.zst
freebsd-ports-gnome-659608ecc1e1909a843a41b3c32a5cb89752bb19.zip
- Support staging
- Improve highscore dir handling - Remove DESKTOP_ENTRIES, game installs its own - Use new OPTIONS features - Convert USE_BZIP2 to USES
Diffstat (limited to 'games')
-rw-r--r--games/kobodeluxe/Makefile42
-rw-r--r--games/kobodeluxe/files/pkg-deinstall.in18
-rw-r--r--games/kobodeluxe/files/pkg-install.in10
-rw-r--r--games/kobodeluxe/pkg-plist119
4 files changed, 49 insertions, 140 deletions
diff --git a/games/kobodeluxe/Makefile b/games/kobodeluxe/Makefile
index 0a73da0c1fe3..de458f1bd582 100644
--- a/games/kobodeluxe/Makefile
+++ b/games/kobodeluxe/Makefile
@@ -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}"
-DATADIR= ${PREFIX}/share/kobo-deluxe
+SUB_FILES= pkg-deinstall pkg-install
+SUB_LIST= SCOREDIR="${SCOREDIR}"
-DESKTOP_ENTRIES="Kobo Deluxe" \
- "An SDL port of the scrolling game XKobo" \
- "${DATADIR}/" \
- "kobodeluxe" \
- "Game;ArcadeGame;" \
- false
+DATADIR= ${PREFIX}/share/kobo-deluxe
+PORTDOCS= *
+PORTDATA= *
-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>
diff --git a/games/kobodeluxe/files/pkg-deinstall.in b/games/kobodeluxe/files/pkg-deinstall.in
new file mode 100644
index 000000000000..590c217b82f7
--- /dev/null
+++ b/games/kobodeluxe/files/pkg-deinstall.in
@@ -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
diff --git a/games/kobodeluxe/files/pkg-install.in b/games/kobodeluxe/files/pkg-install.in
new file mode 100644
index 000000000000..28af6ce30203
--- /dev/null
+++ b/games/kobodeluxe/files/pkg-install.in
@@ -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"
diff --git a/games/kobodeluxe/pkg-plist b/games/kobodeluxe/pkg-plist
index be832c20e82d..452295f3b7f7 100644
--- a/games/kobodeluxe/pkg-plist
+++ b/games/kobodeluxe/pkg-plist
@@ -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%%