aboutsummaryrefslogtreecommitdiff
path: root/games/pycadia
diff options
context:
space:
mode:
authorRusmir Dusko <nemysis@FreeBSD.org>2013-12-08 14:58:36 +0000
committerRusmir Dusko <nemysis@FreeBSD.org>2013-12-08 14:58:36 +0000
commit5fd82c24ff66c1ca7a2a17bb827c97f4c7ba79e5 (patch)
tree12751f3c039193444746c50d18ab92e2bb55c587 /games/pycadia
parent00ba2d7bbd31b41afdff87a3687ba633e078062b (diff)
Notes
Diffstat (limited to 'games/pycadia')
-rw-r--r--games/pycadia/Makefile54
-rw-r--r--games/pycadia/files/pycadia.sh.in3
-rw-r--r--games/pycadia/pkg-plist101
3 files changed, 134 insertions, 24 deletions
diff --git a/games/pycadia/Makefile b/games/pycadia/Makefile
index e21fc4260452..35c93f0df974 100644
--- a/games/pycadia/Makefile
+++ b/games/pycadia/Makefile
@@ -1,15 +1,15 @@
-# Created by: nemysis@gmx.ch
+# Created by: nemysis <nemysis@gmx.ch>
# $FreeBSD$
PORTNAME= pycadia
PORTVERSION= 0.5.1
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= games python
MASTER_SITES= ${MASTER_SITE_GENTOO:S/%SUBDIR%/distfiles/} \
- SF/nemysisfreebsdp/
+ SF/nemysisfreebsdp/games/
DIST_SUBDIR= python
-MAINTAINER= nemysis@gmx.ch
+MAINTAINER= nemysis@FreeBSD.org
COMMENT= Home to vector gaming, Python style
LICENSE= GPLv2
@@ -20,35 +20,43 @@ WRKSRC= ${WRKDIR}/${PORTNAME}
USE_GNOME= pygtk2 libgnomeui
USE_PYTHON= yes
-NO_BUILD= yes
-PLIST_FILES= bin/${PORTNAME} \
- share/pixmaps/${PORTNAME}.png
-
-PORTDATA= *
PORTDOCS= CHANGELOG README TODO gravity.txt
-DESKTOP_ENTRIES="Pycadia" "${COMMENT}" "${PORTNAME}" \
- "${PORTNAME}" "Game;ArcadeGame;" ${FALSE}
+OPTIONS_DEFINE= DOCS
+
+DESKTOP_ENTRIES="Pycadia" "" "${PORTNAME}" \
+ "${PORTNAME}" "Game;ArcadeGame;" ""
SUB_FILES= ${PORTNAME}.sh
-NO_STAGE= yes
-.include <bsd.port.options.mk>
+post-patch:
+ @${FIND} ${WRKSRC} -name "*.bak" -delete
+
+do-build:
+ @${PYTHON_CMD} -m compileall ${WRKSRC}
+ @${PYTHON_CMD} -O -m compileall ${WRKSRC}
do-install:
- ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${PREFIX}/bin/${PORTNAME}
+ @${REINPLACE_CMD} -e 's|%%PYTHON_CMD%%|${PYTHON_CMD}|' \
+ ${WRKDIR}/${PORTNAME}.sh
+ ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+
+.for d in glade pixmaps sounds
+ @(cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${STAGEDIR}${DATADIR})
+.endfor
+
+.for d in *.py *.pyc *.pyo
+ @(cd ${WRKSRC} ; ${INSTALL_SCRIPT} ${d} ${STAGEDIR}${DATADIR})
+.endfor
- ${MKDIR} ${DATADIR}
- @(cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${DATADIR})
- @(cd ${DATADIR} && ${CHMOD} 555 ${PORTNAME}.py spacewarpy.py vektoroids.py)
- ${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.conf ${DATADIR}
+ @(cd ${STAGEDIR}${DATADIR} && ${CHMOD} 555 ${PORTNAME}.py spacewarpy.py vektoroids.py)
+ ${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.conf ${STAGEDIR}${DATADIR}
- ${INSTALL_DATA} ${WRKSRC}/pixmaps/logo1.png ${PREFIX}/share/pixmaps/${PORTNAME}.png
+ ${INSTALL_DATA} ${WRKSRC}/pixmaps/pysteroids.png \
+ ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png
-.if ${PORT_OPTIONS:MDOCS}
- ${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${DOCSDIR}
-.endif
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
diff --git a/games/pycadia/files/pycadia.sh.in b/games/pycadia/files/pycadia.sh.in
index 024a0b34f6fa..4cf69ac754cf 100644
--- a/games/pycadia/files/pycadia.sh.in
+++ b/games/pycadia/files/pycadia.sh.in
@@ -1,6 +1,7 @@
#!/bin/sh
#
# $FreeBSD$
+#
cd "%%DATADIR%%"
-./pycadia.py
+exec %%PYTHON_CMD%% ./pycadia.py "${@}"
diff --git a/games/pycadia/pkg-plist b/games/pycadia/pkg-plist
new file mode 100644
index 000000000000..19532e648bea
--- /dev/null
+++ b/games/pycadia/pkg-plist
@@ -0,0 +1,101 @@
+bin/pycadia
+share/pixmaps/pycadia.png
+%%DATADIR%%/actor.py
+%%DATADIR%%/actor.pyc
+%%DATADIR%%/actor.pyo
+%%DATADIR%%/asteroid.py
+%%DATADIR%%/asteroid.pyc
+%%DATADIR%%/asteroid.pyo
+%%DATADIR%%/config.py
+%%DATADIR%%/config.pyc
+%%DATADIR%%/config.pyo
+%%DATADIR%%/constants.py
+%%DATADIR%%/constants.pyc
+%%DATADIR%%/constants.pyo
+%%DATADIR%%/explosion.py
+%%DATADIR%%/explosion.pyc
+%%DATADIR%%/explosion.pyo
+%%DATADIR%%/game_state.py
+%%DATADIR%%/game_state.pyc
+%%DATADIR%%/game_state.pyo
+%%DATADIR%%/gd_letters.py
+%%DATADIR%%/gd_letters.pyc
+%%DATADIR%%/gd_letters.pyo
+%%DATADIR%%/gd_numbers.py
+%%DATADIR%%/gd_numbers.pyc
+%%DATADIR%%/gd_numbers.pyo
+%%DATADIR%%/gd_objects.py
+%%DATADIR%%/gd_objects.pyc
+%%DATADIR%%/gd_objects.pyo
+%%DATADIR%%/glade/pycadia.glade
+%%DATADIR%%/glade/pycadia.gladep
+%%DATADIR%%/glade2.py
+%%DATADIR%%/glade2.pyc
+%%DATADIR%%/glade2.pyo
+%%DATADIR%%/hiscores.py
+%%DATADIR%%/hiscores.pyc
+%%DATADIR%%/hiscores.pyo
+%%DATADIR%%/msg_test.py
+%%DATADIR%%/msg_test.pyc
+%%DATADIR%%/msg_test.pyo
+%%DATADIR%%/pixmaps/logo1.png
+%%DATADIR%%/pixmaps/pysteroids.png
+%%DATADIR%%/pixmaps/spacewarpy_msg.png
+%%DATADIR%%/pixmaps/vektoroids_msg.png
+%%DATADIR%%/pixmaps/vektoroids_msg2.png
+%%DATADIR%%/player.py
+%%DATADIR%%/player.pyc
+%%DATADIR%%/player.pyo
+%%DATADIR%%/pycadia.conf
+%%DATADIR%%/pycadia.py
+%%DATADIR%%/pycadia.pyc
+%%DATADIR%%/pycadia.pyo
+%%DATADIR%%/pycadia_prefs.py
+%%DATADIR%%/pycadia_prefs.pyc
+%%DATADIR%%/pycadia_prefs.pyo
+%%DATADIR%%/pyg_keys.py
+%%DATADIR%%/pyg_keys.pyc
+%%DATADIR%%/pyg_keys.pyo
+%%DATADIR%%/saucer.py
+%%DATADIR%%/saucer.pyc
+%%DATADIR%%/saucer.pyo
+%%DATADIR%%/setup.py
+%%DATADIR%%/setup.pyc
+%%DATADIR%%/setup.pyo
+%%DATADIR%%/shot.py
+%%DATADIR%%/shot.pyc
+%%DATADIR%%/shot.pyo
+%%DATADIR%%/sound.py
+%%DATADIR%%/sound.pyc
+%%DATADIR%%/sound.pyo
+%%DATADIR%%/sounds/big_explode1.wav
+%%DATADIR%%/sounds/big_explode2.wav
+%%DATADIR%%/sounds/explode1.wav
+%%DATADIR%%/sounds/explode2.wav
+%%DATADIR%%/sounds/explode_short.wav
+%%DATADIR%%/sounds/fire1.wav
+%%DATADIR%%/sounds/fire2.wav
+%%DATADIR%%/sounds/idle.wav
+%%DATADIR%%/sounds/pop.wav
+%%DATADIR%%/sounds/thrust1.wav
+%%DATADIR%%/sounds/thrust2.wav
+%%DATADIR%%/sounds/ufo-shot.wav
+%%DATADIR%%/sounds/ufo-shot1.wav
+%%DATADIR%%/sounds/ufo.wav
+%%DATADIR%%/sounds/ufo1.wav
+%%DATADIR%%/spacewarpy.py
+%%DATADIR%%/spacewarpy.pyc
+%%DATADIR%%/spacewarpy.pyo
+%%DATADIR%%/sun.py
+%%DATADIR%%/sun.pyc
+%%DATADIR%%/sun.pyo
+%%DATADIR%%/vector_text.py
+%%DATADIR%%/vector_text.pyc
+%%DATADIR%%/vector_text.pyo
+%%DATADIR%%/vektoroids.py
+%%DATADIR%%/vektoroids.pyc
+%%DATADIR%%/vektoroids.pyo
+@dirrm %%DATADIR%%/sounds
+@dirrm %%DATADIR%%/pixmaps
+@dirrm %%DATADIR%%/glade
+@dirrm %%DATADIR%%