mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-23 23:27:12 -08:00
games-server/pvpgn: add 1.99.7.2.1
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
DIST pvpgn-1.8.5.tar.bz2 982931 BLAKE2B 73c84278c5a7a13b781541f49a77af45d05950f0e378237ec0bfce3b4a55a94f91cfc2f994f56046e76c3dfb5d390427ee9cecbc21d1da048d2c503bfa21cf7b SHA512 7cbe141efe03efa4ce0fc1cc3b4e15afe2e85e3c83a27afdf36fec9e2dadf1c7b9aca1773e6a3e6566b62f5a7999cc040c9517786ca70eeb70f86eea84e9218e
|
||||
DIST pvpgn-1.99.7.2.1.tar.gz 1515818 BLAKE2B b4f5017b58e91785b199b700ced9e54bc7d953f2fe12696c931d44e5cad93f86eb77cff8fdc429e7d033f19d93ae895c192ce4c5a73beb7812c2f27f94bbeaf3 SHA512 b3b042c739b15b8460d9e0da1ed9f1fb6fb2db39046a23d7d30290b47b31e41de6c152023f0ab6dd92ce0c7b7483e6933509bda216cb0cb1260b5eed0bc874dd
|
||||
DIST pvpgn-support-1.3.tar.gz 123805 BLAKE2B dc051265c6d4c5a2ab69379f7ac4a57f402d25e8898020217f2ae5f12cb2ca4db860df47efe38ed6494eb040cbd52a7ed495bc3dab59c9e9e48a8e1386500d6e SHA512 9002fcdb7da92e84af97319b9f1e38f5cf97466aef88549b1fe81b9070643f321011adf674424e2c4acc22f847c7fc61ca2cbf2da0223842e9b9e6c8f1427d76
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
--- a/cmake/Modules/DefineInstallationPaths.cmake
|
||||
+++ b/cmake/Modules/DefineInstallationPaths.cmake
|
||||
@@ -37,8 +37,8 @@
|
||||
)
|
||||
else()
|
||||
SET(LOCALSTATE_INSTALL_DIR
|
||||
- "${EXEC_INSTALL_PREFIX}/var/${APPLICATION_NAME}"
|
||||
- CACHE PATH "The ${APPLICATION_NAME} local state install dir (default prefix/var)"
|
||||
+ "/var/${APPLICATION_NAME}"
|
||||
+ CACHE PATH "The ${APPLICATION_NAME} local state install dir (default /var)"
|
||||
FORCE
|
||||
)
|
||||
endif()
|
||||
@@ -75,4 +75,4 @@
|
||||
CACHE PATH "The ${APPLICATION_NAME} sysconfig install dir (default prefix/etc)"
|
||||
FORCE
|
||||
)
|
||||
-endif()
|
||||
\ No newline at end of file
|
||||
+endif()
|
||||
--- a/cmake/Modules/DefineInstallationPaths.cmake
|
||||
+++ b/cmake/Modules/DefineInstallationPaths.cmake
|
||||
@@ -71,8 +71,8 @@
|
||||
)
|
||||
else()
|
||||
SET(SYSCONF_INSTALL_DIR
|
||||
- "${EXEC_INSTALL_PREFIX}/etc/${APPLICATION_NAME}"
|
||||
- CACHE PATH "The ${APPLICATION_NAME} sysconfig install dir (default prefix/etc)"
|
||||
+ "/etc/${APPLICATION_NAME}"
|
||||
+ CACHE PATH "The ${APPLICATION_NAME} sysconfig install dir (default /etc)"
|
||||
FORCE
|
||||
)
|
||||
endif()
|
||||
@@ -0,0 +1,109 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit cmake toolchain-funcs
|
||||
|
||||
SUPPORTP="${PN}-support-1.3"
|
||||
DESCRIPTION="A gaming server for Battle.Net compatible clients"
|
||||
HOMEPAGE="https://pvpgn.pro"
|
||||
SRC_URI="https://github.com/pvpgn/pvpgn-server/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-server-${PV}"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="mysql odbc postgres sqlite"
|
||||
|
||||
DEPEND="
|
||||
mysql? ( dev-db/mysql-connector-c:0= )
|
||||
odbc? ( dev-db/libiodbc )
|
||||
postgres? ( dev-db/postgresql[server] )
|
||||
sqlite? ( dev-db/sqlite )
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
acct-user/pvpgn
|
||||
acct-group/pvpgn
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
#"${FILESDIR}"/${PN}-1.8.5-fhs.patch
|
||||
"${FILESDIR}"/${PN}-1.99.7.2.1-path.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
sed -i \
|
||||
-e 's/-O3 -march=native -mtune=native//' \
|
||||
-e 's/-stdlib=libc++//' \
|
||||
CMakeLists.txt || die
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-export CC
|
||||
|
||||
local mycmakeargs=(
|
||||
-DWITH_MYSQL=$(usex mysql)
|
||||
-DWITH_ODBC=$(usex odbc)
|
||||
-DWITH_PGSQL=$(usex postgres)
|
||||
-DWITH_SQLITE3=$(usex sqlite)
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local f
|
||||
|
||||
cmake_src_install
|
||||
|
||||
dolib.so "${BUILD_DIR}"/src/compat/libcompat.so
|
||||
dolib.so "${BUILD_DIR}"/src/common/libcommon.so
|
||||
|
||||
# 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:/usr/bin:g" \
|
||||
-e "s:GAMES_USER:pvpgn:g" \
|
||||
-e "s:GAMES_GROUP:pvpgn:g" \
|
||||
"${ED}/etc/${PN}/${f}.conf" \
|
||||
"${ED}/etc/init.d/${f}" || die
|
||||
done
|
||||
|
||||
keepdir $(find "${ED}/var/lib"/${PN} -type d -printf "/var/lib/${PN}/%P ") /var/lib/${PN}/log
|
||||
|
||||
keepdir /var/pvpgn/{bnmail,chanlogs,charinfo,charsave,clans,ladders}
|
||||
keepdir /var/pvpgn/{reports,status,teams,userlogs,users,userscdb}
|
||||
keepdir /var/pvpgn/bak/char{info,save}
|
||||
|
||||
chown -R pvpgn:pvpgn "${ED}/var/lib/${PN}" || die
|
||||
fperms 0775 "/var/lib/${PN}/log"
|
||||
fperms 0770 "/var/lib/${PN}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "If this is a first installation you need to configure the package by"
|
||||
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"
|
||||
elog "bnetd.conf to use it. Read README.storage from the docs directory."
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user