diff options
author | madpilot <madpilot@FreeBSD.org> | 2014-03-24 20:53:05 +0800 |
---|---|---|
committer | madpilot <madpilot@FreeBSD.org> | 2014-03-24 20:53:05 +0800 |
commit | 157e10be47aa51f2525ad16c9e827470b62f908c (patch) | |
tree | 2cabc05d14f78f02dec9b0b0ae872f70cdf59657 /games/sokoban | |
parent | a904a8cc3b8ea4fe870a4a718c0a126ff99ddff3 (diff) | |
download | freebsd-ports-gnome-157e10be47aa51f2525ad16c9e827470b62f908c.tar.gz freebsd-ports-gnome-157e10be47aa51f2525ad16c9e827470b62f908c.tar.zst freebsd-ports-gnome-157e10be47aa51f2525ad16c9e827470b62f908c.zip |
- Convert to staging
- Use DATADIR macro
- Undeprecate
- Assign maintainership to submitter
- General cleanup
PR: ports/187471
Submitted by: Nikolai Lifanov <lifanov@mail.lifanov.com>
Diffstat (limited to 'games/sokoban')
-rw-r--r-- | games/sokoban/Makefile | 22 | ||||
-rw-r--r-- | games/sokoban/files/patch-Makefile | 17 | ||||
-rw-r--r-- | games/sokoban/files/patch-aa | 25 | ||||
-rw-r--r-- | games/sokoban/files/patch-ab | 30 | ||||
-rw-r--r-- | games/sokoban/files/patch-ac | 19 | ||||
-rw-r--r-- | games/sokoban/files/patch-play.c | 11 | ||||
-rw-r--r-- | games/sokoban/files/patch-sokoban.h | 26 | ||||
-rw-r--r-- | games/sokoban/pkg-deinstall | 8 | ||||
-rw-r--r-- | games/sokoban/pkg-install | 9 | ||||
-rw-r--r-- | games/sokoban/pkg-plist | 115 |
10 files changed, 122 insertions, 160 deletions
diff --git a/games/sokoban/Makefile b/games/sokoban/Makefile index d8410759590a..a461c14a47dc 100644 --- a/games/sokoban/Makefile +++ b/games/sokoban/Makefile @@ -3,29 +3,21 @@ PORTNAME= sokoban PORTVERSION= 1.0 +PORTREVISION= 1 CATEGORIES= games MASTER_SITES= ${MASTER_SITE_SUNSITE} MASTER_SITE_SUBDIR= games/strategy -DISTFILES= ${PORTNAME}-src${EXTRACT_SUFX} +DISTNAME= ${PORTNAME}-src -MAINTAINER= ports@FreeBSD.org -COMMENT= Logical game: problems with packets in cave +MAINTAINER= lifanov@mail.lifanov.com +COMMENT= Logical game: problems with packets in cave -DEPRECATED= Unmaintained since 2000 -EXPIRATION_DATE= 2014-04-11 WRKSRC= ${WRKDIR}/sokoban ALL_TARGET= -NO_STAGE= yes do-install: - @ ${INSTALL_PROGRAM} ${WRKSRC}/sokoban ${PREFIX}/bin/sokoban - @ ${CHOWN} root:games ${PREFIX}/bin/sokoban - @ ${CHMOD} 2555 ${PREFIX}/bin/sokoban - @ ${MKDIR} ${PREFIX}/share/sokoban - @ ${CHOWN} root:games ${PREFIX}/share/sokoban - @ ${MKDIR} ${PREFIX}/share/sokoban/screens - @ ${CHOWN} root:games ${PREFIX}/share/sokoban/screens - @ ${INSTALL_DATA} ${WRKSRC}/screens/* ${PREFIX}/share/sokoban/screens - @ ${SH} pkg-install ${PKGNAME} POST-INSTALL + @${INSTALL_PROGRAM} ${WRKSRC}/sokoban ${STAGEDIR}${PREFIX}/bin/sokoban + @${MKDIR} ${STAGEDIR}${DATADIR}/screens + @${INSTALL_DATA} ${WRKSRC}/screens/* ${STAGEDIR}${DATADIR}/screens .include <bsd.port.mk> diff --git a/games/sokoban/files/patch-Makefile b/games/sokoban/files/patch-Makefile new file mode 100644 index 000000000000..b221e139a154 --- /dev/null +++ b/games/sokoban/files/patch-Makefile @@ -0,0 +1,17 @@ +--- ./Makefile.orig 1992-05-09 19:23:46.000000000 -0400 ++++ ./Makefile 2014-03-11 22:14:36.359748029 -0400 +@@ -1,8 +1,12 @@ +-CCOPT= -O3 ++CCOPT= ${CFLAGS} ++.ifdef PREFIX ++CCOPT+= -DPREFIX=\"${PREFIX}\" ++.endif ++ + OBJECTS= sok.o readscreen.o showscreen.o play.o save.o score.o + + sokoban: $(OBJECTS) +- cc $(CCOPT) -static -o sokoban $(OBJECTS) -lcurses -ltermcap ++ cc $(CCOPT) -o sokoban $(OBJECTS) -lcurses -ltermcap + sok.o: sok.c sokoban.h + cc $(CCOPT) -c sok.c + diff --git a/games/sokoban/files/patch-aa b/games/sokoban/files/patch-aa deleted file mode 100644 index a9aab881144e..000000000000 --- a/games/sokoban/files/patch-aa +++ /dev/null @@ -1,25 +0,0 @@ -*** Makefile Sat May 9 23:23:46 1992 ---- /home/andy/tmp/wrk/Makefile Wed Jul 2 06:04:37 1997 -*************** -*** 1,8 **** -! CCOPT= -O3 - OBJECTS= sok.o readscreen.o showscreen.o play.o save.o score.o - - sokoban: $(OBJECTS) -! cc $(CCOPT) -static -o sokoban $(OBJECTS) -lcurses -ltermcap - sok.o: sok.c sokoban.h - cc $(CCOPT) -c sok.c - ---- 1,12 ---- -! CCOPT= ${CFLAGS} -! .ifdef PREFIX -! CCOPT+= -DPREFIX=\"${PREFIX}\" -! .endif -! - OBJECTS= sok.o readscreen.o showscreen.o play.o save.o score.o - - sokoban: $(OBJECTS) -! cc $(CCOPT) -o sokoban $(OBJECTS) -lcurses -ltermcap - sok.o: sok.c sokoban.h - cc $(CCOPT) -c sok.c - diff --git a/games/sokoban/files/patch-ab b/games/sokoban/files/patch-ab deleted file mode 100644 index 95e56f7e3de5..000000000000 --- a/games/sokoban/files/patch-ab +++ /dev/null @@ -1,30 +0,0 @@ -*** sokoban.h Fri May 15 05:15:26 1992 ---- /home/andy/tmp/wrk/sokoban.h Tue Apr 29 19:02:00 1997 -*************** -*** 1,6 **** ---- 1,14 ---- - /*********************************************************************** - You may wish to alter the following directory paths - ***********************************************************************/ -+ -+ #ifdef PREFIX -+ #define SCREENPATH PREFIX "/share/sokoban/screens" -+ #define SAVEPATH PREFIX "/share/sokoban" -+ #define LOCKFILE "/tmp/sok.tmp" -+ #define SCOREFILE "/var/games/sokoban" -+ #else -+ - /**/ - /* SCREENPATH: the name of the directioy where the screen file are held */ - /**/ -*************** -*** 23,28 **** ---- 31,38 ---- - /* SCOREFILE: the full pathname of the score file */ - /**/ - #define SCOREFILE "/usr/games/sokob/highscore" -+ -+ #endif - - /**/ - /* MAXUSERNAME: defines the maximum length of a system's user name */ diff --git a/games/sokoban/files/patch-ac b/games/sokoban/files/patch-ac deleted file mode 100644 index 492b40f323ad..000000000000 --- a/games/sokoban/files/patch-ac +++ /dev/null @@ -1,19 +0,0 @@ -*** play.c Sat May 16 06:53:27 1992 ---- /home/andy/tmp/wrk/play.c Tue Apr 29 18:45:43 1997 -*************** -*** 37,43 **** - - short play() { - -! short c; - short ret; - short undolock = 1; /* locked for undo */ - ---- 37,43 ---- - - short play() { - -! char c; - short ret; - short undolock = 1; /* locked for undo */ - diff --git a/games/sokoban/files/patch-play.c b/games/sokoban/files/patch-play.c new file mode 100644 index 000000000000..eb658bd170ed --- /dev/null +++ b/games/sokoban/files/patch-play.c @@ -0,0 +1,11 @@ +--- ./play.c.orig 1992-05-16 02:53:27.000000000 -0400 ++++ ./play.c 2014-03-11 22:14:36.546748659 -0400 +@@ -37,7 +37,7 @@ + + short play() { + +- short c; ++ char c; + short ret; + short undolock = 1; /* locked for undo */ + diff --git a/games/sokoban/files/patch-sokoban.h b/games/sokoban/files/patch-sokoban.h new file mode 100644 index 000000000000..5c4651705d4c --- /dev/null +++ b/games/sokoban/files/patch-sokoban.h @@ -0,0 +1,26 @@ +--- ./sokoban.h.orig 1992-05-15 01:15:26.000000000 -0400 ++++ ./sokoban.h 2014-03-11 22:16:45.005739636 -0400 +@@ -1,6 +1,14 @@ + /*********************************************************************** + You may wish to alter the following directory paths + ***********************************************************************/ ++ ++#ifdef PREFIX ++#define SCREENPATH PREFIX "/share/sokoban/screens" ++#define SAVEPATH PREFIX "/share/sokoban" ++#define LOCKFILE "/tmp/sok.tmp" ++#define SCOREFILE "/var/games/sokoban" ++#else ++ + /**/ + /* SCREENPATH: the name of the directioy where the screen file are held */ + /**/ +@@ -24,6 +32,8 @@ + /**/ + #define SCOREFILE "/usr/games/sokob/highscore" + ++#endif ++ + /**/ + /* MAXUSERNAME: defines the maximum length of a system's user name */ + /**/ diff --git a/games/sokoban/pkg-deinstall b/games/sokoban/pkg-deinstall deleted file mode 100644 index 349ca9edabc2..000000000000 --- a/games/sokoban/pkg-deinstall +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -FILE="/var/games/sokoban" - -if [ "$2" = "POST-DEINSTALL" -a -f "$FILE" ]; then - echo "===> If you are completely uninstalling sokoban you may also want to remove the scores files: $FILE" -fi diff --git a/games/sokoban/pkg-install b/games/sokoban/pkg-install deleted file mode 100644 index 9bd7ee94714e..000000000000 --- a/games/sokoban/pkg-install +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -FILE="/var/games/sokoban" -[ "$2" != "POST-INSTALL" -o -f "$FILE" ] && exit 0 - -echo "===> Creating initial high score file $FILE" -dd if=/dev/zero of=$FILE bs=1 count=2 -chmod 664 $FILE -chown root:games $FILE diff --git a/games/sokoban/pkg-plist b/games/sokoban/pkg-plist index 6f2e91305c38..4eff945b4e69 100644 --- a/games/sokoban/pkg-plist +++ b/games/sokoban/pkg-plist @@ -1,55 +1,62 @@ +@group games +@mode 2555 bin/sokoban -share/sokoban/screens/sokoban.help -share/sokoban/screens/screen.1 -share/sokoban/screens/screen.2 -share/sokoban/screens/screen.3 -share/sokoban/screens/screen.4 -share/sokoban/screens/screen.5 -share/sokoban/screens/screen.6 -share/sokoban/screens/screen.7 -share/sokoban/screens/screen.8 -share/sokoban/screens/screen.9 -share/sokoban/screens/screen.10 -share/sokoban/screens/screen.11 -share/sokoban/screens/screen.12 -share/sokoban/screens/screen.13 -share/sokoban/screens/screen.14 -share/sokoban/screens/screen.15 -share/sokoban/screens/screen.16 -share/sokoban/screens/screen.17 -share/sokoban/screens/screen.18 -share/sokoban/screens/screen.19 -share/sokoban/screens/screen.20 -share/sokoban/screens/screen.21 -share/sokoban/screens/screen.22 -share/sokoban/screens/screen.23 -share/sokoban/screens/screen.24 -share/sokoban/screens/screen.25 -share/sokoban/screens/screen.26 -share/sokoban/screens/screen.27 -share/sokoban/screens/screen.28 -share/sokoban/screens/screen.29 -share/sokoban/screens/screen.30 -share/sokoban/screens/screen.31 -share/sokoban/screens/screen.32 -share/sokoban/screens/screen.33 -share/sokoban/screens/screen.34 -share/sokoban/screens/screen.35 -share/sokoban/screens/screen.36 -share/sokoban/screens/screen.37 -share/sokoban/screens/screen.38 -share/sokoban/screens/screen.39 -share/sokoban/screens/screen.40 -share/sokoban/screens/screen.41 -share/sokoban/screens/screen.42 -share/sokoban/screens/screen.43 -share/sokoban/screens/screen.44 -share/sokoban/screens/screen.45 -share/sokoban/screens/screen.46 -share/sokoban/screens/screen.47 -share/sokoban/screens/screen.48 -share/sokoban/screens/screen.49 -share/sokoban/screens/screen.50 -@dirrm share/sokoban/screens -@dirrm share/sokoban -@unexec if [ `stat -f %z /var/games/sokoban 2>/dev/null` = "2" ]; then rm -f /var/games/sokoban; fi +@group +@mode +@exec truncate -s 512B /var/games/sokoban +@exec chgrp games /var/games/sokoban +@exec chmod 0664 /var/games/sokoban +%%DATADIR%%/screens/sokoban.help +%%DATADIR%%/screens/screen.1 +%%DATADIR%%/screens/screen.2 +%%DATADIR%%/screens/screen.3 +%%DATADIR%%/screens/screen.4 +%%DATADIR%%/screens/screen.5 +%%DATADIR%%/screens/screen.6 +%%DATADIR%%/screens/screen.7 +%%DATADIR%%/screens/screen.8 +%%DATADIR%%/screens/screen.9 +%%DATADIR%%/screens/screen.10 +%%DATADIR%%/screens/screen.11 +%%DATADIR%%/screens/screen.12 +%%DATADIR%%/screens/screen.13 +%%DATADIR%%/screens/screen.14 +%%DATADIR%%/screens/screen.15 +%%DATADIR%%/screens/screen.16 +%%DATADIR%%/screens/screen.17 +%%DATADIR%%/screens/screen.18 +%%DATADIR%%/screens/screen.19 +%%DATADIR%%/screens/screen.20 +%%DATADIR%%/screens/screen.21 +%%DATADIR%%/screens/screen.22 +%%DATADIR%%/screens/screen.23 +%%DATADIR%%/screens/screen.24 +%%DATADIR%%/screens/screen.25 +%%DATADIR%%/screens/screen.26 +%%DATADIR%%/screens/screen.27 +%%DATADIR%%/screens/screen.28 +%%DATADIR%%/screens/screen.29 +%%DATADIR%%/screens/screen.30 +%%DATADIR%%/screens/screen.31 +%%DATADIR%%/screens/screen.32 +%%DATADIR%%/screens/screen.33 +%%DATADIR%%/screens/screen.34 +%%DATADIR%%/screens/screen.35 +%%DATADIR%%/screens/screen.36 +%%DATADIR%%/screens/screen.37 +%%DATADIR%%/screens/screen.38 +%%DATADIR%%/screens/screen.39 +%%DATADIR%%/screens/screen.40 +%%DATADIR%%/screens/screen.41 +%%DATADIR%%/screens/screen.42 +%%DATADIR%%/screens/screen.43 +%%DATADIR%%/screens/screen.44 +%%DATADIR%%/screens/screen.45 +%%DATADIR%%/screens/screen.46 +%%DATADIR%%/screens/screen.47 +%%DATADIR%%/screens/screen.48 +%%DATADIR%%/screens/screen.49 +%%DATADIR%%/screens/screen.50 +@dirrm %%DATADIR%%/screens +@dirrm %%DATADIR%% +@unexec rm -f /var/games/sokoban |