aboutsummaryrefslogtreecommitdiffstats
path: root/games/mopesnake
diff options
context:
space:
mode:
authorRusmir Dusko <nemysis@FreeBSD.org>2013-12-10 14:33:45 +0800
committerRusmir Dusko <nemysis@FreeBSD.org>2013-12-10 14:33:45 +0800
commitd4eede78a130e80193e34f789d8922317bbb9253 (patch)
treee1eb5dc6a42b7fc2d13d4b79bc533e4467471356 /games/mopesnake
parent767e421d1a0684154b8a6f11ade6dea95f2fa557 (diff)
downloadfreebsd-ports-gnome-d4eede78a130e80193e34f789d8922317bbb9253.tar.gz
freebsd-ports-gnome-d4eede78a130e80193e34f789d8922317bbb9253.tar.zst
freebsd-ports-gnome-d4eede78a130e80193e34f789d8922317bbb9253.zip
- Change master sites, icon(s)
- Change maintainer email to @FreeBSD.org - Add DOCS Option - Change desktop entry - Support STAGEDIR - Remove NO_BUILD=yes, change pkg-plist - Change files/mopesnake.in - Change pkg-message Approved by: pawel / wg (mentors, implicit)
Diffstat (limited to 'games/mopesnake')
-rw-r--r--games/mopesnake/Makefile56
-rw-r--r--games/mopesnake/distinfo2
-rw-r--r--games/mopesnake/files/mopesnake.in2
-rw-r--r--games/mopesnake/pkg-descr4
-rw-r--r--games/mopesnake/pkg-plist6
5 files changed, 46 insertions, 24 deletions
diff --git a/games/mopesnake/Makefile b/games/mopesnake/Makefile
index 6f6170517ce8..18d72f35ef94 100644
--- a/games/mopesnake/Makefile
+++ b/games/mopesnake/Makefile
@@ -5,47 +5,61 @@ PORTNAME= mopesnake
PORTVERSION= 0.5
PORTREVISION= 3
CATEGORIES= games python
-MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}
-DISTNAME= ${PORTNAME}-pc-${DISTVERSION}
+MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION} \
+ SF/nemysisfreebsdp/games/:icons
+DISTFILES= ${PORTNAME}-pc-${DISTVERSION}${EXTRACT_SUFX} \
+ ${PORTNAME}.png:icons
+EXTRACT_ONLY= ${PORTNAME}-pc-${DISTVERSION}${EXTRACT_SUFX}
-MAINTAINER= nemysis@gmx.ch
+MAINTAINER= nemysis@FreeBSD.org
COMMENT= Classic snake game in which you attempt to eat all the pain
LICENSE= GPLv2
RUN_DEPENDS= ${PYGAME}
+WRKSRC= ${WRKDIR}/${PORTNAME}-pc-${DISTVERSION}
+
USE_ZIP= yes
USE_PYTHON= yes
-NO_BUILD= yes
PORTDOCS= TODO.txt index.html
-SUB_FILES= ${PORTNAME}
+OPTIONS_DEFINE= DOCS
-DESKTOP_ENTRIES="Master Of Pain (Eating) - Snake" "${COMMENT}" \
- "${PREFIX}/share/pixmaps/${PORTNAME}" \
- "${PORTNAME}" "Game;ArcadeGame;" false
+SUB_FILES= ${PORTNAME}
-NO_STAGE= yes
-.include <bsd.port.options.mk>
+DESKTOP_ENTRIES="Master Of Pain (Eating) - Snake" "" "${PORTNAME}" \
+ "${PORTNAME}" "Game;ArcadeGame;" ""
post-patch:
@${REINPLACE_CMD} -e 's,/usr/bin/python,${PYTHON_CMD},' \
${WRKSRC}/*.py ${WRKSRC}/mopelib/*.py
@${FIND} ${WRKSRC} -name "*.bak" -delete
+do-build:
+ @${PYTHON_CMD} -m compileall ${WRKSRC}
+ @${PYTHON_CMD} -O -m compileall ${WRKSRC}
+
do-install:
- ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${PREFIX}/bin/
- ${MKDIR} ${DATADIR}
- ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.py ${DATADIR}
- @(cd ${WRKSRC} && ${COPYTREE_SHARE} "images mopelib music sounds" ${DATADIR})
- ${INSTALL_DATA} ${WRKSRC}/doc/screenshot1.png ${PREFIX}/share/pixmaps/${PORTNAME}.png
- ${INSTALL_DATA} ${WRKSRC}/version ${DATADIR}
-
-.if ${PORT_OPTIONS:MDOCS}
- ${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${DOCSDIR}
-.endif
+ @${REINPLACE_CMD} -e 's|%%PYTHON_CMD%%|${PYTHON_CMD}|' \
+ ${WRKDIR}/${PORTNAME}
+ ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
+
+.for d in *.py *.pyc *.pyo
+ @(cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${STAGEDIR}${DATADIR})
+.endfor
+
+.for d in images mopelib music sounds
+ @(cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${STAGEDIR}${DATADIR})
+.endfor
+
+ ${INSTALL_DATA} ${_DISTDIR}/${PORTNAME}.png \
+ ${STAGEDIR}${PREFIX}/share/pixmaps/
+
+ ${INSTALL_DATA} ${WRKSRC}/version ${STAGEDIR}${DATADIR}
+
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
diff --git a/games/mopesnake/distinfo b/games/mopesnake/distinfo
index 7c359af57792..bcf0a8ba692e 100644
--- a/games/mopesnake/distinfo
+++ b/games/mopesnake/distinfo
@@ -1,2 +1,4 @@
SHA256 (mopesnake-pc-0.5.zip) = 1bc270e7dc63ad40bb2280ac5d3dec8527b2d902b272f2b42bfd35d265d339d4
SIZE (mopesnake-pc-0.5.zip) = 1426226
+SHA256 (mopesnake.png) = f7d568382857a7e5a10ca01369d8f2c660f523d277239ba468be7fd81cceb028
+SIZE (mopesnake.png) = 1305
diff --git a/games/mopesnake/files/mopesnake.in b/games/mopesnake/files/mopesnake.in
index 6d6c286d773e..957bec7ca206 100644
--- a/games/mopesnake/files/mopesnake.in
+++ b/games/mopesnake/files/mopesnake.in
@@ -4,4 +4,4 @@
#
cd "%%DATADIR%%"
-exec /usr/bin/env python ./mopesnake.py "${@}"
+exec %%PYTHON_CMD%% ./mopesnake.py "${@}"
diff --git a/games/mopesnake/pkg-descr b/games/mopesnake/pkg-descr
index f532d6f289fd..3ee6c2f4acda 100644
--- a/games/mopesnake/pkg-descr
+++ b/games/mopesnake/pkg-descr
@@ -1,8 +1,8 @@
Master Of Pain (Eating) - Snake
Is a classic snake game in which you attempt to eat all the pain in the world,
-bravely accepting the inevitable consequences for your waistline. mop(e)snake
+bravely accepting the inevitable consequences for your waistline. mop(e)snake
features an innovative single-finger control method, as well as the normal
-four-directional control system familiar to fans of snake. The game doesn't
+four-directional control system familiar to fans of snake. The game doesn't
feature any of the extra features, bonuses, wrap-around levels and other
featuritis that ruins most versions of snake.
diff --git a/games/mopesnake/pkg-plist b/games/mopesnake/pkg-plist
index f989b8d8786a..cf283818f6e6 100644
--- a/games/mopesnake/pkg-plist
+++ b/games/mopesnake/pkg-plist
@@ -4,8 +4,14 @@ bin/mopesnake
%%DATADIR%%/images/title.png
%%DATADIR%%/images/tryad.png
%%DATADIR%%/mopelib/__init__.py
+%%DATADIR%%/mopelib/__init__.pyc
+%%DATADIR%%/mopelib/__init__.pyo
%%DATADIR%%/mopelib/mopelib.py
+%%DATADIR%%/mopelib/mopelib.pyc
+%%DATADIR%%/mopelib/mopelib.pyo
%%DATADIR%%/mopesnake.py
+%%DATADIR%%/mopesnake.pyc
+%%DATADIR%%/mopesnake.pyo
%%DATADIR%%/music/the_final_rewind_loop.ogg
%%DATADIR%%/sounds/aaa1.wav
%%DATADIR%%/sounds/aah2.wav