aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorJohan van Selst <johans@FreeBSD.org>2009-12-28 11:38:27 +0000
committerJohan van Selst <johans@FreeBSD.org>2009-12-28 11:38:27 +0000
commita192845d71e15566d5e13b66ff29f91d61155cd1 (patch)
tree00d69127074d600e099b562d9fdd41b04b45d506 /games
parent182a9250bb723dedc8d8e1bfbcff8467569f3c92 (diff)
downloadports-a192845d71e15566d5e13b66ff29f91d61155cd1.tar.gz
ports-a192845d71e15566d5e13b66ff29f91d61155cd1.zip
Notes
Diffstat (limited to 'games')
-rw-r--r--games/wolfpack/Makefile18
-rw-r--r--games/wolfpack/distinfo6
-rw-r--r--games/wolfpack/pkg-deinstall41
-rw-r--r--games/wolfpack/pkg-install52
-rw-r--r--games/wolfpack/pkg-plist6
5 files changed, 17 insertions, 106 deletions
diff --git a/games/wolfpack/Makefile b/games/wolfpack/Makefile
index 26243d2ffb50..28fc5cb4dadc 100644
--- a/games/wolfpack/Makefile
+++ b/games/wolfpack/Makefile
@@ -6,9 +6,10 @@
#
PORTNAME= wolfpack
-PORTVERSION= 4.3.22
+PORTVERSION= 4.3.23
CATEGORIES= games
-MASTER_SITES= SF/empserver/empserver/Empire%20Server%20v${PORTVERSION}
+MASTER_SITES= SF
+MASTER_SITE_SUBDIR= empserver/${DISTNAME}
DISTNAME= empire-${PORTVERSION}
MAINTAINER= johans@stack.nl
@@ -19,8 +20,12 @@ USE_GMAKE= yes
USE_PERL5_BUILD= yes
GNU_CONFIGURE= yes
BINDIR= ${PREFIX}/lib/${PORTNAME}
+VARDIR= ${PREFIX}/var/${PORTNAME}
CONFIGURE_ARGS+= --bindir=${BINDIR} --sbindir=${BINDIR}
+USERS= wolfpack
+GROUPS= wolfpack
+
USE_RC_SUBR= wolfpack
SUB_FILES+= pkg-message
@@ -37,16 +42,13 @@ post-patch:
${WRKSRC}/src/lib/lwp/lwpint.h
.endif
-pre-install:
- @${SETENV} PKG_PREFIX=${PREFIX} \
- ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
-
post-install:
@${INSTALL_DATA} ${WRKSRC}/README ${DATADIR}
@${LN} -s ${BINDIR}/emp_server ${PREFIX}/bin/emp_server
@${LN} -s ${BINDIR}/empire ${PREFIX}/bin/emp_client
- @${SETENV} PKG_PREFIX=${PREFIX} \
- ${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
+ @${PREFIX}/lib/wolfpack/pconfig > ${ETCDIR}/econfig.orig
+ @${CHOWN} -R ${USERS}:${GROUPS} ${DATADIR} ${ETCDIR} ${VARDIR}
+ @${CHMOD} -R u+w,o-rx ${DATADIR} ${ETCDIR} ${VARDIR}
@${CAT} ${WRKDIR}/pkg-message
.include <bsd.port.post.mk>
diff --git a/games/wolfpack/distinfo b/games/wolfpack/distinfo
index c50e0427cb3c..46bef626e6db 100644
--- a/games/wolfpack/distinfo
+++ b/games/wolfpack/distinfo
@@ -1,3 +1,3 @@
-MD5 (empire-4.3.22.tar.gz) = 23202ed6eb9966ec936223fbbe1c292e
-SHA256 (empire-4.3.22.tar.gz) = 6159c14befa537da12bb6b6cc4bef8d214d5bb9f58786b55e86b42ceeb610428
-SIZE (empire-4.3.22.tar.gz) = 1159697
+MD5 (empire-4.3.23.tar.gz) = 6d8a34373113926142fd317747fa4468
+SHA256 (empire-4.3.23.tar.gz) = 802ab34db394fb3416a513a16e98e446ca36710bbd623d44c9f0f66ed8c41fb0
+SIZE (empire-4.3.23.tar.gz) = 1153047
diff --git a/games/wolfpack/pkg-deinstall b/games/wolfpack/pkg-deinstall
deleted file mode 100644
index 6baf72fdb36f..000000000000
--- a/games/wolfpack/pkg-deinstall
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /bin/sh
-
-PATH=/bin:/usr/bin:/usr/sbin
-INSTDIR=${PKG_PREFIX}/share/wolfpack
-DATADIR=${PKG_PREFIX}/var/wolfpack
-CONFDIR=${PKG_PREFIX}/etc/wolfpack
-
-USER=wolfpack
-GROUP=${USER}
-
-case $2 in
-DEINSTALL)
- if cmp -s ${CONFDIR}/econfig ${CONFDIR}/econfig.orig; then
- rm -f ${CONFDIR}/econfig
- fi
- ;;
-
-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-install b/games/wolfpack/pkg-install
deleted file mode 100644
index af7219a5803a..000000000000
--- a/games/wolfpack/pkg-install
+++ /dev/null
@@ -1,52 +0,0 @@
-#! /bin/sh
-
-PATH=/bin:/usr/bin:/usr/sbin
-INSTDIR=${PKG_PREFIX}/share/wolfpack
-DATADIR=${PKG_PREFIX}/var/wolfpack
-CONFDIR=${PKG_PREFIX}/etc/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 "Wolfpack Empire 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)
- mkdir -p ${DATADIR}
- ${PKG_PREFIX}/lib/wolfpack/pconfig > ${CONFDIR}/econfig.orig
- if [ ! -f ${CONFDIR}/econfig ] ; then
- cp -p ${CONFDIR}/econfig.orig ${CONFDIR}/econfig
- fi
- chown -R ${USER}:${GROUP} ${INSTDIR} ${DATADIR} ${CONFDIR}
- chmod -R u+w,o-rx ${INSTDIR} ${DATADIR} ${CONFDIR}
- ;;
-esac
diff --git a/games/wolfpack/pkg-plist b/games/wolfpack/pkg-plist
index 243ceac42c4c..12fcc7be9665 100644
--- a/games/wolfpack/pkg-plist
+++ b/games/wolfpack/pkg-plist
@@ -7,8 +7,6 @@ lib/wolfpack/empsched
lib/wolfpack/pconfig
lib/wolfpack/files
lib/wolfpack/fairland
-etc/wolfpack/econfig.orig
-etc/wolfpack/schedule
%%DATADIR%%/README
%%DATADIR%%/builtin/infra.config
%%DATADIR%%/builtin/item.config
@@ -297,6 +295,10 @@ etc/wolfpack/schedule
%%DATADIR%%/info.nr/work
%%DATADIR%%/info.nr/xdump
%%DATADIR%%/info.nr/zdone
+etc/wolfpack/schedule
+@unexec if cmp -s %B/econfig.orig %B/econfig; then rm -f %B/econfig; fi
+etc/wolfpack/econfig.orig
+@exec if [ ! -f %B/econfig ] ; then cp -p %D/%F %B/econfig; fi
@dirrm %%DATADIR%%/builtin
@dirrm %%DATADIR%%/info.nr
@dirrm %%DATADIR%%