aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authornemysis <nemysis@FreeBSD.org>2014-04-15 05:56:12 +0800
committernemysis <nemysis@FreeBSD.org>2014-04-15 05:56:12 +0800
commit5a67e0c5d1047806fc73bf42411bc0ad1d4bd3f7 (patch)
tree9d3c5996fcff72a7c24bd18bcabcc23ed4824dd2 /games
parentda34a969d0ca5cdb77d3e9397e21a202825b8819 (diff)
downloadfreebsd-ports-gnome-5a67e0c5d1047806fc73bf42411bc0ad1d4bd3f7.tar.gz
freebsd-ports-gnome-5a67e0c5d1047806fc73bf42411bc0ad1d4bd3f7.tar.zst
freebsd-ports-gnome-5a67e0c5d1047806fc73bf42411bc0ad1d4bd3f7.zip
- Bump PORTREVISION for pkg-plist change
- Change master sites, add icon - Transfer maintainership to games@ team - Add license (GPLv2) - Add DOCS and Option - Use files/twitch.in instead of construct - Add pkg-message, information about usage - Add Desktop entry file - Fix the usage of 'python' to get rid of the implicit lang/python dependency, add REINPLACE, fix deprecated code - Simplify installation handling - Recreate pkg-plist with make makeplist
Diffstat (limited to 'games')
-rw-r--r--games/twitch/Makefile48
-rw-r--r--games/twitch/distinfo2
-rw-r--r--games/twitch/files/pkg-message.in20
-rw-r--r--games/twitch/files/twitch.in7
-rw-r--r--games/twitch/pkg-descr2
-rw-r--r--games/twitch/pkg-plist178
6 files changed, 159 insertions, 98 deletions
diff --git a/games/twitch/Makefile b/games/twitch/Makefile
index bd5083506d84..a46fc918522d 100644
--- a/games/twitch/Makefile
+++ b/games/twitch/Makefile
@@ -3,26 +3,54 @@
PORTNAME= twitch
PORTVERSION= 1.0
-PORTREVISION= 8
+PORTREVISION= 9
CATEGORIES= games
-MASTER_SITES= SF/${PORTNAME}/Twitch/${PORTVERSION}
+MASTER_SITES= SF/${PORTNAME}/Twitch/${PORTVERSION}/ \
+ SF/nemysisfreebsdp/${CATEGORIES}/:icons
+DISTFILES= ${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX} \
+ ${PORTNAME}.png:icons
+EXTRACT_ONLY= ${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX}
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= games@FreeBSD.org
COMMENT= Overhead 2-d shooter, reminiscent of games like Robotron
+LICENSE= GPLv2
+
RUN_DEPENDS= ${PYGAME}
USE_PYTHON= yes
+PORTDOCS= AUTHORS BUGS README
+OPTIONS_DEFINE= DOCS
+
+SUB_FILES= ${PORTNAME} pkg-message
+
+DESKTOP_ENTRIES="Twitch" "" "${PORTNAME}" \
+ "${PORTNAME}" "Game;ActionGame;" ""
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|^.*#!.*python.*$$|#!${PYTHON_CMD}|; \
+ s|whrandom|random|' \
+ ${WRKSRC}/${PORTNAME}.py
+ @(cd ${WRKSRC} && ${RM} *.py.bak)
+
do-build:
- ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py -l ${WRKSRC}
+ @${PYTHON_CMD} -m compileall ${WRKSRC}
+ @${PYTHON_CMD} -O -m compileall ${WRKSRC}
do-install:
- @${MKDIR} ${STAGEDIR}${PREFIX}/share/twitch
- (cd ${WRKSRC}; ${TAR} cf - images sound levels twitch.*) | \
- (cd ${STAGEDIR}${PREFIX}/share/twitch; ${TAR} xf -)
- @printf "#!/bin/sh\ncd ${PREFIX}/share/twitch && \
- ${PYTHON_CMD} ${PREFIX}/share/twitch/twitch.py\n" > ${WRKDIR}/twitch.sh
- ${INSTALL_SCRIPT} ${WRKDIR}/twitch.sh ${STAGEDIR}${PREFIX}/bin/twitch
+ @${REINPLACE_CMD} -e 's|%%PYTHON_CMD%%|${PYTHON_CMD}|' \
+ ${WRKDIR}/${PORTNAME}
+ ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
+ @(cd ${WRKSRC} && ${COPYTREE_SHARE} "images levels sound" \
+ ${STAGEDIR}${DATADIR})
+.for f in *.py *.pyc *.pyo
+ ${INSTALL_SCRIPT} ${WRKSRC}/${f} ${STAGEDIR}${DATADIR}
+.endfor
+ ${INSTALL_DATA} ${_DISTDIR}/${PORTNAME}.png \
+ ${STAGEDIR}${PREFIX}/share/pixmaps/
+
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
diff --git a/games/twitch/distinfo b/games/twitch/distinfo
index 70bc20b4b091..76fe58e3cb89 100644
--- a/games/twitch/distinfo
+++ b/games/twitch/distinfo
@@ -1,2 +1,4 @@
SHA256 (twitch-1.0.tar.gz) = 2b3f0a08e1981fce70242dd0e8ce5efb753eaf813bde3eeb4a08fb03264fda12
SIZE (twitch-1.0.tar.gz) = 2160666
+SHA256 (twitch.png) = fe2d8c68d95fe92372ee2b969a1d4df59e3da4eb1a9c504d52e6d1e206a29669
+SIZE (twitch.png) = 3191
diff --git a/games/twitch/files/pkg-message.in b/games/twitch/files/pkg-message.in
new file mode 100644
index 000000000000..67b7d8887f46
--- /dev/null
+++ b/games/twitch/files/pkg-message.in
@@ -0,0 +1,20 @@
+===============================================================================
+
+Twitch has been installed.
+
+All options are given only in the command line
+
+
+You can use executable
+
+ %%DATADIR%%/twitch.py --help
+
+
+Or can use desktop file
+
+ %%LOCALBASE%%/share/applications/twitch.desktop
+
+
+Have fun!
+
+===============================================================================
diff --git a/games/twitch/files/twitch.in b/games/twitch/files/twitch.in
new file mode 100644
index 000000000000..4ffa64ae6e43
--- /dev/null
+++ b/games/twitch/files/twitch.in
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+cd "%%DATADIR%%"
+exec %%PYTHON_CMD%% ./twitch.py -m "${@}"
diff --git a/games/twitch/pkg-descr b/games/twitch/pkg-descr
index fcf67333b40a..70a0831234df 100644
--- a/games/twitch/pkg-descr
+++ b/games/twitch/pkg-descr
@@ -5,3 +5,5 @@ Deadly Disks. The player has entered the fortress of the evil Hippopoticus,
and is trying to rescue the fair Lady Penelope from his clutches. I wrote
Twitch as a proof-of-concept: namely that Python, properly written, is fast
enough to create a playable, cross-platform arcade game.
+
+WWW: http://sourceforge.net/projects/twitch/
diff --git a/games/twitch/pkg-plist b/games/twitch/pkg-plist
index 07388375f309..fa0dd2702e2d 100644
--- a/games/twitch/pkg-plist
+++ b/games/twitch/pkg-plist
@@ -1,89 +1,91 @@
bin/twitch
-share/twitch/images/blank1.png
-share/twitch/images/blank2.png
-share/twitch/images/blank3.png
-share/twitch/images/blank4.png
-share/twitch/images/block1.png
-share/twitch/images/block2.png
-share/twitch/images/block3.png
-share/twitch/images/block4.png
-share/twitch/images/bomb.png
-share/twitch/images/bombammo.png
-share/twitch/images/boss.png
-share/twitch/images/boss_dying.png
-share/twitch/images/bulletammo.png
-share/twitch/images/crosshair.png
-share/twitch/images/damage.png
-share/twitch/images/explosion.png
-share/twitch/images/fire.png
-share/twitch/images/flame.png
-share/twitch/images/flamerammo.png
-share/twitch/images/gate.png
-share/twitch/images/grenade.png
-share/twitch/images/grenadeammo.png
-share/twitch/images/gunner.png
-share/twitch/images/gunner_dying.png
-share/twitch/images/healthempty.png
-share/twitch/images/healthfull.png
-share/twitch/images/healthkit.png
-share/twitch/images/heart.png
-share/twitch/images/hunter.png
-share/twitch/images/hunter_dying.png
-share/twitch/images/key.png
-share/twitch/images/laserammo.png
-share/twitch/images/penelope.png
-share/twitch/images/player.png
-share/twitch/images/player_death.png
-share/twitch/images/robot.png
-share/twitch/images/robot_dying.png
-share/twitch/images/rocket.png
-share/twitch/images/rocketammo.png
-share/twitch/images/shooter.png
-share/twitch/images/shooter_dying.png
-share/twitch/images/smoke.png
-share/twitch/images/spawngate.png
-share/twitch/images/spider.png
-share/twitch/images/spider_dying.png
-share/twitch/images/title.png
-share/twitch/images/weapons.png
-share/twitch/images/weaponsel.png
-share/twitch/images/younffp_.ttf
-share/twitch/levels/1.lvl
-share/twitch/levels/10.lvl
-share/twitch/levels/2.lvl
-share/twitch/levels/3.lvl
-share/twitch/levels/4.lvl
-share/twitch/levels/5.lvl
-share/twitch/levels/6.lvl
-share/twitch/levels/7.lvl
-share/twitch/levels/8.lvl
-share/twitch/levels/9.lvl
-share/twitch/levels/template.lvl
-share/twitch/sound/bombblast.wav
-share/twitch/sound/explosion.wav
-share/twitch/sound/fealingnull.xm
-share/twitch/sound/flame.wav
-share/twitch/sound/gatedown.wav
-share/twitch/sound/gateup.wav
-share/twitch/sound/gchuck.wav
-share/twitch/sound/hunterdeath.wav
-share/twitch/sound/laser.wav
-share/twitch/sound/levelintro.wav
-share/twitch/sound/mg.wav
-share/twitch/sound/pain1.wav
-share/twitch/sound/pain2.wav
-share/twitch/sound/pain3.wav
-share/twitch/sound/pickup.wav
-share/twitch/sound/pickuphealth.wav
-share/twitch/sound/playerdeath.wav
-share/twitch/sound/rocket.wav
-share/twitch/sound/schizo.xm
-share/twitch/sound/shotgun.wav
-share/twitch/sound/spawngate.wav
-share/twitch/sound/weaponswitch.wav
-share/twitch/twitch.py
-share/twitch/twitch.pyc
-@dirrm share/twitch/sound
-@dirrm share/twitch/levels
-@dirrm share/twitch/images
-@dirrm share/twitch
+share/pixmaps/twitch.png
+%%DATADIR%%/images/blank1.png
+%%DATADIR%%/images/blank2.png
+%%DATADIR%%/images/blank3.png
+%%DATADIR%%/images/blank4.png
+%%DATADIR%%/images/block1.png
+%%DATADIR%%/images/block2.png
+%%DATADIR%%/images/block3.png
+%%DATADIR%%/images/block4.png
+%%DATADIR%%/images/bomb.png
+%%DATADIR%%/images/bombammo.png
+%%DATADIR%%/images/boss.png
+%%DATADIR%%/images/boss_dying.png
+%%DATADIR%%/images/bulletammo.png
+%%DATADIR%%/images/crosshair.png
+%%DATADIR%%/images/damage.png
+%%DATADIR%%/images/explosion.png
+%%DATADIR%%/images/fire.png
+%%DATADIR%%/images/flame.png
+%%DATADIR%%/images/flamerammo.png
+%%DATADIR%%/images/gate.png
+%%DATADIR%%/images/grenade.png
+%%DATADIR%%/images/grenadeammo.png
+%%DATADIR%%/images/gunner.png
+%%DATADIR%%/images/gunner_dying.png
+%%DATADIR%%/images/healthempty.png
+%%DATADIR%%/images/healthfull.png
+%%DATADIR%%/images/healthkit.png
+%%DATADIR%%/images/heart.png
+%%DATADIR%%/images/hunter.png
+%%DATADIR%%/images/hunter_dying.png
+%%DATADIR%%/images/key.png
+%%DATADIR%%/images/laserammo.png
+%%DATADIR%%/images/penelope.png
+%%DATADIR%%/images/player.png
+%%DATADIR%%/images/player_death.png
+%%DATADIR%%/images/robot.png
+%%DATADIR%%/images/robot_dying.png
+%%DATADIR%%/images/rocket.png
+%%DATADIR%%/images/rocketammo.png
+%%DATADIR%%/images/shooter.png
+%%DATADIR%%/images/shooter_dying.png
+%%DATADIR%%/images/smoke.png
+%%DATADIR%%/images/spawngate.png
+%%DATADIR%%/images/spider.png
+%%DATADIR%%/images/spider_dying.png
+%%DATADIR%%/images/title.png
+%%DATADIR%%/images/weapons.png
+%%DATADIR%%/images/weaponsel.png
+%%DATADIR%%/images/younffp_.ttf
+%%DATADIR%%/levels/1.lvl
+%%DATADIR%%/levels/10.lvl
+%%DATADIR%%/levels/2.lvl
+%%DATADIR%%/levels/3.lvl
+%%DATADIR%%/levels/4.lvl
+%%DATADIR%%/levels/5.lvl
+%%DATADIR%%/levels/6.lvl
+%%DATADIR%%/levels/7.lvl
+%%DATADIR%%/levels/8.lvl
+%%DATADIR%%/levels/9.lvl
+%%DATADIR%%/levels/template.lvl
+%%DATADIR%%/sound/bombblast.wav
+%%DATADIR%%/sound/explosion.wav
+%%DATADIR%%/sound/fealingnull.xm
+%%DATADIR%%/sound/flame.wav
+%%DATADIR%%/sound/gatedown.wav
+%%DATADIR%%/sound/gateup.wav
+%%DATADIR%%/sound/gchuck.wav
+%%DATADIR%%/sound/hunterdeath.wav
+%%DATADIR%%/sound/laser.wav
+%%DATADIR%%/sound/levelintro.wav
+%%DATADIR%%/sound/mg.wav
+%%DATADIR%%/sound/pain1.wav
+%%DATADIR%%/sound/pain2.wav
+%%DATADIR%%/sound/pain3.wav
+%%DATADIR%%/sound/pickup.wav
+%%DATADIR%%/sound/pickuphealth.wav
+%%DATADIR%%/sound/playerdeath.wav
+%%DATADIR%%/sound/rocket.wav
+%%DATADIR%%/sound/schizo.xm
+%%DATADIR%%/sound/shotgun.wav
+%%DATADIR%%/sound/spawngate.wav
+%%DATADIR%%/sound/weaponswitch.wav
+%%DATADIR%%/twitch.py
+%%DATADIR%%/twitch.pyc
+%%DATADIR%%/twitch.pyo
+@dirrm %%DATADIR%%/sound
+@dirrm %%DATADIR%%/levels
+@dirrm %%DATADIR%%/images
+@dirrm %%DATADIR%%