- Bump PORTREVISION for LICENSE adding and more

- Change master site
- Add license (GPLv2)
- Support STAGEDIR
- Simplify Option handling
- Add pkg-message, information about usage
- Unmute install executable and cfg
- Use INSTALL_DAT instead of CP
- Recreate patches with make makepatch
- Recreate pkg-plist with make makeplist and proper use permissions

PR:		189907
Submitted by:	maintainer, driedfruit <flambard@mangband.org>
Approved by:	maintainer
This commit is contained in:
Rusmir Dusko 2014-08-05 16:18:11 +00:00
parent 8af7c17858
commit ca6ac89934
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=364117
7 changed files with 87 additions and 68 deletions

View file

@ -3,12 +3,15 @@
PORTNAME= mangband PORTNAME= mangband
PORTVERSION= 1.1.2 PORTVERSION= 1.1.2
PORTREVISION= 1
CATEGORIES= games CATEGORIES= games
MASTER_SITES= http://www.mangband.org/ http://www.mangband.org/download/ MASTER_SITES= http://mangband.org/download/
MAINTAINER= flambard@mangband.org MAINTAINER= flambard@mangband.org
COMMENT= Free online multiplayer real-time roguelike game COMMENT= Free online multiplayer real-time roguelike game
LICENSE= GPLv2
ALL_TARGET= mangclient mangband ALL_TARGET= mangclient mangband
WRKSRC= ${WRKDIR}/${DISTNAME}/src WRKSRC= ${WRKDIR}/${DISTNAME}/src
GNU_CONFIGURE= yes GNU_CONFIGURE= yes
@ -19,54 +22,34 @@ MAKE_ARGS= "DATADIR=${DATADIR}"
OPTIONS_DEFINE= GCU X11 SDL OPTIONS_DEFINE= GCU X11 SDL
OPTIONS_DEFAULT= GCU X11 SDL OPTIONS_DEFAULT= GCU X11 SDL
GCU_DESC= Display module GCU GCU_DESC= Display module GCU (curses)
X11_DESC= Display module X11 X11_DESC= Display module X11
SDL_DESC= Display module SDL SDL_DESC= Display module SDL
NO_STAGE= yes GCU_CONFIGURE_WITH= gcu
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MGCU} X11_LIB_DEPENDS= libX11.so:${PORTSDIR}/x11/libX11
CONFIGURE_ARGS+= --with-gcu X11_CONFIGURE_WITH= x11
.else
CONFIGURE_ARGS+= --without-gcu
.endif
.if ${PORT_OPTIONS:MX11} SDL_LIB_DEPENDS= libX11.so:${PORTSDIR}/x11/libX11
LIB_DEPENDS+= libX11.so:${PORTSDIR}/x11/libX11 SDL_CONFIGURE_WITH= sdl
CONFIGURE_ARGS+= --with-x11
.else
CONFIGURE_ARGS+= --without-x11
.endif
.if ${PORT_OPTIONS:MSDL} PORTEXAMPLES= *
LIB_DEPENDS+= libSDL-1.2.so:${PORTSDIR}/devel/sdl12
CONFIGURE_ARGS+= --with-sdl SUB_FILES= pkg-message
.else
CONFIGURE_ARGS+= --without-sdl
.endif
do-install: do-install:
@${INSTALL_PROGRAM} -o root -g games -m 2550 \ ${INSTALL_PROGRAM} ${WRKSRC}/mangband ${STAGEDIR}${PREFIX}/bin/
${WRKSRC}/mangband ${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/mangclient ${STAGEDIR}${PREFIX}/bin/
@${INSTALL_PROGRAM} ${WRKSRC}/mangclient ${PREFIX}/bin ${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/mangband.cfg ${STAGEDIR}${PREFIX}/etc/mangband.cfg.sample
@${CP} ${WRKDIR}/${DISTNAME}/mangband.cfg ${PREFIX}/etc @echo "# FreeBSD Hacks" >> ${STAGEDIR}${PREFIX}/etc/mangband.cfg.sample
@echo "EDIT_DIR = \"${DATADIR}/edit\"" >> ${STAGEDIR}${PREFIX}/etc/mangband.cfg.sample
@echo "SAVE_DIR = \"${DATADIR}/save\"" >> ${STAGEDIR}${PREFIX}/etc/mangband.cfg.sample
@echo "DATA_DIR = \"${DATADIR}/data\"" >> ${STAGEDIR}${PREFIX}/etc/mangband.cfg.sample
@(cd ${WRKDIR}/${DISTNAME}/lib && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR})
@echo "# FreeBSD Hacks" >> ${PREFIX}/etc/mangband.cfg @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
@echo "EDIT_DIR = \"${DATADIR}/edit\"" >> ${PREFIX}/etc/mangband.cfg @echo "[MAngband]" >> ${STAGEDIR}${EXAMPLESDIR}/mangrc
@echo "SAVE_DIR = \"${DATADIR}/save\"" >> ${PREFIX}/etc/mangband.cfg @echo "LibDir ${DATADIR}/" >> ${STAGEDIR}${EXAMPLESDIR}/mangrc
@echo "DATA_DIR = \"${DATADIR}/data\"" >> ${PREFIX}/etc/mangband.cfg
@${MKDIR} ${EXAMPLESDIR}
@echo "[MAngband]" >> ${EXAMPLESDIR}/mangrc
@echo "LibDir ${DATADIR}" >> ${EXAMPLESDIR}/mangrc
@${MKDIR} ${DATADIR}
@cd ${WRKSRC}/../lib && ${PAX} -rw * ${DATADIR}
@${CHMOD} 750 ${DATADIR}/*
@${CHMOD} 755 ${DATADIR}/user
@${CHMOD} 755 ${DATADIR}/xtra
@${CHOWN} -R root:games ${DATADIR}/*
@${CHOWN} ${SHAREOWN}:${SHAREGRP} ${DATADIR}
.include <bsd.port.mk> .include <bsd.port.mk>

View file

@ -1,5 +1,5 @@
--- client/main-sdl.c.orig 2014-02-04 19:51:35.412181886 +0100 --- ./client/main-sdl.c.orig 2014-08-05 15:15:31.836673216 +0200
+++ client/main-sdl.c 2014-02-04 19:51:50.859119136 +0100 +++ ./client/main-sdl.c 2014-08-05 15:15:31.996665462 +0200
@@ -1031,7 +1031,7 @@ @@ -1031,7 +1031,7 @@
//if (td->cx != -1 && td->cy != -1) { //if (td->cx != -1 && td->cy != -1) {
// RedrawChar(td->cx, td->cy); // RedrawChar(td->cx, td->cy);

View file

@ -1,6 +1,6 @@
--- config.h.orig Sun Jan 7 07:21:32 2001 --- ./config.h.orig 2014-08-05 15:15:31.000000000 +0200
+++ config.h Fri Jan 12 00:04:41 2001 +++ ./config.h 2014-08-05 15:17:19.486687132 +0200
@@ -79,7 +79,7 @@ @@ -137,7 +137,7 @@
/* /*
* OPTION: Use the POSIX "termios" methods in "main-gcu.c" * OPTION: Use the POSIX "termios" methods in "main-gcu.c"
*/ */
@ -9,7 +9,7 @@
/* /*
* OPTION: Use the "termio" methods in "main-gcu.c" * OPTION: Use the "termio" methods in "main-gcu.c"
@@ -107,7 +107,7 @@ @@ -155,7 +155,7 @@
* OPTION: Use the "curs_set()" call in "main-gcu.c". * OPTION: Use the "curs_set()" call in "main-gcu.c".
* Hack -- This option will not work on most BSD machines * Hack -- This option will not work on most BSD machines
*/ */
@ -18,7 +18,7 @@
# define USE_CURS_SET # define USE_CURS_SET
#endif #endif
@@ -582,7 +582,7 @@ @@ -570,7 +570,7 @@
/* /*
* OPTION: Attempt to prevent all "cheating" * OPTION: Attempt to prevent all "cheating"
*/ */

View file

@ -1,6 +1,6 @@
--- server/netserver.c.orig 2001-01-02 04:02:10.000000000 +0000 --- ./server/netserver.c.orig 2014-08-05 15:15:31.916658572 +0200
+++ server/netserver.c 2007-11-01 04:27:06.000000000 +0000 +++ ./server/netserver.c 2014-08-05 15:15:32.006682679 +0200
@@ -98,7 +98,7 @@ @@ -97,7 +97,7 @@
(*drain_receive[256])(int ind); (*drain_receive[256])(int ind);
int login_in_progress; int login_in_progress;
static int num_logins, num_logouts; static int num_logins, num_logouts;

View file

@ -1,6 +1,6 @@
--- server/save.c.bak Sat May 9 21:38:56 1998 --- ./server/save.c.orig 2014-08-05 15:15:31.916658572 +0200
+++ server/save.c Wed Dec 30 13:33:13 1998 +++ ./server/save.c 2014-08-05 15:15:32.016684533 +0200
@@ -2305,7 +2305,7 @@ @@ -941,7 +941,7 @@
#ifdef VERIFY_SAVEFILE #ifdef VERIFY_SAVEFILE
/* Lock on savefile */ /* Lock on savefile */

View file

@ -0,0 +1,30 @@
==============================================================================
MAngband has been installed.
The following mangclient directories could be copied to a user-writable
location:
%%DATADIR%%/user
%%DATADIR%%/xtra
To provide a path for those directories ~/.mangrc should be used.
Please copy example mangrc to your home directory and adjust it
su user
cp %%EXAMPLESDIR%%/mangrc ~/.mangrc
You could manually change Permissions with:
/bin/chmod 644 ~/.mangrc
exit
To run mangband server as an unpriviliged user, such user must be added
to the games group. For example:
pw usermod <user> -G games
==============================================================================

View file

@ -1,7 +1,10 @@
bin/mangclient @group games
@mode 2550
bin/mangband bin/mangband
etc/mangband.cfg @mode
%%EXAMPLESDIR%%/mangrc @group
bin/mangclient
@sample %%ETCDIR%%mangband.cfg
%%DATADIR%%/data/scores.raw %%DATADIR%%/data/scores.raw
%%DATADIR%%/edit/artifact.txt %%DATADIR%%/edit/artifact.txt
%%DATADIR%%/edit/ego_item.txt %%DATADIR%%/edit/ego_item.txt
@ -33,6 +36,8 @@ etc/mangband.cfg
%%DATADIR%%/text/news.txt %%DATADIR%%/text/news.txt
%%DATADIR%%/text/option.txt %%DATADIR%%/text/option.txt
%%DATADIR%%/text/version.txt %%DATADIR%%/text/version.txt
@group games
@mode 0660
%%DATADIR%%/user/font-ami.prf %%DATADIR%%/user/font-ami.prf
%%DATADIR%%/user/font-ibm.prf %%DATADIR%%/user/font-ibm.prf
%%DATADIR%%/user/font-sdl.prf %%DATADIR%%/user/font-sdl.prf
@ -87,16 +92,17 @@ etc/mangband.cfg
%%DATADIR%%/xtra/font/nethack10x19-10.hex %%DATADIR%%/xtra/font/nethack10x19-10.hex
%%DATADIR%%/xtra/graf/16x16.bmp %%DATADIR%%/xtra/graf/16x16.bmp
%%DATADIR%%/xtra/graf/mask.bmp %%DATADIR%%/xtra/graf/mask.bmp
@dirrm %%DATADIR%%/xtra/graf @mode
@dirrm %%DATADIR%%/xtra/font @group
@dirrm %%DATADIR%%/xtra/Sound dirrm %%DATADIR%%/data
@dirrm %%DATADIR%%/xtra
@dirrm %%DATADIR%%/user
@dirrm %%DATADIR%%/text
@dirrm %%DATADIR%%/save
@dirrm %%DATADIR%%/help
@dirrm %%DATADIR%%/file
@dirrm %%DATADIR%%/edit @dirrm %%DATADIR%%/edit
@dirrm %%DATADIR%%/data @dirrm %%DATADIR%%/file
@dirrm %%DATADIR%%/help
@dirrm %%DATADIR%%/save
@dirrm %%DATADIR%%/text
@dirrm %%DATADIR%%/user
@dirrm %%DATADIR%%/xtra/Sound
@dirrm %%DATADIR%%/xtra/font
@dirrm %%DATADIR%%/xtra/graf
@dirrm %%DATADIR%%/xtra
@dirrm %%DATADIR%% @dirrm %%DATADIR%%
@dirrm %%EXAMPLESDIR%%