summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-04-09 20:13:14 +0000
committerSam James <sam@gentoo.org>2021-04-09 20:14:23 +0000
commit507647a276b58fcb7df7ff8ae973ea080e274913 (patch)
tree69f4c377d9e873037d01f78ac1b61cfdc8a167e0 /games-server
parentacct-user/pvpgn: add user pvpgn (285) for games-server/pvpgn (diff)
downloadgentoo-507647a276b58fcb7df7ff8ae973ea080e274913.tar.gz
gentoo-507647a276b58fcb7df7ff8ae973ea080e274913.tar.bz2
gentoo-507647a276b58fcb7df7ff8ae973ea080e274913.zip
games-server/pvpgn: port to EAPI 7, games.eclass--
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-server')
-rw-r--r--games-server/pvpgn/files/pvpgn-1.8.5-fhs.patch20
-rw-r--r--games-server/pvpgn/pvpgn-1.8.5-r3.ebuild (renamed from games-server/pvpgn/pvpgn-1.8.5-r2.ebuild)64
2 files changed, 45 insertions, 39 deletions
diff --git a/games-server/pvpgn/files/pvpgn-1.8.5-fhs.patch b/games-server/pvpgn/files/pvpgn-1.8.5-fhs.patch
index d1450b3ad178..f4238450c414 100644
--- a/games-server/pvpgn/files/pvpgn-1.8.5-fhs.patch
+++ b/games-server/pvpgn/files/pvpgn-1.8.5-fhs.patch
@@ -1,6 +1,5 @@
-diff -ruN pvpgn-1.8.0rc2.orig/conf/bnetd.conf.in pvpgn-1.8.0rc2/conf/bnetd.conf.in
---- pvpgn-1.8.0rc2.orig/conf/bnetd.conf.in 2005-09-19 08:17:50.000000000 -0400
-+++ pvpgn-1.8.0rc2/conf/bnetd.conf.in 2006-08-16 23:34:10.000000000 -0400
+--- a/conf/bnetd.conf.in
++++ b/conf/bnetd.conf.in
@@ -50,22 +50,22 @@
# - "prefix" : prefix to use for all pvpgn tables (default "") #
# #
@@ -94,9 +93,8 @@ diff -ruN pvpgn-1.8.0rc2.orig/conf/bnetd.conf.in pvpgn-1.8.0rc2/conf/bnetd.conf.
fortunecmd = /usr/games/fortune
-diff -ruN pvpgn-1.8.0rc2.orig/conf/d2cs.conf.in pvpgn-1.8.0rc2/conf/d2cs.conf.in
---- pvpgn-1.8.0rc2.orig/conf/d2cs.conf.in 2005-09-29 01:37:33.000000000 -0400
-+++ pvpgn-1.8.0rc2/conf/d2cs.conf.in 2006-08-16 23:35:43.000000000 -0400
+--- a/conf/d2cs.conf.in
++++ b/conf/d2cs.conf.in
@@ -86,16 +86,16 @@
# Use absolute paths in these lines to avoid problems! #
#-------------------------------------------------------------------------------#
@@ -124,9 +122,8 @@ diff -ruN pvpgn-1.8.0rc2.orig/conf/d2cs.conf.in pvpgn-1.8.0rc2/conf/d2cs.conf.in
# #
#################################################################################
-diff -ruN pvpgn-1.8.0rc2.orig/conf/d2dbs.conf.in pvpgn-1.8.0rc2/conf/d2dbs.conf.in
---- pvpgn-1.8.0rc2.orig/conf/d2dbs.conf.in 2005-08-24 23:58:18.000000000 -0400
-+++ pvpgn-1.8.0rc2/conf/d2dbs.conf.in 2006-08-16 23:36:58.000000000 -0400
+--- a/conf/d2dbs.conf.in
++++ b/conf/d2dbs.conf.in
@@ -49,14 +49,14 @@
# File and Path section #
# Use absolute paths in these lines to avoid problems! #
@@ -151,9 +148,8 @@ diff -ruN pvpgn-1.8.0rc2.orig/conf/d2dbs.conf.in pvpgn-1.8.0rc2/conf/d2dbs.conf.
# #
#################################################################################
-diff -ruN pvpgn-1.8.0rc2.orig/src/Makefile.in pvpgn-1.8.0rc2/src/Makefile.in
---- pvpgn-1.8.0rc2.orig/src/Makefile.in 2005-07-29 02:11:38.000000000 +0600
-+++ pvpgn-1.8.0rc2/src/Makefile.in 2005-09-23 15:10:02.968342144 +0600
+--- a/src/Makefile.in
++++ b/src/Makefile.in
@@ -23,22 +23,23 @@
bindir = @bindir@
sbindir = @sbindir@
diff --git a/games-server/pvpgn/pvpgn-1.8.5-r2.ebuild b/games-server/pvpgn/pvpgn-1.8.5-r3.ebuild
index 67ba4ceed177..924ace30c4a3 100644
--- a/games-server/pvpgn/pvpgn-1.8.5-r2.ebuild
+++ b/games-server/pvpgn/pvpgn-1.8.5-r3.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-inherit epatch games
+EAPI=7
+
+inherit toolchain-funcs
SUPPORTP="${PN}-support-1.3"
DESCRIPTION="A gaming server for Battle.Net compatible clients"
@@ -15,19 +16,28 @@ SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="mysql postgres"
-DEPEND="mysql? ( dev-db/mysql-connector-c:0= )
- postgres? ( dev-db/postgresql[server] )"
-RDEPEND=${DEPEND}
+DEPEND="
+ mysql? ( dev-db/mysql-connector-c:0= )
+ postgres? ( dev-db/postgresql[server] )
+"
+RDEPEND="
+ ${DEPEND}
+ acct-user/pvpgn
+ acct-group/pvpgn
+"
-src_prepare() {
- epatch "${FILESDIR}/${P}-fhs.patch"
-}
+PATCHES=(
+ "${FILESDIR}"/${P}-fhs.patch
+)
src_configure() {
- cd src
- # everything in GAMES_BINDIR (bug #63071)
- egamesconf \
- --sbindir="${GAMES_BINDIR}" \
+ cd src || die
+
+ tc-export CC
+ # Was: "everything in GAMES_BINDIR (bug #63071)"
+ # Not anymore.
+ econf \
+ --sbindir="/usr/bin" \
$(use_with mysql) \
$(use_with postgres pgsql)
}
@@ -45,43 +55,43 @@ src_install() {
emake -C src DESTDIR="${D}" install
- insinto "${GAMES_DATADIR}/${PN}"
+ insinto /usr/share/${PN}
doins "${WORKDIR}/${SUPPORTP}/"*
- # GAMES_USER_DED here instead of GAMES_USER (bug #65423)
+ # Was: "GAMES_USER_DED here instead of GAMES_USER (bug #65423)"
for f in bnetd d2cs d2dbs ; do
newinitd "${FILESDIR}/${PN}.rc" ${f}
+
sed -i \
-e "s:NAME:${f}:g" \
- -e "s:GAMES_BINDIR:${GAMES_BINDIR}:g" \
- -e "s:GAMES_USER:${GAMES_USER_DED}:g" \
- -e "s:GAMES_GROUP:${GAMES_GROUP}:g" \
- "${D}/etc/games/${PN}/${f}.conf" \
+ -e "s:GAMES_BINDIR:/usr/bin:g" \
+ -e "s:GAMES_USER:pvpgn:g" \
+ -e "s:GAMES_GROUP:pvpgn:g" \
+ "${D}/etc/${PN}/${f}.conf" \
"${D}/etc/init.d/${f}" || die
done
- keepdir $(find "${D}${GAMES_STATEDIR}"/${PN} -type d -printf "${GAMES_STATEDIR}/${PN}/%P ") "${GAMES_STATEDIR}"/${PN}/log
- prepgamesdirs
+ keepdir $(find "${ED}/var/lib"/${PN} -type d -printf "/var/lib/${PN}/%P ") /var/lib/${PN}/log
- chown -R ${GAMES_USER_DED}:${GAMES_GROUP} "${D}${GAMES_STATEDIR}/${PN}"
- fperms 0775 "${GAMES_STATEDIR}/${PN}/log"
- fperms 0770 "${GAMES_STATEDIR}/${PN}"
+ chown -R pvpgn:pvpgn "${ED}/var/lib/${PN}" || die
+ fperms 0775 "/var/lib/${PN}/log"
+ fperms 0770 "/var/lib/${PN}"
}
pkg_postinst() {
- games_pkg_postinst
-
elog "If this is a first installation you need to configure the package by"
- elog "editing the configuration files provided in ${GAMES_SYSCONFDIR}/${PN}"
+ elog "editing the configuration files provided in /etc/${PN}"
elog "Also you should read the documentation in /usr/share/docs/${PF}"
elog
elog "If you are upgrading you MUST read UPDATE in /usr/share/docs/${PF}"
elog "and update your configuration accordingly."
+
if use mysql ; then
elog
elog "You have enabled MySQL storage support. You will need to edit"
elog "bnetd.conf to use it. Read README.storage from the docs directory."
fi
+
if use postgres ; then
elog
elog "You have enabled PostgreSQL storage support. You will need to edit"