diff options
Diffstat (limited to 'games')
-rw-r--r-- | games/typespeed/Makefile | 54 | ||||
-rw-r--r-- | games/typespeed/files/pkg-deinstall.in | 14 | ||||
-rw-r--r-- | games/typespeed/files/pkg-install.in | 23 | ||||
-rw-r--r-- | games/typespeed/pkg-plist | 21 |
4 files changed, 25 insertions, 87 deletions
diff --git a/games/typespeed/Makefile b/games/typespeed/Makefile index bf74028e1dba..dede0b42d6c1 100644 --- a/games/typespeed/Makefile +++ b/games/typespeed/Makefile @@ -3,62 +3,42 @@ PORTNAME= typespeed PORTVERSION= 0.6.5 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= games MASTER_SITES= SF MAINTAINER= ports@FreeBSD.org COMMENT= Test your typing speed and get your fingers' CPS -OPTIONS_DEFINE= NLS -OPTIONS_SUB= yes +LICENSE= GPLv2 # or later +LICENSE_FILE= ${WRKSRC}/COPYING USES= ncurses GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-highscoredir="${SCOREDIR}" -CFLAGS+= -I${LOCALBASE}/include -DWITH_HIGHSCOREDIR=\"${SCOREDIR}\" \ - -DHIGHDIR=\"${SCOREDIR}\" -DHIGHSCOREDIR=\"${SCOREDIR}\" +SCOREDIR= /var/games/typespeed +SCOREFILE= typespeed.score -SUB_FILES= pkg-install pkg-deinstall -SUB_LIST= SCOREDIR="${SCOREDIR}" SCOREFILE="${SCOREFILE}" +OPTIONS_DEFINE= NLS DOCS +OPTIONS_SUB= yes NLS_USES= gettext NLS_CONFIGURE_ENABLE= nls -SCOREPREFIX?= /var/games -SCOREDIR= ${SCOREPREFIX}/typespeed -SCOREFILE= typespeed.score - -.include <bsd.port.options.mk> - post-patch: - @${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \ - 's|^\(CC =\).*|\1 @CC@|' + @${FIND} ${WRKSRC} -name "Makefile.in" -exec \ + ${REINPLACE_CMD} -e 's|^\(CC =\).*|\1 @CC@|; \ + /chmod/ d; /chgrp/ d' {} \; @${REINPLACE_CMD} -e \ 's|\(/etc\)|${PREFIX}\1|' ${WRKSRC}/src/pathnames.h -do-install: - (cd ${WRKSRC}/src && ${INSTALL_PROGRAM} ${PORTNAME} \ - ${STAGEDIR}${PREFIX}/bin) - (cd ${WRKSRC}/src && ${INSTALL_PROGRAM} convert \ - ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-hs-conv) - (cd ${WRKSRC}/man && ${INSTALL_MAN} ${PORTNAME}.6 \ - ${STAGEDIR}${MAN6PREFIX}/man/man6) - (cd ${WRKSRC}/etc && ${INSTALL_DATA} typespeedrc \ - ${STAGEDIR}${PREFIX}/etc/typespeedrc.dist) - @${MKDIR} ${STAGEDIR}${DATADIR} - (cd ${WRKSRC}/src && ${INSTALL_DATA} ${SCOREFILE} \ - ${STAGEDIR}${DATADIR}/${SCOREFILE}.default) - @${MKDIR} ${STAGEDIR}${DATADIR}/words - (cd ${WRKSRC}/words && ${INSTALL_DATA} words.* \ - ${STAGEDIR}${DATADIR}/words) -.if ${PORT_OPTIONS:MNLS} -.for i in de_DE fr_FR it - @${MKDIR} ${STAGEDIR}${PREFIX}/share/locale/${i}/LC_MESSAGES - (cd ${WRKSRC}/po && ${INSTALL_DATA} ${i}.gmo \ - ${STAGEDIR}${PREFIX}/share/locale/${i}/LC_MESSAGES/typespeed.mo) -.endfor -.endif +post-install: + ${INSTALL_PROGRAM} ${WRKSRC}/src/convert \ + ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-hs-conv + ${MV} ${STAGEDIR}${PREFIX}/etc/typespeedrc \ + ${STAGEDIR}${PREFIX}/etc/typespeedrc.sample + ${MV} ${STAGEDIR}${SCOREDIR}/${SCOREFILE} \ + ${STAGEDIR}${SCOREDIR}/${SCOREFILE}.sample .include <bsd.port.mk> diff --git a/games/typespeed/files/pkg-deinstall.in b/games/typespeed/files/pkg-deinstall.in deleted file mode 100644 index 003858bfc436..000000000000 --- a/games/typespeed/files/pkg-deinstall.in +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ - -SCOREDIR="%%SCOREDIR%%" -SCOREFILE="%%SCOREFILE%%" - -[ "$2" != "DEINSTALL" ] && exit 0 - -file="${SCOREDIR}/${SCOREFILE}" -cmp -s "$file" "$file.default" && rm -f "$file" -rm -f "$file.default" - -rmdir "$SCOREDIR" > /dev/null 2>&1 || true diff --git a/games/typespeed/files/pkg-install.in b/games/typespeed/files/pkg-install.in deleted file mode 100644 index e0364850b7f1..000000000000 --- a/games/typespeed/files/pkg-install.in +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ - -SCOREDIR="%%SCOREDIR%%" -SCOREFILE="%%SCOREFILE%%" - -[ "$2" != "POST-INSTALL" ] && exit 0 - -if [ ! -d "${SCOREDIR}" ]; then - mkdir -p ${SCOREDIR} - chown root:games ${SCOREDIR} -fi - -install -o root -g games -m 0464 ${PKG_PREFIX}/share/typespeed/${SCOREFILE}.default ${SCOREDIR}/${SCOREFILE}.default - -file="${SCOREDIR}/${SCOREFILE}" -if [ -f "$file" ]; then - cmp -s "$file" "$file.default" && install -o root -g games -m 464 "$file.default" "$file" -else - install -o root -g games -m 464 "$file.default" "$file" -fi -true diff --git a/games/typespeed/pkg-plist b/games/typespeed/pkg-plist index 9c002ef665bd..d4a9a42130dd 100644 --- a/games/typespeed/pkg-plist +++ b/games/typespeed/pkg-plist @@ -1,17 +1,14 @@ -@group games -@mode 2555 -bin/typespeed -@mode -@group +@(,games,2555) bin/typespeed bin/typespeed-hs-conv -@unexec if cmp -s %D/etc/typespeedrc %D/etc/typespeedrc.dist; then rm -f %D/etc/typespeedrc; fi -etc/typespeedrc.dist -@exec [ -f %B/typespeedrc ] || cp %B/%f %B/typespeedrc +@sample etc/typespeedrc.sample man/man6/typespeed.6.gz +%%PORTDOCS%%%%DOCSDIR%%/README %%NLS%%share/locale/de_DE/LC_MESSAGES/typespeed.mo %%NLS%%share/locale/fr_FR/LC_MESSAGES/typespeed.mo %%NLS%%share/locale/it/LC_MESSAGES/typespeed.mo -%%DATADIR%%/typespeed.score.default +%%DATADIR%%/rules/rule.classic +%%DATADIR%%/rules/rule.training +%%DATADIR%%/rules/template %%DATADIR%%/words/words.csharp %%DATADIR%%/words/words.csharp_with_operators %%DATADIR%%/words/words.dos @@ -26,7 +23,5 @@ man/man6/typespeed.6.gz %%DATADIR%%/words/words.prog %%DATADIR%%/words/words.tha %%DATADIR%%/words/words.unix -@dirrm %%DATADIR%%/words -@dirrm %%DATADIR%% -%%NLS%%@dirrmtry share/locale/de_DE/LC_MESSAGES -%%NLS%%@dirrmtry share/locale/de_DE +@sample(,games,664) /var/games/typespeed/typespeed.score.sample +@dir(,games,775) /var/games/typespeed |