diff options
-rw-r--r-- | games/Makefile | 1 | ||||
-rw-r--r-- | games/pvpgn/Makefile | 105 | ||||
-rw-r--r-- | games/pvpgn/distinfo | 4 | ||||
-rw-r--r-- | games/pvpgn/files/bnetd.sh | 41 | ||||
-rw-r--r-- | games/pvpgn/files/patch-Makefile.in | 13 | ||||
-rw-r--r-- | games/pvpgn/files/patch-conf-bnetd.conf.in | 49 | ||||
-rw-r--r-- | games/pvpgn/pkg-deinstall | 24 | ||||
-rw-r--r-- | games/pvpgn/pkg-descr | 9 | ||||
-rw-r--r-- | games/pvpgn/pkg-install | 58 | ||||
-rw-r--r-- | games/pvpgn/pkg-plist | 123 |
10 files changed, 427 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile index ed8cddb63535..18d92064da3c 100644 --- a/games/Makefile +++ b/games/Makefile @@ -363,6 +363,7 @@ SUBDIR += pp SUBDIR += prboom SUBDIR += ptkei + SUBDIR += pvpgn SUBDIR += py-sgflib SUBDIR += py-sgfsummary SUBDIR += py-ski diff --git a/games/pvpgn/Makefile b/games/pvpgn/Makefile new file mode 100644 index 000000000000..401bd4538404 --- /dev/null +++ b/games/pvpgn/Makefile @@ -0,0 +1,105 @@ +# New ports collection makefile for: pvpgn +# Date created: 19 January 2005 +# Whom: mek +# +# $FreeBSD$ +# + +PORTNAME= pvpgn +PORTVERSION= 1.7.4 +CATEGORIES= games +MASTER_SITES= http://download.berlios.de/pvpgn/ +DISTFILES= ${EXTRACT_ONLY} pvpgn-support-1.0.tar.gz +DIST_SUBDIR= pvpgn +EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} + +MAINTAINER= mek@mek.uz.ua +COMMENT= Free Blizzard Battle.net emulation software + +PKGINSTALL?= ${WRKDIR}/pkg-install +PKGDEINSTALL?= ${WRKDIR}/pkg-deinstall +USE_BZIP2= yes +USE_GMAKE= yes +SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' + +USE_RC_SUBR= yes +RC_DIR= ${PREFIX}/etc/rc.d +RC_SUFX= .sh +SED_SCRIPT+= -e 's|%%RC_SUBR%%|${RC_SUBR}|g' \ + -e 's|%%RC_DIR%%|${RC_DIR}|g' \ + -e 's|%%RC_SUFX%%|${RC_SUFX}|g' + +PLIST_SUB+= RC_SUFX=${RC_SUFX} + +WRKSRC= ${WRKDIR}/${DISTNAME}/src + +HAS_CONFIGURE= yes +CONFIGURE_ARGS= --prefix=${PREFIX} --sysconfdir=${PREFIX}/etc/pvpgn \ + --localstatedir=${DATADIR} + +MAN1= bnbot.1 bnchat.1 bnetd.1 bnftp.1 bni2tga.1 bnibuild.1 \ + bniextract.1 bnilist.1 bnpass.1 bnstat.1 bntrackd.1 tgainfo.1 +MAN5= bnetd.conf.5 bntext.5 + +.if defined(WITH_MYSQL_VER) +WITH_MYSQL= yes +.if ${WITH_MYSQL_VER} == 3 +WANT_MYSQL_VER= 323 +.endif +.endif + +.if defined(WITH_MYSQL) +USE_MYSQL= yes +CONFIGURE_ARGS+=--with-mysql=${LOCALBASE} +.endif + +.if defined(WITH_PGSQL) +POSTGRESQL_PORT?= databases/postgresql7 +LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT} +CONFIGURE_ARGS+=--with-pgsql=${LOCALBASE} +.endif + +## support files + +SUPPORT_SUFFX= .tar.gz +SUPPORT_FILES= pvpgn-support-1.0 + +pre-fetch: + @${ECHO} "" + @${ECHO} "You may use the following build options:" + @${ECHO} "" + @${ECHO} " WITH_MYSQL=yes Include MySQL user account support" + @${ECHO} " WITH_PGSQL=yes Include PostgreSQL user account support" + @${ECHO} "" + +post-extract: + @${MKDIR} ${WRKSRC}/${SUPPORT_FILES} + @${TAR} -C ${WRKSRC} -xzf ${DISTDIR}/${DIST_SUBDIR}/${SUPPORT_FILES}${SUPPORT_SUFFX} + +post-build: + @${SED} ${SED_SCRIPT} ${FILESDIR}/bnetd.sh > ${WRKSRC}/bnetd.sh + @${SED} "s|%%PVPGN_DIR%%|${DATADIR}|g" ${PKGDIR}/pkg-install > ${WRKDIR}/pkg-install + @${SED} "s|%%PVPGN_DIR%%|${DATADIR}|g" ${PKGDIR}/pkg-deinstall > ${WRKDIR}/pkg-deinstall + +post-install: + @${INSTALL_SCRIPT} ${WRKSRC}/bnetd.sh ${PREFIX}/etc/rc.d/bnetd${RC_SUFX} + @${ECHO_MSG} ">>> installing support files ..." +.for i in IX86ver1.mpq PMACver1.mpq WAR3IX86.mpq XMACver1.mpq \ + bnserver-D2DV.ini bnserver-D2XP.ini bnserver-WAR3.ini bnserver.ini \ + icons-WAR3.bni icons.bni icons_STAR.bni matchmaking-war3-default.dat \ + matchmaking-war3-enUS.dat + ${INSTALL_DATA} ${WRKSRC}/${SUPPORT_FILES}/${i} ${DATADIR}/files +.endfor + +## Additional documentation + +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} +.for i in INSTALL.unix PORTS README.fdwatch README.storage bnmotd.txt + ${INSTALL_MAN} ${WRKSRC}/../docs/${i} ${DOCSDIR} +.endfor +.endif + + @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + +.include <bsd.port.mk> diff --git a/games/pvpgn/distinfo b/games/pvpgn/distinfo new file mode 100644 index 000000000000..2fbf49b775ac --- /dev/null +++ b/games/pvpgn/distinfo @@ -0,0 +1,4 @@ +MD5 (pvpgn/pvpgn-1.7.4.tar.bz2) = 1827a7c1ef90c7f9525acd37e83432ad +SIZE (pvpgn/pvpgn-1.7.4.tar.bz2) = 951430 +MD5 (pvpgn/pvpgn-support-1.0.tar.gz) = 8ba36144ea3a7efe200536c142bb7886 +SIZE (pvpgn/pvpgn-support-1.0.tar.gz) = 126047 diff --git a/games/pvpgn/files/bnetd.sh b/games/pvpgn/files/bnetd.sh new file mode 100644 index 000000000000..aa7fabc20fbd --- /dev/null +++ b/games/pvpgn/files/bnetd.sh @@ -0,0 +1,41 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: bnetd +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown + +# +# Add the following lines to /etc/rc.conf to enable bnetd: +# +#bnetd_enable="YES" +# +# See bnetd(1) for flags +# + +. %%RC_SUBR%% + +name=bnetd +rcvar=`set_rcvar` + +command=%%PREFIX%%/sbin/bnetd +pidfile=/var/run/pvpgn/bnetd.pid +required_files=%%PREFIX%%/etc/pvpgn/bnetd.conf + +stop_postcmd=stop_postcmd + +stop_postcmd() +{ + rm -f $pidfile +} + +# set defaults + +bnetd_enable=${bnetd_enable:-"NO"} +bnetd_flags=${bnetd_flags:-""} + +load_rc_config $name +run_rc_command "$1" diff --git a/games/pvpgn/files/patch-Makefile.in b/games/pvpgn/files/patch-Makefile.in new file mode 100644 index 000000000000..46fa3ef15e06 --- /dev/null +++ b/games/pvpgn/files/patch-Makefile.in @@ -0,0 +1,13 @@ +--- Makefile.in.orig Wed Jan 12 22:35:56 2005 ++++ Makefile.in Wed Jan 12 22:38:58 2005 +@@ -663,8 +663,8 @@ + ${INSTALL_DIRS} ${DESTDIR}/${confdir} + @list='${CONFS}'; for p in $$list; do \ + if test -f ${SRC_CONFDIR}/$$p; then \ +- ${ECHO} " ${INSTALL_DATA} ${SRC_CONFDIR}/$$p ${DESTDIR}/${confdir}"; \ +- ${INSTALL_DATA} ${SRC_CONFDIR}/$$p ${DESTDIR}/${confdir}; \ ++ ${ECHO} " ${INSTALL_DATA} ${SRC_CONFDIR}/$$p-sample ${DESTDIR}/${confdir}"; \ ++ ${INSTALL_DATA} ${SRC_CONFDIR}/$$p ${DESTDIR}/${confdir}/$$p-sample; \ + else :; fi; \ + done + diff --git a/games/pvpgn/files/patch-conf-bnetd.conf.in b/games/pvpgn/files/patch-conf-bnetd.conf.in new file mode 100644 index 000000000000..a2e359b630a0 --- /dev/null +++ b/games/pvpgn/files/patch-conf-bnetd.conf.in @@ -0,0 +1,49 @@ +--- ../conf/bnetd.conf.in.orig Wed Jan 12 23:00:53 2005 ++++ ../conf/bnetd.conf.in Tue Jan 18 23:57:43 2005 +@@ -15,8 +15,8 @@ + # a leading '#'). If none are specified, the userid will not be changed. # + #----------------------------------------------------------------------------# + +-#effective_user = games +-#effective_group = games ++effective_user = bnetd ++effective_group = bnetd + + # effective_user = #12 + # effective_group = #20 +@@ -75,14 +75,14 @@ + ipbanfile = /usr/local/etc/bnban.conf + helpfile = /usr/local/etc/bnhelp.conf + mpqfile = /usr/local/etc/autoupdate.conf +-logfile = /usr/local/var/bnetd.log ++logfile = /var/log/bnetd/bnetd.log + realmfile = /usr/local/etc/realm.conf + maildir = /usr/local/var/bnmail + versioncheck_file = /usr/local/etc/versioncheck.conf + mapsfile = /usr/local/etc/bnmaps.conf + xplevelfile = /usr/local/etc/bnxplevel.conf + xpcalcfile = /usr/local/etc/bnxpcalc.conf +-#pidfile = /usr/local/var/bnetd.pid ++pidfile = /var/run/bnetd/bnetd.pid + ladderdir = /usr/local/var/ladders + command_groups_file = /usr/local/etc/command_groups.conf + tournament_file = /usr/local/etc/tournament.conf +@@ -112,8 +112,7 @@ + # warn + # error + # fatal +-loglevels = fatal,error,warn,info,debug,trace +-#loglevels = fatal,error,warn,info ++loglevels = fatal,error,warn + + # # + ############################################################################## +@@ -300,7 +299,7 @@ + # List additional game types to be counted as ladder games + # Curently allowed types: topvbot, melee, ffa, oneonone + # Example: ladder_games = "topvbot,oneonone" +-ladder_games = "none" ++ladder_games = "topvbot,oneonone" + + # If additional game types are configured (see above) to be counted as ladder + # games then this setting configures a game name prefix to make only games diff --git a/games/pvpgn/pkg-deinstall b/games/pvpgn/pkg-deinstall new file mode 100644 index 000000000000..da65a3cdab8f --- /dev/null +++ b/games/pvpgn/pkg-deinstall @@ -0,0 +1,24 @@ +#!/bin/sh + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +USER=bnetd +LOGDIR=/var/log/pvpgn +PIDDIR=/var/run/pvpgn + +if pw usershow "${USER}" 2>/dev/null 1>&2; then + echo "To delete PvPGN user permanently, use 'pw userdel ${USER}'" +fi + +if pw groupshow "${USER}" 2>/dev/null 1>&2; then + echo "To delete PvPGN group permanently, use 'pw groupdel ${USER}'" +fi + +rm -Rf ${PIDDIR} + +echo "If you wish to delete pvpgn data and log files, " +echo "remove '%%PVPGN_DIR%%' and '${LOGDIR}' directories." + +exit 0 diff --git a/games/pvpgn/pkg-descr b/games/pvpgn/pkg-descr new file mode 100644 index 000000000000..136938ff503f --- /dev/null +++ b/games/pvpgn/pkg-descr @@ -0,0 +1,9 @@ +PvPGN (Player vs Player Gaming Network) is free software that emulates a +Blizzard Battle.net server. It currently supports all Battle.net games, +such as StarCraft, Diablo II, and Warcraft III, and gives you the power +to run your own server, manage your own users, run your own tournaments, etc. + +WWW: http://pvpgn.berlios.de + +- Max E. Kuznecov +mek@mek.uz.ua diff --git a/games/pvpgn/pkg-install b/games/pvpgn/pkg-install new file mode 100644 index 000000000000..a3dba675756d --- /dev/null +++ b/games/pvpgn/pkg-install @@ -0,0 +1,58 @@ +#!/bin/sh + +PATH=/bin:/usr/sbin + +case $2 in +POST-INSTALL) + USER=bnetd + GROUP=${USER} + UID=700 + GID=${UID} + HOME_DIR=/nonexistent + LOGDIR=/var/log/pvpgn + PIDDIR=/var/run/pvpgn + + 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} -g ${GID}; 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} -u ${UID} -g ${GROUP} -h - \ + -d ${HOME_DIR} -s /sbin/nologin -c "Bnetd user" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi + fi + + mkdir -p %%PVPGN_DIR%%/bak/charinfo + mkdir -p %%PVPGN_DIR%%/bak/charsave + mkdir -p %%PVPGN_DIR%%/bnmail + mkdir -p %%PVPGN_DIR%%/chanlogs + mkdir -p %%PVPGN_DIR%%/charinfo + mkdir -p %%PVPGN_DIR%%/charsave + mkdir -p %%PVPGN_DIR%%/clans + mkdir -p %%PVPGN_DIR%%/ladders + mkdir -p %%PVPGN_DIR%%/reports + mkdir -p %%PVPGN_DIR%%/status + mkdir -p %%PVPGN_DIR%%/teams + mkdir -p %%PVPGN_DIR%%/users + mkdir -p %%PVPGN_DIR%%/userscdb + + chown -R ${USER}:${GROUP} %%PVPGN_DIR%% + mkdir -m 750 ${LOGDIR} ${PIDDIR} 2> /dev/null + chown -R ${USER}:${GROUP} ${LOGDIR} ${PIDDIR} + exit 0 + ;; +esac diff --git a/games/pvpgn/pkg-plist b/games/pvpgn/pkg-plist new file mode 100644 index 000000000000..7c5ffb8f051c --- /dev/null +++ b/games/pvpgn/pkg-plist @@ -0,0 +1,123 @@ +bin/bnbot +bin/bncdb +bin/bnchat +bin/bnftp +bin/bni2tga +bin/bnibuild +bin/bniextract +bin/bnilist +bin/bnpass +bin/bnstat +bin/tgainfo +%%PORTDOCS%%%%DOCSDIR%%/INSTALL.unix +%%PORTDOCS%%%%DOCSDIR%%/PORTS +%%PORTDOCS%%%%DOCSDIR%%/README.fdwatch +%%PORTDOCS%%%%DOCSDIR%%/README.storage +%%PORTDOCS%%%%DOCSDIR%%/bnmotd.txt +etc/pvpgn/ad.conf-sample +etc/pvpgn/address_translation.conf-sample +etc/pvpgn/anongame_infos.conf-sample +etc/pvpgn/autoupdate.conf-sample +etc/pvpgn/bnalias.conf-sample +etc/pvpgn/bnban.conf-sample +etc/pvpgn/bnetd.conf-sample +etc/pvpgn/bnetd_default_user.cdb-sample +etc/pvpgn/bnetd_default_user.plain-sample +etc/pvpgn/bnhelp.conf-sample +etc/pvpgn/bnissue.txt-sample +etc/pvpgn/bnmaps.conf-sample +etc/pvpgn/bnmotd.txt-sample +etc/pvpgn/bnxpcalc.conf-sample +etc/pvpgn/bnxplevel.conf-sample +etc/pvpgn/channel.conf-sample +etc/pvpgn/command_groups.conf-sample +etc/pvpgn/d2cs.conf-sample +etc/pvpgn/d2dbs.conf-sample +etc/pvpgn/d2server.ini-sample +etc/pvpgn/news.txt-sample +etc/pvpgn/realm.conf-sample +etc/pvpgn/sql_DB_layout.conf-sample +etc/pvpgn/supportfile.conf-sample +etc/pvpgn/topics.conf-sample +etc/pvpgn/tournament.conf-sample +etc/pvpgn/versioncheck.conf-sample +etc/rc.d/bnetd%%RC_SUFX%% +sbin/bnetd +sbin/bntrackd +sbin/d2cs +sbin/d2dbs +share/pvpgn/files/IX86ver1.mpq +share/pvpgn/files/PMACver1.mpq +share/pvpgn/files/WAR3IX86.mpq +share/pvpgn/files/XMACver1.mpq +share/pvpgn/files/ad000001.mng +share/pvpgn/files/ad000001.smk +share/pvpgn/files/ad000004.mng +share/pvpgn/files/bnserver-D2DV.ini +share/pvpgn/files/bnserver-D2XP.ini +share/pvpgn/files/bnserver-WAR3.ini +share/pvpgn/files/bnserver.ini +share/pvpgn/files/chathelp-war3-default.txt +share/pvpgn/files/chathelp-war3-enUS.txt +share/pvpgn/files/chathelp-war3-frFR.txt +share/pvpgn/files/chathelp-war3-ruRU.txt +share/pvpgn/files/chathelp-war3-zhCN.txt +share/pvpgn/files/icons-WAR3.bni +share/pvpgn/files/icons.bni +share/pvpgn/files/icons_STAR.bni +share/pvpgn/files/matchmaking-war3-default.dat +share/pvpgn/files/matchmaking-war3-enUS.dat +share/pvpgn/files/newaccount-default.txt +share/pvpgn/files/newaccount-enUS.txt +share/pvpgn/files/newbie.save +share/pvpgn/files/termsofservice-default.txt +share/pvpgn/files/termsofservice-enUS.txt +share/pvpgn/files/tos-unicode_BRA.txt +share/pvpgn/files/tos-unicode_CHI.txt +share/pvpgn/files/tos-unicode_DEU.txt +share/pvpgn/files/tos-unicode_ENU.txt +share/pvpgn/files/tos-unicode_ESP.txt +share/pvpgn/files/tos-unicode_FRA.txt +share/pvpgn/files/tos-unicode_HAN.txt +share/pvpgn/files/tos-unicode_ITA.txt +share/pvpgn/files/tos-unicode_JPN.txt +share/pvpgn/files/tos-unicode_KOR.txt +share/pvpgn/files/tos-unicode_POL.txt +share/pvpgn/files/tos-unicode_POR.txt +share/pvpgn/files/tos-unicode_RUS.txt +share/pvpgn/files/tos-unicode_SIN.txt +share/pvpgn/files/tos-unicode_USA.txt +share/pvpgn/files/tos.txt +share/pvpgn/files/tos_BRA.txt +share/pvpgn/files/tos_CHI.txt +share/pvpgn/files/tos_DEU.txt +share/pvpgn/files/tos_ENU.txt +share/pvpgn/files/tos_ESP.txt +share/pvpgn/files/tos_FRA.txt +share/pvpgn/files/tos_HAN.txt +share/pvpgn/files/tos_ITA.txt +share/pvpgn/files/tos_JPN.txt +share/pvpgn/files/tos_KOR.txt +share/pvpgn/files/tos_POL.txt +share/pvpgn/files/tos_POR.txt +share/pvpgn/files/tos_RUS.txt +share/pvpgn/files/tos_SIN.txt +share/pvpgn/files/tos_USA.txt +@dirrm share/pvpgn/bak/charinfo +@dirrm share/pvpgn/bak/charsave +@dirrm share/pvpgn/bak +@dirrm share/pvpgn/bnmail +@dirrm share/pvpgn/chanlogs +@dirrm share/pvpgn/charinfo +@dirrm share/pvpgn/charsave +@dirrm share/pvpgn/clans +@dirrm share/pvpgn/files +@dirrm share/pvpgn/ladders +@dirrm share/pvpgn/reports +@dirrm share/pvpgn/status +@dirrm share/pvpgn/teams +@dirrm share/pvpgn/users +@dirrm share/pvpgn/userscdb +@unexec rmdir %D/share/pvpgn 2>/dev/null || true +@dirrm etc/pvpgn +%%PORTDOCS%%@dirrm %%DOCSDIR%% |