[Midnightbsd-cvs] mports: games/pvpgn: add pvpgn

crash at midnightbsd.org crash at midnightbsd.org
Fri May 30 16:06:36 EDT 2008


Log Message:
-----------
add pvpgn

Added Files:
-----------
    mports/games/pvpgn:
        Makefile (r1.1)
        distinfo (r1.1)
        pkg-deinstall (r1.1)
        pkg-descr (r1.1)
        pkg-install (r1.1)
        pkg-plist (r1.1)
    mports/games/pvpgn/files:
        bnetd.sh.in (r1.1)
        patch-Makefile.in (r1.1)
        patch-conf-bnetd.conf.in (r1.1)

-------------- next part --------------
--- /dev/null
+++ games/pvpgn/pkg-install
@@ -0,0 +1,69 @@
+#!/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
+	PKGNAME=$1
+	PVPGN_CONFDIR=${PKG_PREFIX:-/usr/local}/etc/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}
+
+	echo "===> Post-installation informations for ${PKGNAME}"
+   echo ""
+   echo "     o You can find the configuration files for this"
+	echo "       package in the directory ${PVPGN_CONFDIR}."
+	echo "       Please note, that the files were installed as *.conf-sample"
+	echo "       In order to run server, you must rename them."
+	echo ""
+
+	exit 0
+	;;
+esac
--- /dev/null
+++ 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 at mek.uz.ua
--- /dev/null
+++ games/pvpgn/pkg-plist
@@ -0,0 +1,124 @@
+ at unexec %D/etc/rc.d/bnetd.sh stop > /dev/null 2>&1 || true
+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
+%%WITH_D2%%etc/pvpgn/d2cs.conf-sample
+%%WITH_D2%%etc/pvpgn/d2dbs.conf-sample
+%%WITH_D2%%etc/pvpgn/d2server.ini-sample
+etc/pvpgn/news.txt-sample
+etc/pvpgn/realm.conf-sample
+etc/pvpgn/sql_DB_layout.conf-sample
+etc/pvpgn/sql_DB_layout2.conf-sample
+etc/pvpgn/supportfile.conf-sample
+etc/pvpgn/topics.conf-sample
+etc/pvpgn/tournament.conf-sample
+etc/pvpgn/versioncheck.conf-sample
+sbin/bnetd
+sbin/bntrackd
+%%WITH_D2%%sbin/d2cs
+%%WITH_D2%%sbin/d2dbs
+%%DATADIR%%/files/IX86ver1.mpq
+%%DATADIR%%/files/PMACver1.mpq
+%%DATADIR%%/files/WAR3IX86.mpq
+%%DATADIR%%/files/XMACver1.mpq
+%%DATADIR%%/files/ad000001.mng
+%%DATADIR%%/files/ad000001.smk
+%%DATADIR%%/files/ad000004.mng
+%%DATADIR%%/files/bnserver-D2DV.ini
+%%DATADIR%%/files/bnserver-D2XP.ini
+%%DATADIR%%/files/bnserver-WAR3.ini
+%%DATADIR%%/files/bnserver.ini
+%%DATADIR%%/files/chathelp-war3-default.txt
+%%DATADIR%%/files/chathelp-war3-enUS.txt
+%%DATADIR%%/files/chathelp-war3-frFR.txt
+%%DATADIR%%/files/chathelp-war3-ruRU.txt
+%%DATADIR%%/files/chathelp-war3-zhCN.txt
+%%DATADIR%%/files/icons-WAR3.bni
+%%DATADIR%%/files/icons.bni
+%%DATADIR%%/files/icons_STAR.bni
+%%DATADIR%%/files/matchmaking-war3-default.dat
+%%DATADIR%%/files/matchmaking-war3-enUS.dat
+%%DATADIR%%/files/newaccount-default.txt
+%%DATADIR%%/files/newaccount-enUS.txt
+%%DATADIR%%/files/newbie.save
+%%DATADIR%%/files/termsofservice-default.txt
+%%DATADIR%%/files/termsofservice-enUS.txt
+%%DATADIR%%/files/tos-unicode_BRA.txt
+%%DATADIR%%/files/tos-unicode_CHI.txt
+%%DATADIR%%/files/tos-unicode_DEU.txt
+%%DATADIR%%/files/tos-unicode_ENU.txt
+%%DATADIR%%/files/tos-unicode_ESP.txt
+%%DATADIR%%/files/tos-unicode_FRA.txt
+%%DATADIR%%/files/tos-unicode_HAN.txt
+%%DATADIR%%/files/tos-unicode_ITA.txt
+%%DATADIR%%/files/tos-unicode_JPN.txt
+%%DATADIR%%/files/tos-unicode_KOR.txt
+%%DATADIR%%/files/tos-unicode_POL.txt
+%%DATADIR%%/files/tos-unicode_POR.txt
+%%DATADIR%%/files/tos-unicode_RUS.txt
+%%DATADIR%%/files/tos-unicode_SIN.txt
+%%DATADIR%%/files/tos-unicode_USA.txt
+%%DATADIR%%/files/tos.txt
+%%DATADIR%%/files/tos_BRA.txt
+%%DATADIR%%/files/tos_CHI.txt
+%%DATADIR%%/files/tos_DEU.txt
+%%DATADIR%%/files/tos_ENU.txt
+%%DATADIR%%/files/tos_ESP.txt
+%%DATADIR%%/files/tos_FRA.txt
+%%DATADIR%%/files/tos_HAN.txt
+%%DATADIR%%/files/tos_ITA.txt
+%%DATADIR%%/files/tos_JPN.txt
+%%DATADIR%%/files/tos_KOR.txt
+%%DATADIR%%/files/tos_POL.txt
+%%DATADIR%%/files/tos_POR.txt
+%%DATADIR%%/files/tos_RUS.txt
+%%DATADIR%%/files/tos_SIN.txt
+%%DATADIR%%/files/tos_USA.txt
+ at dirrm %%DATADIR%%/bak/charinfo
+ at dirrm %%DATADIR%%/bak/charsave
+ at dirrm %%DATADIR%%/bak
+ at dirrm %%DATADIR%%/bnmail
+ at dirrm %%DATADIR%%/chanlogs
+ at dirrm %%DATADIR%%/charinfo
+ at dirrm %%DATADIR%%/charsave
+ at dirrm %%DATADIR%%/clans
+ at dirrm %%DATADIR%%/files
+ at dirrm %%DATADIR%%/ladders
+ at dirrm %%DATADIR%%/reports
+ at dirrm %%DATADIR%%/status
+ at dirrm %%DATADIR%%/teams
+ at dirrm %%DATADIR%%/users
+ at dirrm %%DATADIR%%/userscdb
+ at dirrmtry %%DATADIR%%
+ at dirrm etc/pvpgn
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
--- /dev/null
+++ 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
--- /dev/null
+++ games/pvpgn/Makefile
@@ -0,0 +1,108 @@
+# New ports collection makefile for:	pvpgn
+# Date created:				19 January 2005
+# Whom:					mek
+#
+# $FreeBSD: ports/games/pvpgn/Makefile,v 1.12 2008/05/30 15:42:54 miwi Exp $
+# $MidnightBSD: mports/games/pvpgn/Makefile,v 1.1 2008/05/30 20:06:34 crash Exp $
+
+PORTNAME=	pvpgn
+PORTVERSION=	1.8.2
+CATEGORIES=	games
+MASTER_SITES=	${MASTER_SITE_BERLIOS}
+MASTER_SITE_SUBDIR=	pvpgn
+DISTFILES=	${EXTRACT_ONLY} pvpgn-support-1.0.tar.gz
+DIST_SUBDIR=	pvpgn
+EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	Free Blizzard Battle.net emulation software
+LICENSE=        gpl2
+PKGINSTALL?=	${WRKDIR}/pkg-install
+PKGDEINSTALL?=	${WRKDIR}/pkg-deinstall
+USE_BZIP2=	yes
+USE_GMAKE=	yes
+SED_SCRIPT=	-e 's|%%PREFIX%%|${PREFIX}|g'
+
+RC_DIR=		${PREFIX}/etc/rc.d
+RC_SUFX=	.sh
+SED_SCRIPT+=	-e 's|%%RC_DIR%%|${RC_DIR}|g' \
+		-e 's|%%RC_SUFX%%|${RC_SUFX}|g'
+
+PLIST_SUB+=	RC_SUFX=${RC_SUFX}
+
+WRKSRC=		${WRKDIR}/${DISTNAME}/src
+
+GNU_CONFIGURE=	yes
+CONFIGURE_ARGS=	--sysconfdir=${PREFIX}/etc/pvpgn \
+		--localstatedir=${DATADIR} \
+		--with-libraries=${LOCALBASE}/lib
+
+USE_RC_SUBR=	bnetd.sh
+
+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
+
+OPTIONS=	MYSQL "Include MySQL user accounts support" off \
+		PGSQL "Include PostgreSQL user accounts support" off \
+		SQLITE3 "Include SQLite3 user accounts support" off \
+		D2 "Enable Diablo II server (D2CS/D2DBS)" on
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_MYSQL)
+USE_MYSQL=	yes
+CONFIGURE_ARGS+=--with-mysql
+.endif
+
+.if defined(WITH_PGSQL)
+USE_PGSQL=	yes
+CONFIGURE_ARGS+=--with-pgsql
+.endif
+
+.if defined(WITH_SQLITE3)
+USE_SQLITE=	3
+CONFIGURE_ARGS+=--with-sqlite3
+.endif
+
+.if defined(WITHOUT_D2)
+CONFIGURE_ARGS+=	--disable-d2cs --disable-d2dbs
+PLIST_SUB+=	WITH_D2="@comment "
+.else
+PLIST_SUB+=	WITH_D2=""
+.endif
+
+## support files
+
+SUPPORT_SUFFX=	.tar.gz
+SUPPORT_FILES=	pvpgn-support-1.0
+
+post-extract:
+	@${MKDIR} ${WRKSRC}/${SUPPORT_FILES}
+	@${TAR} -C ${WRKSRC} -xzf ${DISTDIR}/${DIST_SUBDIR}/${SUPPORT_FILES}${SUPPORT_SUFFX}
+
+post-build:
+	@${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:
+	@${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.post.mk>
--- /dev/null
+++ games/pvpgn/distinfo
@@ -0,0 +1,6 @@
+MD5 (pvpgn/pvpgn-1.8.2.tar.bz2) = 66a444c15c27f3d165016e1b38b2aa08
+SHA256 (pvpgn/pvpgn-1.8.2.tar.bz2) = 4c12f839854c05f0b1bde7b5ca1379bd6b2d38bc418e84527409ed695fdb058a
+SIZE (pvpgn/pvpgn-1.8.2.tar.bz2) = 998996
+MD5 (pvpgn/pvpgn-support-1.0.tar.gz) = 8ba36144ea3a7efe200536c142bb7886
+SHA256 (pvpgn/pvpgn-support-1.0.tar.gz) = f2f832fd6265ae20239fdaa70498ee6bf922020172f47389520e656a3babff2d
+SIZE (pvpgn/pvpgn-support-1.0.tar.gz) = 126047
--- /dev/null
+++ games/pvpgn/files/patch-Makefile.in
@@ -0,0 +1,13 @@
+--- Makefile.in.orig	Tue Apr 26 10:28:10 2005
++++ Makefile.in	Fri May 20 00:47:48 2005
+@@ -669,8 +669,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
+ 
--- /dev/null
+++ games/pvpgn/files/patch-conf-bnetd.conf.in
@@ -0,0 +1,48 @@
+--- ../conf/bnetd.conf.in.old	Sun Dec 11 00:18:18 2005
++++ ../conf/bnetd.conf.in	Sun Dec 11 00:20:44 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
+@@ -88,14 +88,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/pvpgn/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/pvpgn/bnetd.pid
+ ladderdir   = /usr/local/var/ladders
+ command_groups_file = /usr/local/etc/command_groups.conf
+ tournament_file = /usr/local/etc/tournament.conf
+@@ -125,7 +125,7 @@
+ #   warn
+ #   error
+ #   fatal
+-loglevels = fatal,error,warn,info,debug,trace
++loglevels = fatal,error,warn
+ #loglevels = fatal,error,warn,info
+ 
+ #                                                                            #
+@@ -313,7 +313,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 
--- /dev/null
+++ games/pvpgn/files/bnetd.sh.in
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# $FreeBSD: ports/games/pvpgn/files/bnetd.sh.in,v 1.2 2007/08/30 01:39:29 rafan Exp $
+#
+
+# PROVIDE: bnetd
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: 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
+}
+
+load_rc_config $name
+
+: ${bnetd_enable="NO"}
+: ${bnetd_flags=""}
+
+run_rc_command "$1"


More information about the Midnightbsd-cvs mailing list