diff options
author | marcus <marcus@FreeBSD.org> | 2004-10-11 02:40:00 +0000 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2004-10-11 02:40:00 +0000 |
commit | bffb3e33ede60fd61eb4c267394408d80c85fc15 (patch) | |
tree | 2b360ad1b5a6d7dc496390ba7a2b9be4d46f051d | |
parent | 53d52af6989ac08f0e50a309f529b9ae2ffd1614 (diff) | |
download | FreeBSD-ports-bffb3e33ede60fd61eb4c267394408d80c85fc15.zip FreeBSD-ports-bffb3e33ede60fd61eb4c267394408d80c85fc15.tar.gz |
* Update to 4.2.18 to fix a build problem with bind9 in the base system [1]
* Add an rc.d script and run as a separate user
* Fix MASTERDIR and pkg-descr URL
PR: 72484
72469
Submitted by: Daniel J. O'Connor <darius@dons.net.au> (maintainer)
Reported by: pointyhat via kris [1]
Approved by: portmgr (implicit)
-rw-r--r-- | games/wolfpack/Makefile | 45 | ||||
-rw-r--r-- | games/wolfpack/distinfo | 4 | ||||
-rw-r--r-- | games/wolfpack/files/build.conf.tmpl | 4 | ||||
-rw-r--r-- | games/wolfpack/files/patch-Make.sysdefs | 11 | ||||
-rw-r--r-- | games/wolfpack/files/patch-Makefile | 31 | ||||
-rw-r--r-- | games/wolfpack/files/patch-ad | 56 | ||||
-rw-r--r-- | games/wolfpack/files/patch-ai | 10 | ||||
-rw-r--r-- | games/wolfpack/files/patch-aj | 248 | ||||
-rw-r--r-- | games/wolfpack/files/patch-src::doconfig::Makefile (renamed from games/wolfpack/files/patch-ah) | 0 | ||||
-rw-r--r-- | games/wolfpack/files/patch-src::doconfig::doconfig.c | 61 | ||||
-rw-r--r-- | games/wolfpack/files/patch-src::server::main.c | 127 | ||||
-rw-r--r-- | games/wolfpack/files/wolfpack.sh | 25 | ||||
-rw-r--r-- | games/wolfpack/pkg-descr | 2 | ||||
-rw-r--r-- | games/wolfpack/pkg-install | 72 | ||||
-rw-r--r-- | games/wolfpack/pkg-message | 2 | ||||
-rw-r--r-- | games/wolfpack/pkg-plist | 19 | ||||
-rw-r--r-- | games/wolfpack/scripts/configure | 15 |
17 files changed, 374 insertions, 358 deletions
diff --git a/games/wolfpack/Makefile b/games/wolfpack/Makefile index 97921ca..70d532d 100644 --- a/games/wolfpack/Makefile +++ b/games/wolfpack/Makefile @@ -6,11 +6,11 @@ # PORTNAME= wolfpack -PORTVERSION= 4.2.12 +PORTVERSION= 4.2.18 CATEGORIES= games -MASTER_SITES= http://www.empire.cx/Downloads/server/ \ - http://www.empire.cx/Downloads/server/oldversions/ -DISTNAME= empire${PORTVERSION} +MASTER_SITES= http://www.wolfpackempire.com/Downloads/server/ \ + http://www.wolfpackempire.com/Downloads/server/oldversions/ +DISTNAME= empire-${PORTVERSION} MAINTAINER= darius@dons.net.au COMMENT= Long term multiplayer strategy game @@ -18,39 +18,52 @@ COMMENT= Long term multiplayer strategy game .if !defined(BATCH) IS_INTERACTIVE= yes # configure script asks questions .endif -WRKSRC= ${WRKDIR}/emp4 ALL_TARGET= freebsd -MAN1= fairland.1 files.1 land.1 ore.1 pconfig.1 perfect.1 +USE_RC_SUBR= yes + +MAN1= fairland.1 files.1 pconfig.1 MAN6= emp_client.6 emp_server.6 MAKE_ARGS= PREFIX=${PREFIX} .include <bsd.port.pre.mk> +PKGDEINSTALL= ${PKGINSTALL} + .if ${ARCH} == "ia64" BROKEN= "Does not compile on ia64" .endif +RC_SCRIPTS_SUB= PREFIX=${PREFIX} \ + RC_SUBR=${RC_SUBR} + +pre-configure: + ${MKDIR} ${WRKSRC}/data + pre-install: ${MKDIR} ${PREFIX}/wolfpack ${MKDIR} ${PREFIX}/wolfpack/data + @ ${SETENV} PKG_PREFIX=${PREFIX} \ + ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL post-install: ${CHMOD} 750 ${PREFIX}/wolfpack/data - ${TAR} -C ${WRKDIR}/emp4 -cf - info.nr scripts doc | ${TAR} -C ${PREFIX}/wolfpack -xf - + ${TAR} -C ${WRKSRC} -cf - info.nr scripts doc | ${TAR} -C ${PREFIX}/wolfpack -xf - ${CHMOD} 755 ${PREFIX}/wolfpack/info.nr ${CHMOD} 644 ${PREFIX}/wolfpack/info.nr/* ${CHOWN} -R root:wheel ${PREFIX}/wolfpack - ${INSTALL_DATA} ${WRKDIR}/emp4/README ${PREFIX}/wolfpack - ${INSTALL_MAN} ${WRKDIR}/emp4/man/fairland.1 ${PREFIX}/man/man1/ - ${INSTALL_MAN} ${WRKDIR}/emp4/man/files.1 ${PREFIX}/man/man1/ - ${INSTALL_MAN} ${WRKDIR}/emp4/man/land.1 ${PREFIX}/man/man1/ - ${INSTALL_MAN} ${WRKDIR}/emp4/man/ore.1 ${PREFIX}/man/man1/ - ${INSTALL_MAN} ${WRKDIR}/emp4/man/pconfig.1 ${PREFIX}/man/man1/ - ${INSTALL_MAN} ${WRKDIR}/emp4/man/perfect.1 ${PREFIX}/man/man1/ - ${INSTALL_MAN} ${WRKDIR}/emp4/man/emp_client.6 ${PREFIX}/man/man6/ - ${INSTALL_MAN} ${WRKDIR}/emp4/man/emp_server.6 ${PREFIX}/man/man6/ + ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/wolfpack + ${INSTALL_MAN} ${WRKSRC}/man/fairland.1 ${PREFIX}/man/man1/ + ${INSTALL_MAN} ${WRKSRC}/man/files.1 ${PREFIX}/man/man1/ + ${INSTALL_MAN} ${WRKSRC}/man/pconfig.1 ${PREFIX}/man/man1/ + ${INSTALL_MAN} ${WRKSRC}/man/emp_client.6 ${PREFIX}/man/man6/ + ${INSTALL_MAN} ${WRKSRC}/man/emp_server.6 ${PREFIX}/man/man6/ @${CAT} ${FILESDIR}/post-install-info + @ ${SETENV} PKG_PREFIX=${PREFIX} \ + ${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL + @ ${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ + ${FILESDIR}/wolfpack.sh > ${WRKDIR}/wolfpack.sh + ${INSTALL_SCRIPT} ${WRKDIR}/wolfpack.sh ${PREFIX}/etc/rc.d/wolfpack.sh .include <bsd.port.post.mk> diff --git a/games/wolfpack/distinfo b/games/wolfpack/distinfo index d80f9b8..5ba1f07 100644 --- a/games/wolfpack/distinfo +++ b/games/wolfpack/distinfo @@ -1,2 +1,2 @@ -MD5 (empire4.2.12.tar.gz) = 75113b07a0639f5393cec06faebe2492 -SIZE (empire4.2.12.tar.gz) = 1353409 +MD5 (empire-4.2.18.tar.gz) = 4b7dc524b842cf39c657aeb0aa9a75a7 +SIZE (empire-4.2.18.tar.gz) = 1325824 diff --git a/games/wolfpack/files/build.conf.tmpl b/games/wolfpack/files/build.conf.tmpl index aac00fe..c526348 100644 --- a/games/wolfpack/files/build.conf.tmpl +++ b/games/wolfpack/files/build.conf.tmpl @@ -17,11 +17,11 @@ EMAIL = %%EMAIL%% # Please enter the host name you will be running on: # (For NT you can use "HOSTNAME = localhost" as this seems to be what it # resolves to if you use 127.0.0.1 below) -HOSTNAME = %%HOSTNAME%% +HOSTNAME = localhost # Please enter the ip address of the host you will be running on: # (For NT you can use "IPADDR = 127.0.0.1") -IPADDR = %%IPADDR%% +IPADDR = 127.0.0.1 # Please enter the port you will be running on: PORTNUM = 6665 diff --git a/games/wolfpack/files/patch-Make.sysdefs b/games/wolfpack/files/patch-Make.sysdefs new file mode 100644 index 0000000..d69f904 --- /dev/null +++ b/games/wolfpack/files/patch-Make.sysdefs @@ -0,0 +1,11 @@ +--- Make.sysdefs.orig Tue Sep 7 23:52:39 2004 ++++ Make.sysdefs Sun Oct 10 11:24:01 2004 +@@ -40,7 +40,7 @@ + OSXMASTER = GLOBALCFLAGS="$(OSXCFLAGS)" GLOBALLFLAGS="$(OSXLFLAGS)" + + FREEBSDRANLIB = /usr/bin/ranlib +-FREEBSDCFLAGS = -g -fno-common -DRel4 -DFBSD -ansi -pedantic $(GCCWARNFLAGS) ++FREEBSDCFLAGS = -g -fno-common -DRel4 -DFBSD -ansi -pedantic $(GCCWARNFLAGS) $(CFLAGS) + FREEBSDLFLAGS = + FREEBSDMASTER = GLOBALCFLAGS="$(FREEBSDCFLAGS)" GLOBALLFLAGS="$(FREEBSDLFLAGS)" RANLIB="$(FREEBSDRANLIB)" + diff --git a/games/wolfpack/files/patch-Makefile b/games/wolfpack/files/patch-Makefile new file mode 100644 index 0000000..85555f0 --- /dev/null +++ b/games/wolfpack/files/patch-Makefile @@ -0,0 +1,31 @@ +--- Makefile.orig Tue Sep 7 23:52:39 2004 ++++ Makefile Sun Oct 10 11:26:07 2004 +@@ -106,7 +106,6 @@ + ($(MAKE) genlibs $(FREEBSDMASTER)) + (cd src/lib/lwp; $(MAKE) $(FREEBSDMASTER)) + ($(MAKE) binaries $(FREEBSDMASTER)) +- ($(MAKE) install) + + hp: + @echo 'building a $(WORLDX) by $(WORLDY) server...' +@@ -499,6 +498,20 @@ + -(mv $(EMPDIR)/data/econfig $(EMPDIR)/data/econfig.bak) + ($(EMPDIR)/bin/pconfig > $(EMPDIR)/data/econfig) + -(mv $(EMPDIR)/data/econfig.bak $(EMPDIR)/data/econfig) ++ echo "# Wolfpack, 1996-2000" >$(EMPDIR)/data/auth ++ echo "#" >>$(EMPDIR)/data/auth ++ echo "# Empire Authorization File - Users listed will be allowed to log in as deities." >>$(EMPDIR)/data/auth ++ echo "#" >>$(EMPDIR)/data/auth ++ echo "# Format is:" >>$(EMPDIR)/data/auth ++ echo "# hostname that authorized user uses on a line" >>$(EMPDIR)/data/auth ++ echo "# username that authorized user uses on a line" >>$(EMPDIR)/data/auth ++ echo "#" >>$(EMPDIR)/data/auth ++ echo "# REMEMBER TO USE PAIRS OF LINES!" >>$(EMPDIR)/data/auth ++ echo "#" >>$(EMPDIR)/data/auth ++ echo "# Example:" >>$(EMPDIR)/data/auth ++ echo "#" >>$(EMPDIR)/data/auth ++ echo "localhost" >>$(EMPDIR)/data/auth ++ echo "root" >>$(EMPDIR)/data/auth + + ntinstall: + cd src\client diff --git a/games/wolfpack/files/patch-ad b/games/wolfpack/files/patch-ad deleted file mode 100644 index c906a66..0000000 --- a/games/wolfpack/files/patch-ad +++ /dev/null @@ -1,56 +0,0 @@ ---- src/doconfig/doconfig.c.orig Thu Jun 19 03:24:48 2003 -+++ src/doconfig/doconfig.c Wed Oct 22 16:02:33 2003 -@@ -90,12 +90,18 @@ - #endif - - int --main() -+main(int argc, char **argv) - { - char buf[256]; - char *cp; - char *pathname; - -+ if (argc != 2) { -+ printf("Bad usage"); -+ exit(-1); -+ } -+ -+ - if ((pathname = getcwd(NULL, 255)) == NULL) { - printf("Can't get current path!\n"); - exit(-1); -@@ -112,30 +118,16 @@ - cp = (char *)rindex(pathname, '\\'); - *cp = '\0'; - #endif -+ if (!strcasecmp(argv[1], "config")) { - printf("Configuring...\n"); - wrmakesrc(pathname); - sprintf(buf, "%s/include/gamesdef.h", pathname); - wrgamesdef(buf); - sprintf(buf, "%s/src/client/ipglob.c", pathname); - wripglob(buf); -- -- if (access(EP, 0)) { -- printf("making directory %s\n", EP); -- if (mkdir(EP, 493)) { -- printf("mkdir failed on %s, exiting.\n", EP); -- exit(-1); -- } -- } -- sprintf(buf, "%s/data", EP); -- if (access(buf, 0)) { -- printf("making directory %s\n", buf); -- if (mkdir(buf, 493)) { -- printf("mkdir failed on %s, exiting.\n", buf); -- exit(-1); -- } -- } -- sprintf(buf, "%s/data/auth", EP); -+ sprintf(buf, "%s/data/auth", pathname); - wrauth(buf); -+ } - exit(0); - } - diff --git a/games/wolfpack/files/patch-ai b/games/wolfpack/files/patch-ai deleted file mode 100644 index 6050bcc..0000000 --- a/games/wolfpack/files/patch-ai +++ /dev/null @@ -1,10 +0,0 @@ ---- Make.sysdefs.orig Sun Dec 17 00:09:26 2000 -+++ Make.sysdefs Sun Dec 17 00:09:13 2000 -@@ -32,7 +32,7 @@ - # - - FREEBSDRANLIB = /usr/bin/ranlib --FREEBSDCFLAGS = -DRel4 -DFBSD -ansi -pedantic #-Wall -+FREEBSDCFLAGS = $(CFLAGS) -DRel4 -DFBSD -ansi -pedantic #-Wall - FREEBSDLFLAGS = - FREEBSDMASTER = GLOBALCFLAGS="$(FREEBSDCFLAGS)" GLOBALLFLAGS="$(FREEBSDLFLAGS)" RANLIB="$(FREEBSDRANLIB)" diff --git a/games/wolfpack/files/patch-aj b/games/wolfpack/files/patch-aj deleted file mode 100644 index 0f445e3..0000000 --- a/games/wolfpack/files/patch-aj +++ /dev/null @@ -1,248 +0,0 @@ ---- Makefile.orig Sat Aug 24 04:25:15 2002 -+++ Makefile Wed Oct 22 16:58:17 2003 -@@ -81,7 +81,6 @@ - ($(MAKE) genlibs $(ALPHAMASTER)) - (cd src/lib/lwp; $(MAKE) $(ALPHAMASTER)) - ($(MAKE) binaries $(ALPHAMASTER)) -- ($(MAKE) install) - - alpha-pthreads: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -89,7 +88,6 @@ - ($(MAKE) genlibs $(ALPHAPOSMASTER)) - (cd src/lib/lwp; $(MAKE) $(ALPHAPOSMASTER)) - ($(MAKE) binaries $(ALPHAPOSMASTER)) -- ($(MAKE) install) - - apollo: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -97,7 +95,6 @@ - ($(MAKE) genlibs $(APOLLOMASTER)) - (cd src/lib/lwp; $(MAKE) $(APOLLOMASTER)) - ($(MAKE) binaries $(APOLLOMASTER)) -- ($(MAKE) install) - - freebsd: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -105,7 +102,6 @@ - ($(MAKE) genlibs $(FREEBSDMASTER)) - (cd src/lib/lwp; $(MAKE) $(FREEBSDMASTER)) - ($(MAKE) binaries $(FREEBSDMASTER)) -- ($(MAKE) install) - - hp: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -113,7 +109,6 @@ - ($(MAKE) genlibs $(HPMASTER)) - (cd src/lib/lwp; $(MAKE) $(HPMASTER)) - ($(MAKE) binaries $(HPMASTER)) -- ($(MAKE) install) - - hpux: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -121,7 +116,6 @@ - ($(MAKE) genlibs $(HPUXMASTER)) - (cd src/lib/lwp; $(MAKE) $(HPUXMASTER)) - ($(MAKE) binaries $(HPUXMASTER) CLIENTLIBS="") -- ($(MAKE) install) - - next: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -129,14 +123,12 @@ - ($(MAKE) genlibs $(NEXTMASTER)) - (cd src/lib/lwp; $(MAKE) $(NEXTMASTER)) - ($(MAKE) binaries $(NEXTMASTER)) -- ($(MAKE) install) - - osx: - @echo 'building a $(WORLDX) by $(WORLDY) server...' - (cd src/doconfig; $(MAKE) $(OSXMASTER)) - ($(MAKE) genlibs $(OSXMASTER)) - ($(MAKE) binaries TOBUILD=osx $(OSXMASTER) CLIENTLIBS="") -- ($(MAKE) install) - - irix: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -144,7 +136,6 @@ - ($(MAKE) genlibs $(IRIXMASTER)) - (cd src/lib/lwp; $(MAKE) $(IRIXMASTER)) - ($(MAKE) binaries $(IRIXMASTER)) -- ($(MAKE) install) - - irix5: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -152,7 +143,6 @@ - ($(MAKE) genlibs $(IRIX5MASTER)) - (cd src/lib/lwp; $(MAKE) $(IRIX5MASTER)) - ($(MAKE) binaries $(IRIX5MASTER)) -- ($(MAKE) install) - - isi: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -160,7 +150,6 @@ - ($(MAKE) genlibs $(ISIMASTER)) - (cd src/lib/lwp; $(MAKE) $(ISIMASTER)) - ($(MAKE) binaries $(ISIMASTER)) -- ($(MAKE) install) - - linux: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -170,7 +159,6 @@ - ($(MAKE) genlibs $(LINUXMASTER)) - (cd src/lib/lwp; $(MAKE) $(LINUXMASTER)) - ($(MAKE) binaries $(LINUXMASTER)) -- ($(MAKE) install) - - linux-pthreads: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -178,7 +166,6 @@ - ($(MAKE) genlibs $(LINUXPTHMASTER)) - (cd src/lib/lwp; $(MAKE) $(LINUXPTHMASTER)) - ($(MAKE) binaries $(LINUXPTHMASTER)) -- ($(MAKE) install) - - mipsbsd: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -186,7 +173,6 @@ - ($(MAKE) genlibs $(MIPSBSDMASTER)) - (cd src/lib/lwp; $(MAKE) mipsultrix $(MIPSBSDMASTER)) - ($(MAKE) binaries $(MIPSBSDMASTER)) -- ($(MAKE) install) - - mach2.5: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -194,7 +180,6 @@ - ($(MAKE) genlibs $(MACH25MASTER)) - (cd src/lib/lwp; $(MAKE) mipsultrix $(MACH25MASTER)) - ($(MAKE) binaries $(MACH25MASTER)) -- ($(MAKE) install) - - mipsultrix: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -202,7 +187,6 @@ - ($(MAKE) genlibs $(MIPSULTMASTER)) - (cd src/lib/lwp; $(MAKE) mipsultrix $(MIPSULTMASTER)) - ($(MAKE) binaries $(MIPSULTMASTER)) -- ($(MAKE) install) - - mipsultrix.gcc: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -210,7 +194,6 @@ - ($(MAKE) genlibs $(MIPSULTGMASTER)) - (cd src/lib/lwp; $(MAKE) mipsultrix $(MIPSULTGMASTER)) - ($(MAKE) binaries $(MIPSULTGMASTER)) -- ($(MAKE) install) - - nt: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -222,7 +205,6 @@ - $(MAKE) nt $(NTMASTER) - cd ../../.. - $(MAKE) ntbinaries TOBUILD=nt $(NTMASTER) -- $(MAKE) ntinstall - - vaxultrix: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -230,7 +212,6 @@ - ($(MAKE) genlibs $(VAXULTMASTER)) - (cd src/lib/lwp; $(MAKE) $(VAXULTMASTER)) - ($(MAKE) binaries $(VAXULTMASTER)) -- ($(MAKE) install) - - aix: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -238,7 +219,6 @@ - ($(MAKE) genlibs $(AIXMASTER)) - (cd src/lib/lwp; $(MAKE) aix $(AIXMASTER)) - ($(MAKE) binaries $(AIXMASTER)) -- ($(MAKE) install) - - rtpc: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -246,7 +226,6 @@ - ($(MAKE) genlibs $(RTPCMASTER)) - (cd src/lib/lwp; $(MAKE) aix $(RTPCMASTER)) - ($(MAKE) binaries $(RTPCMASTER)) -- ($(MAKE) install) - - sequent: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -254,7 +233,6 @@ - ($(MAKE) genlibs $(SEQMASTER)) - (cd src/lib/lwp; $(MAKE) $(SEQMASTER)) - ($(MAKE) binaries $(SEQMASTER)) -- ($(MAKE) install) - - sequent.fpa: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -262,7 +240,6 @@ - ($(MAKE) genlibs $(SEQFPAMASTER)) - (cd src/lib/lwp; $(MAKE) $(SEQFPAMASTER)) - ($(MAKE) binaries $(SEQFPAMASTER)) -- ($(MAKE) install) - - solaris: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -270,7 +247,6 @@ - ($(MAKE) genlibs $(SOLMASTER)) - (cd src/lib/lwp; $(MAKE) $(SOLMASTER)) - ($(MAKE) binaries $(SOLMASTER)) -- ($(MAKE) install) - - sun3: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -278,7 +254,6 @@ - ($(MAKE) genlibs $(SUN3MASTER)) - (cd src/lib/lwp; $(MAKE) $(SUN3MASTER)) - ($(MAKE) binaries $(SUN3MASTER)) -- ($(MAKE) install) - - sun4: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -286,7 +261,6 @@ - ($(MAKE) genlibs $(SUN4MASTER)) - (cd src/lib/lwp; $(MAKE) $(SUN4MASTER)) - ($(MAKE) binaries $(SUN4MASTER)) -- ($(MAKE) install) - - sun4.opt: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -294,7 +268,6 @@ - ($(MAKE) genlibs $(SUN4OPTMASTER)) - (cd src/lib/lwp; $(MAKE) $(SUN4OPTMASTER)) - ($(MAKE) binaries $(SUN4OPTMASTER)) -- ($(MAKE) install) - - sun4.debug: - @echo 'building a $(WORLDX) by $(WORLDY) server...' -@@ -302,7 +275,6 @@ - ($(MAKE) genlibs $(SUN4DBGMASTER)) - (cd src/lib/lwp; $(MAKE) $(SUN4DBGMASTER)) - ($(MAKE) binaries $(SUN4DBGMASTER)) -- ($(MAKE) install) - - # - # Generic stuff that is called from the architecture specific stuff. -@@ -542,6 +514,22 @@ - -(mv $(EMPDIR)/data/econfig $(EMPDIR)/data/econfig.bak) - ($(EMPDIR)/bin/pconfig > $(EMPDIR)/data/econfig) - -(mv $(EMPDIR)/data/econfig.bak $(EMPDIR)/data/econfig) -+ echo "# Wolfpack, 1996-2000" >$(EMPDIR)/data/auth -+ echo "#" >>$(EMPDIR)/data/auth -+ echo "# Empire Authorization File - Users listed will be allowed to log in as deities." >>$(EMPDIR)/data/auth -+ echo "#" >>$(EMPDIR)/data/auth -+ echo "# Format is:" >>$(EMPDIR)/data/auth -+ echo "# hostname that authorized user uses on a line" >>$(EMPDIR)/data/auth -+ echo "# username that authorized user uses on a line" >>$(EMPDIR)/data/auth -+ echo "#" >>$(EMPDIR)/data/auth -+ echo "# REMEMBER TO USE PAIRS OF LINES!" >>$(EMPDIR)/data/auth -+ echo "#" >>$(EMPDIR)/data/auth -+ echo "# Example:" >>$(EMPDIR)/data/auth -+ echo "#" >>$(EMPDIR)/data/auth -+ echo "localhost" >>$(EMPDIR)/data/auth -+ echo "$(USERNAME)" >>$(EMPDIR)/data/auth -+ echo "$(IPADDR)" >>$(EMPDIR)/data/auth -+ echo "$(USERNAME)" >>$(EMPDIR)/data/auth - - ntinstall: - -(mkdir bin) diff --git a/games/wolfpack/files/patch-ah b/games/wolfpack/files/patch-src::doconfig::Makefile index ea4eae8..ea4eae8 100644 --- a/games/wolfpack/files/patch-ah +++ b/games/wolfpack/files/patch-src::doconfig::Makefile diff --git a/games/wolfpack/files/patch-src::doconfig::doconfig.c b/games/wolfpack/files/patch-src::doconfig::doconfig.c new file mode 100644 index 0000000..0040f70 --- /dev/null +++ b/games/wolfpack/files/patch-src::doconfig::doconfig.c @@ -0,0 +1,61 @@ +--- src/doconfig/doconfig.c.orig Tue Sep 7 23:52:37 2004 ++++ src/doconfig/doconfig.c Sun Oct 10 11:31:04 2004 +@@ -80,12 +80,17 @@ + #endif + + int +-main(void) ++main(int argc, char **argv) + { + char buf[256]; + char *cp; + char *pathname; + ++ if (argc != 2) { ++ printf("Bad usage"); ++ exit(-1); ++ } ++ + if ((pathname = safe_getcwd()) == NULL) { + printf("Can't get current path!\n"); + exit(-1); +@@ -101,30 +106,16 @@ + cp = strrchr(pathname, '\\'); + *cp = '\0'; + #endif +- printf("Configuring...\n"); +- wrmakesrc(pathname); +- sprintf(buf, "%s/include/gamesdef.h", pathname); +- wrgamesdef(buf); +- sprintf(buf, "%s/src/client/ipglob.c", pathname); +- wripglob(buf); +- +- if (access(EP, 0)) { +- printf("making directory %s\n", EP); +- if (mkdir(EP, 0755)) { +- printf("mkdir failed on %s, exiting.\n", EP); +- exit(-1); +- } +- } +- sprintf(buf, "%s/data", EP); +- if (access(buf, 0)) { +- printf("making directory %s\n", buf); +- if (mkdir(buf, 0755)) { +- printf("mkdir failed on %s, exiting.\n", buf); +- exit(-1); +- } ++ if (!strcasecmp(argv[1], "config")) { ++ printf("Configuring...\n"); ++ wrmakesrc(pathname); ++ sprintf(buf, "%s/include/gamesdef.h", pathname); ++ wrgamesdef(buf); ++ sprintf(buf, "%s/src/client/ipglob.c", pathname); ++ wripglob(buf); ++ sprintf(buf, "%s/data/auth", pathname); ++ wrauth(buf); + } +- sprintf(buf, "%s/data/auth", EP); +- wrauth(buf); + exit(0); + } + diff --git a/games/wolfpack/files/patch-src::server::main.c b/games/wolfpack/files/patch-src::server::main.c new file mode 100644 index 0000000..2c85695 --- /dev/null +++ b/games/wolfpack/files/patch-src::server::main.c @@ -0,0 +1,127 @@ +--- src/server/main.c.orig Tue Sep 7 23:52:39 2004 ++++ src/server/main.c Sun Oct 10 23:09:23 2004 +@@ -78,6 +78,7 @@ + + #if !defined(_WIN32) + static int mainpid = 0; ++static char *pidfile = NULL; + #endif + + /* +@@ -93,9 +94,10 @@ + time_t now; + int flags = 0; + int op; +- char *config_file = NULL; ++ char *config_file = NULL, pbuf[256]; + extern char *optarg; + s_char tbuf[256]; ++ FILE *pidf; + #ifdef POSIXSIGNALS + struct sigaction act; + #endif /* POSIXSIGNALS */ +@@ -105,11 +107,14 @@ + #if !defined(_WIN32) + mainpid = getpid(); + +- while ((op = getopt(argc, argv, "D:de:psh")) != EOF) { ++ while ((op = getopt(argc, argv, "D:P:de:psh")) != EOF) { + switch (op) { + case 'D': + datadir = optarg; + break; ++ case 'P': ++ pidfile = optarg; ++ break; + case 'd': + debug++; + break; +@@ -124,7 +129,15 @@ + break; + case 'h': + default: +- printf("Usage: %s -d -p -s\n", argv[0]); ++ fprintf(stderr, "Usage: %s -D <datadir> -d -e <configfile> -p -s\n" ++ " -D Use the specified data dir\n" ++ " -P Write out the PID to the specified file\n" ++ " -d Increase debugging\n" ++ " -e Use the specified config file\n" ++ " -p Print thread debugging information\n" ++ " -s Print thread info, and do stack checks\n", ++ argv[0]); ++ + return 0; + } + } +@@ -134,13 +147,6 @@ + config_file = tbuf; + } + +- logerror("------------------------------------------------------"); +-#if !defined(_WIN32) +- logerror("Empire server (pid %d) started", getpid()); +-#else +- logerror("Empire server started"); +-#endif /* _WIN32 */ +- + #if defined(_WIN32) + loc_NTInit(); + #endif +@@ -193,6 +199,32 @@ + signal(SIGPIPE, SIG_IGN); + #endif /* POSIXSIGNALS */ + #endif /* _WIN32 */ ++ ++#if !defined(_WIN32) ++ if (pidfile != NULL) { ++ if ((pidf = fopen(pidfile, "a")) == NULL) { ++ logerror("Unable to open PID file %s - %s", pidfile, strerror(errno)); ++ exit(1); ++ } else { ++ op = snprintf(pbuf, sizeof(pbuf), "%d\n", getpid()); ++ if (fwrite(pbuf, 1, op, pidf) != op) { ++ unlink(pidfile); ++ logerror("Unable to write PID file %s - %s", pidfile, strerror(errno)); ++ exit(1); ++ } ++ fclose(pidf); ++ ++ } ++ } ++#endif ++ ++ logerror("------------------------------------------------------"); ++#if !defined(_WIN32) ++ logerror("Empire server (pid %d) started", getpid()); ++#else ++ logerror("Empire server started"); ++#endif /* _WIN32 */ ++ + empth_init((char **)&player, flags); + time(&now); + #if !defined(_WIN32) +@@ -312,9 +344,13 @@ + signal(SIGFPE, SIG_DFL); + #endif /* POSIXSIGNALS */ + #endif /* _WIN32 */ +- logerror("server received fatal signal %d", sig); ++logerror("server received fatal signal %d", sig); + log_last_commands(); + close_files(); ++ ++ if (pidfile != NULL) ++ unlink(pidfile); ++ + _exit(0); + } + +@@ -381,6 +417,9 @@ + else + logerror("Server shutting down at Deity's request"); + close_files(); ++ if (pidfile != NULL) ++ unlink(pidfile); ++ + _exit(0); + } + diff --git a/games/wolfpack/files/wolfpack.sh b/games/wolfpack/files/wolfpack.sh new file mode 100644 index 0000000..718c562 --- /dev/null +++ b/games/wolfpack/files/wolfpack.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# +# Add the following line to /etc/rc.conf to enable wolfpack: +# +# wolfpack_enable="YES" +# + +. %%RC_SUBR%% + +name=wolfpack +rcvar=`set_rcvar` + +wolfdir="%%PREFIX%%/wolfpack" + +command="$wolfdir/bin/emp_server" +pidfile="$wolfdir/data/wolfpack.pid" + +wolfpack_enable=${wolfpack_enable:-"NO"} +wolfpack_user=${wolfpack_user:-"wolfpack"} +wolfpack_flags=${wolfpack_flags:-"-P $pidfile"} + +load_rc_config $name + +run_rc_command "$1" + diff --git a/games/wolfpack/pkg-descr b/games/wolfpack/pkg-descr index 5ca4e39..0b529ca 100644 --- a/games/wolfpack/pkg-descr +++ b/games/wolfpack/pkg-descr @@ -1,4 +1,4 @@ Wolfpack Empire is a game designed for 2 to 100 people. Games can last from 24 hours to 1 year. Very complex and highly addictive, beware! -WWW: http://www.expire.cx/ +WWW: www.wolfpackempire.com diff --git a/games/wolfpack/pkg-install b/games/wolfpack/pkg-install new file mode 100644 index 0000000..f13080b --- /dev/null +++ b/games/wolfpack/pkg-install @@ -0,0 +1,72 @@ +#! /bin/sh + +# $FreeBSD# + +PATH=/bin:/usr/sbin +INSTDIR=${PKG_PREFIX}/wolfpack + +USER=wolfpack +GROUP=${USER} + +case $2 in +PRE-INSTALL) + if pw group show "${GROUP}" 2>/dev/null; then + echo "You already have a group \"${GROUP}\", so I will use it." + else + if pw groupadd ${GROUP}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi + fi + + if pw user show "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." + else + if pw useradd ${USER} -g ${GROUP} -h - \ + -d ${INSTDIR} -c "Teamspeak Server" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi + fi + + if ! [ -x ~${USER} ] ; then + mkdir -p ${INSTDIR} + chown ${USER}:${GROUP} ${INSTDIR} + fi + ;; + +POST-INSTALL) + chown -R ${USER}:${GROUP} ${INSTDIR} + chmod -R u+w,o-rx ${INSTDIR} + ;; + + +POST-DEINSTALL) + if pw group show "${GROUP}" 2>/dev/null; then + if pw groupdel ${GROUP}; then + echo "Removed group \"${GROUP}\"." + else + echo "Removing group \"${GROUP}\" failed..." + exit 1 + fi + else + echo "Group \"${GROUP}\" doesn't exist!" + fi + + if pw user show "${USER}" 2>/dev/null; then + if pw userdel ${USER}; then + echo "Removed user \"${USER}\"." + else + echo "Removing user \"${USER}\" failed..." + exit 1 + fi + else + echo "User \"${USER}\" doesn't exist!" + fi + ;; +esac diff --git a/games/wolfpack/pkg-message b/games/wolfpack/pkg-message new file mode 100644 index 0000000..58867ad --- /dev/null +++ b/games/wolfpack/pkg-message @@ -0,0 +1,2 @@ +You should check and edit the $PREFIX/wolfpack/data/auth file so that you are +able to login as a diety. diff --git a/games/wolfpack/pkg-plist b/games/wolfpack/pkg-plist index e67b747..cd6358b 100644 --- a/games/wolfpack/pkg-plist +++ b/games/wolfpack/pkg-plist @@ -123,7 +123,6 @@ wolfpack/info.nr/army wolfpack/info.nr/assault wolfpack/info.nr/attack wolfpack/info.nr/bdes -wolfpack/info.nr/bestdistpath wolfpack/info.nr/bestpath wolfpack/info.nr/bmap wolfpack/info.nr/board @@ -135,7 +134,6 @@ wolfpack/info.nr/buy wolfpack/info.nr/bye wolfpack/info.nr/capital wolfpack/info.nr/cargo -wolfpack/info.nr/cede wolfpack/info.nr/census wolfpack/info.nr/change wolfpack/info.nr/coastwatch @@ -151,7 +149,6 @@ wolfpack/info.nr/demobilize wolfpack/info.nr/designate wolfpack/info.nr/disable wolfpack/info.nr/disarm -wolfpack/info.nr/dissolve wolfpack/info.nr/distribute wolfpack/info.nr/drop wolfpack/info.nr/dump @@ -174,11 +171,13 @@ wolfpack/info.nr/give wolfpack/info.nr/grind wolfpack/info.nr/harden wolfpack/info.nr/headlines +wolfpack/info.nr/help wolfpack/info.nr/hidden wolfpack/info.nr/improve wolfpack/info.nr/info wolfpack/info.nr/land wolfpack/info.nr/launch +wolfpack/info.nr/lbmap wolfpack/info.nr/lboard wolfpack/info.nr/lcargo wolfpack/info.nr/ldump @@ -208,7 +207,6 @@ wolfpack/info.nr/morale wolfpack/info.nr/motd wolfpack/info.nr/move wolfpack/info.nr/mquota -wolfpack/info.nr/mult wolfpack/info.nr/name wolfpack/info.nr/nation wolfpack/info.nr/navigate @@ -225,6 +223,7 @@ wolfpack/info.nr/origin wolfpack/info.nr/paradrop wolfpack/info.nr/path wolfpack/info.nr/payoff +wolfpack/info.nr/pbmap wolfpack/info.nr/pboard wolfpack/info.nr/pdump wolfpack/info.nr/plane @@ -252,6 +251,7 @@ wolfpack/info.nr/route wolfpack/info.nr/sabotage wolfpack/info.nr/sail wolfpack/info.nr/satellite +wolfpack/info.nr/sbmap wolfpack/info.nr/scrap wolfpack/info.nr/scuttle wolfpack/info.nr/sdump @@ -332,11 +332,10 @@ wolfpack/scripts/mapper/text.pbm wolfpack/scripts/mapper/text.size wolfpack/scripts/postresults wolfpack/scripts/saveass -@dirrm wolfpack/bin -@dirrm wolfpack/data -@dirrm wolfpack/doc -@dirrm wolfpack/info.nr -@dirrm wolfpack/scripts/blitz +etc/rc.d/wolfpack.sh @dirrm wolfpack/scripts/mapper +@dirrm wolfpack/scripts/blitz @dirrm wolfpack/scripts -@dirrm wolfpack +@dirrm wolfpack/info.nr +@dirrm wolfpack/doc +@dirrm wolfpack/data diff --git a/games/wolfpack/scripts/configure b/games/wolfpack/scripts/configure index 2d2be88..7796048 100644 --- a/games/wolfpack/scripts/configure +++ b/games/wolfpack/scripts/configure @@ -11,8 +11,6 @@ doquit () { name=`pw user show \`id -u\` | awk -F : '{print $8}'` username=`id -un` email=$username@`hostname` -host=`hostname` -ip=`host -t a $host | awk '{print $4}'` tempfile=`mktemp -t __input` if [ ! -z "$BATCH" ]; then @@ -29,21 +27,11 @@ else doquit $? email=`cat $tempfile` - dialog --title "Wolfpack Empire Information" --inputbox "Hostname of the machine the server is running on" 8 60 "$host" 2>$tempfile - doquit $? - host=`cat $tempfile` - - dialog --title "Wolfpack Empire Information" --inputbox "IP of the machine the server is running on" 8 60 "$ip" 2>$tempfile - doquit $? - ip=`cat $tempfile` - rm -f $tempfile fi echo Name is $name echo Username is $username echo Email address is $email -echo Hostname is $host -echo IP is $ip FROM=$FILESDIR/build.conf.tmpl TO=$WRKSRC/build.conf @@ -52,4 +40,5 @@ if [ -z "$CC" ]; then CC=gcc fi -sed -e "s/%%CC%%/$CC/" -e "s/%%NAME%%/$name/" -e "s/%%USERNAME%%/$username/" -e "s/%%EMAIL%%/$email/" -e "s/%%HOSTNAME%%/$host/" -e "s/%%IPADDR%%/$ip/" -e "s#%%EMPDIR%%#$PREFIX/wolfpack#" <$FROM >$TO +sed -e "s/%%CC%%/$CC/" -e "s/%%NAME%%/$name/" -e "s/%%USERNAME%%/$username/" -e "s/%%EMAIL%%/$email/" -e "s#%%EMPDIR%%#$PREFIX/wolfpack#" <$FROM >$TO + |