aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjylefort <jylefort@FreeBSD.org>2005-04-29 01:44:52 +0800
committerjylefort <jylefort@FreeBSD.org>2005-04-29 01:44:52 +0800
commit618e5629f267033ec2445df8f0e5ae64d0fc29b8 (patch)
treed92ba60e5ed419523f3da3346d9488556c7c1f65
parent877a87e64e968e7f388babcef445c16c206f3cb5 (diff)
downloadfreebsd-ports-gnome-618e5629f267033ec2445df8f0e5ae64d0fc29b8.tar.gz
freebsd-ports-gnome-618e5629f267033ec2445df8f0e5ae64d0fc29b8.tar.zst
freebsd-ports-gnome-618e5629f267033ec2445df8f0e5ae64d0fc29b8.zip
- Update to 0.4.4
- Pass maintainership to submitter - Preserve scores across updates PR: ports/80428 Submitted by: Emanuel Haupt <ehaupt@critical.ch> Approved by: old maintainer, new maintainer
-rw-r--r--games/typespeed/Makefile13
-rw-r--r--games/typespeed/distinfo4
-rw-r--r--games/typespeed/files/patch-Makefile70
-rw-r--r--games/typespeed/files/patch-aa51
-rw-r--r--games/typespeed/files/patch-ba11
-rw-r--r--games/typespeed/pkg-deinstall8
-rw-r--r--games/typespeed/pkg-descr12
-rw-r--r--games/typespeed/pkg-install11
-rw-r--r--games/typespeed/pkg-plist14
9 files changed, 117 insertions, 77 deletions
diff --git a/games/typespeed/Makefile b/games/typespeed/Makefile
index 77d3af8f3e95..08d5c2caead1 100644
--- a/games/typespeed/Makefile
+++ b/games/typespeed/Makefile
@@ -6,12 +6,12 @@
#
PORTNAME= typespeed
-PORTVERSION= 0.4.1
+PORTVERSION= 0.4.4
CATEGORIES= games
-MASTER_SITES= http://www.sicom.fi/~bestis/
+MASTER_SITES= http://ls.purkki.org/typespeed/
DISTNAME= typespeed-${PORTVERSION}
-MAINTAINER= refugee@vt.edu
+MAINTAINER= ehaupt@critical.ch
COMMENT= Test your typing speed, and get your fingers\' CPS
MAN1= typespeed.1
@@ -19,10 +19,13 @@ MAN1= typespeed.1
USE_REINPLACE= yes
USE_GETOPT_LONG= yes
-MAKE_ENV= LFLAGS="${LDFLAGS}"
+MAKE_ENV= CPPFLAGS="${CPPFLAGS}" LFLAGS="${LDFLAGS}"
post-patch:
- ${REINPLACE_CMD} -e 's#_PREFIX_HERE#${PREFIX}#g' \
+ @${REINPLACE_CMD} -e 's|\(/etc\)|${PREFIX}\1|' \
${WRKSRC}/typespeed.h
+post-install:
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+
.include <bsd.port.mk>
diff --git a/games/typespeed/distinfo b/games/typespeed/distinfo
index 81bc19a5fc35..362832341b16 100644
--- a/games/typespeed/distinfo
+++ b/games/typespeed/distinfo
@@ -1,2 +1,2 @@
-MD5 (typespeed-0.4.1.tar.gz) = 0af9809cd20bd9010732ced930090f32
-SIZE (typespeed-0.4.1.tar.gz) = 35492
+MD5 (typespeed-0.4.4.tar.gz) = 97ca3e3d0323c41ecc4f453f557287ea
+SIZE (typespeed-0.4.4.tar.gz) = 38526
diff --git a/games/typespeed/files/patch-Makefile b/games/typespeed/files/patch-Makefile
new file mode 100644
index 000000000000..6c3e38d17e6b
--- /dev/null
+++ b/games/typespeed/files/patch-Makefile
@@ -0,0 +1,70 @@
+--- Makefile.orig Thu Aug 22 19:42:50 2002
++++ Makefile Thu Apr 28 19:36:50 2005
+@@ -2,20 +2,19 @@
+ # typespeed makefile
+ #
+
+-CC = gcc
+-CFLAGS = -O -D_GNU_SOURCE -Wall
+-LFLAGS = -lncurses
++CFLAGS += -D_GNU_SOURCE -Wall $(CPPFLAGS)
++LFLAGS += -lncurses
+
+ PROG = typespeed
+ SRCS = file.c menu.c misc.c network.c
+ OBJS = file.o menu.o misc.o network.o
+
+ local_dir = $(HOME)
+-install_dir = "/usr/local/bin"
+-wordfiles = "/usr/local/lib"
+-man_dir = "/usr/local/man/man1/"
++install_dir = "$(PREFIX)/bin"
++wordfiles = "$(PREFIX)/lib"
++man_dir = "$(PREFIX)/man/man1/"
+
+-all: clean $(PROG)
++all: $(PROG)
+
+
+ clean:
+@@ -23,31 +22,21 @@
+
+
+ $(PROG): $(OBJS)
+-
+ $(CC) $(CFLAGS) $(OBJS) -o $(PROG) $(PROG).c $(LFLAGS)
+
+
+ install: typespeed
+-
+- @echo Installing. You need to be root, or have access to install dirs
+- @echo ..and we know that everyone can delete the highscores, but
+- @echo we did not want to put setuid or setgid to typespeed yet,
+- @echo because then we would have to make a user for those..
+- @echo If you like to do it in that way, do it yourself.
+- @echo
+- cp typespeed $(install_dir)
+- chmod 755 $(install_dir)/typespeed
++ $(BSD_INSTALL_PROGRAM) typespeed $(install_dir)
++ chgrp games $(install_dir)/typespeed
++ chmod g+s $(install_dir)/typespeed
+ if test ! -d $(wordfiles)/typespeed; then mkdir $(wordfiles)/typespeed; fi
+ ./typespeed --makescores
+- cp words.* $(wordfiles)/typespeed
+- cp high.* $(wordfiles)/typespeed
+- chmod 755 $(wordfiles)/typespeed
+- chmod 666 $(wordfiles)/typespeed/high.*
+- chmod 644 $(wordfiles)/typespeed/words.*
+- echo $(wordfiles)/typespeed/ > /etc/typespeedrc
+- cp typespeed.1 $(man_dir)
+- chmod 644 $(man_dir)/typespeed.1
+- @echo done...
++.for cat in dos dut eng fin portuguese prog spanish unix
++ $(BSD_INSTALL_DATA) words.$(cat) $(wordfiles)/typespeed
++ $(BSD_INSTALL_DATA) high.words.$(cat) $(wordfiles)/typespeed/high.words.$(cat).default
++.endfor
++ echo $(wordfiles)/typespeed/ > $(PREFIX)/etc/typespeedrc
++ $(BSD_INSTALL_MAN) typespeed.1 $(man_dir)
+
+ uninstall: distclean
+
diff --git a/games/typespeed/files/patch-aa b/games/typespeed/files/patch-aa
deleted file mode 100644
index 46b51964940b..000000000000
--- a/games/typespeed/files/patch-aa
+++ /dev/null
@@ -1,51 +0,0 @@
---- Makefile.orig Wed Nov 10 12:32:40 1999
-+++ Makefile Sat Oct 4 03:15:28 2003
-@@ -3,17 +3,17 @@
- #
-
- CC = gcc
--CFLAGS = -O -D_GNU_SOURCE -Wall
--LFLAGS = -lncurses
-+CFLAGS += -O -D_GNU_SOURCE -Wall -I${LOCALBASE}/include
-+LFLAGS += -lncurses
-
- PROG = typespeed
- SRCS = file.c menu.c misc.c network.c
- OBJS = file.o menu.o misc.o network.o
-
- local_dir = $(HOME)
--install_dir = "/usr/local/bin"
--wordfiles = "/usr/local/lib"
--man_dir = "/usr/local/man/man1/"
-+install_dir = ${PREFIX}/bin
-+wordfiles = ${PREFIX}/lib
-+man_dir = ${PREFIX}/man/man1/
-
- all: clean $(PROG)
-
-@@ -23,12 +23,10 @@
-
-
- $(PROG): $(OBJS)
--
- $(CC) $(CFLAGS) $(OBJS) -o $(PROG) $(PROG).c $(LFLAGS)
-
-
- install: typespeed
--
- @echo Installing. You need to be root, or have access to install dirs
- @echo ..and we know that everyone can delete the highscores, but
- @echo we did not want to put setuid or setgid to typespeed yet,
-@@ -40,11 +38,9 @@
- if test ! -d $(wordfiles)/typespeed; then mkdir $(wordfiles)/typespeed; fi
- ./typespeed --makescores
- cp words.* $(wordfiles)/typespeed
-- cp high.* $(wordfiles)/typespeed
- chmod 755 $(wordfiles)/typespeed
-- chmod 666 $(wordfiles)/typespeed/high.*
- chmod 644 $(wordfiles)/typespeed/words.*
-- echo $(wordfiles)/typespeed/ > /etc/typespeedrc
-+ echo $(wordfiles)/typespeed/ > ${PREFIX}/etc/typespeedrc
- cp typespeed.1 $(man_dir)
- chmod 644 $(man_dir)/typespeed.1
- @echo done...
diff --git a/games/typespeed/files/patch-ba b/games/typespeed/files/patch-ba
deleted file mode 100644
index ce89611e89d3..000000000000
--- a/games/typespeed/files/patch-ba
+++ /dev/null
@@ -1,11 +0,0 @@
---- typespeed.h.orig Fri Sep 5 23:30:12 2003
-+++ typespeed.h Fri Sep 5 23:39:42 2003
-@@ -24,7 +24,7 @@
-
- #define TVERSION "v0.4.1"
-
--#define CONFIGFILE "/etc/typespeedrc"
-+#define CONFIGFILE "_PREFIX_HERE/etc/typespeedrc"
- #define LOCALCONF ".typespeedrc"
-
- #define WORD_MAX 10000
diff --git a/games/typespeed/pkg-deinstall b/games/typespeed/pkg-deinstall
new file mode 100644
index 000000000000..2df053a74dc0
--- /dev/null
+++ b/games/typespeed/pkg-deinstall
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+[ "$2" != "DEINSTALL" ] && exit 0
+
+for cat in dos dut eng fin portuguese prog spanish unix; do
+ file="$PKG_PREFIX/lib/typespeed/high.words.$cat"
+ cmp -s "$file" "$file.default" && rm -f "$file"
+done
diff --git a/games/typespeed/pkg-descr b/games/typespeed/pkg-descr
index 52a9eb1749a0..f4d061275f0b 100644
--- a/games/typespeed/pkg-descr
+++ b/games/typespeed/pkg-descr
@@ -1,11 +1,11 @@
- Typespeed gives your fingers' cps (total and correct), typoratio and some
- points to compare with your friends.
+Typespeed gives your fingers' cps (total and correct), typoratio and some
+points to compare with your friends.
- Typespeed's idea is ripped from ztspeed (a dos game made by Zorlim). Idea
- of the game should be clear to anyone, just type and type it fast, or be a
- lewser.
+Typespeed's idea is ripped from ztspeed (a dos game made by Zorlim). Idea
+of the game should be clear to anyone, just type and type it fast, or be a
+lewser.
-WWW: http://www.sicom.fi/~bestis/typespeed.html
+WWW: http://ls.purkki.org/typespeed/
- Suleiman Souhlal
refugee@vt.edu
diff --git a/games/typespeed/pkg-install b/games/typespeed/pkg-install
new file mode 100644
index 000000000000..c68c7dc51a65
--- /dev/null
+++ b/games/typespeed/pkg-install
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+[ "$2" != "POST-INSTALL" ] && exit 0
+
+# Score files should normally go in /var/games/typespeed, but it would
+# require a lot of modifications to the ugly typespeed source code.
+
+for cat in dos dut eng fin portuguese prog spanish unix; do
+ file="$PKG_PREFIX/lib/typespeed/high.words.$cat"
+ [ -f "$file" ] || install -o root -g games -m 464 "$file.default" "$file"
+done
diff --git a/games/typespeed/pkg-plist b/games/typespeed/pkg-plist
index fa0241b37d40..8ca1337a7468 100644
--- a/games/typespeed/pkg-plist
+++ b/games/typespeed/pkg-plist
@@ -1,9 +1,19 @@
-etc/typespeedrc
bin/typespeed
+etc/typespeedrc
+lib/typespeed/high.words.dos.default
+lib/typespeed/high.words.dut.default
+lib/typespeed/high.words.eng.default
+lib/typespeed/high.words.fin.default
+lib/typespeed/high.words.portuguese.default
+lib/typespeed/high.words.prog.default
+lib/typespeed/high.words.spanish.default
+lib/typespeed/high.words.unix.default
lib/typespeed/words.dos
+lib/typespeed/words.dut
lib/typespeed/words.eng
lib/typespeed/words.fin
lib/typespeed/words.portuguese
lib/typespeed/words.prog
+lib/typespeed/words.spanish
lib/typespeed/words.unix
-@dirrm lib/typespeed
+@unexec rmdir %D/lib/typespeed 2>/dev/null || true