You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
101 lines
2.4 KiB
101 lines
2.4 KiB
3 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
10 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
3 years ago
|
EAPI=7
|
||
|
|
||
|
inherit toolchain-funcs
|
||
10 years ago
|
|
||
|
SUPPORTP="${PN}-support-1.3"
|
||
|
DESCRIPTION="A gaming server for Battle.Net compatible clients"
|
||
8 years ago
|
HOMEPAGE="https://sourceforge.net/projects/pvpgn.berlios/"
|
||
10 years ago
|
SRC_URI="mirror://sourceforge/pvpgn.berlios/${PN}-${PV/_/}.tar.bz2
|
||
|
mirror://sourceforge/pvpgn.berlios/${SUPPORTP}.tar.gz"
|
||
|
|
||
|
LICENSE="GPL-2"
|
||
|
SLOT="0"
|
||
7 years ago
|
KEYWORDS="~amd64 ~x86"
|
||
10 years ago
|
IUSE="mysql postgres"
|
||
|
|
||
3 years ago
|
DEPEND="
|
||
|
mysql? ( dev-db/mysql-connector-c:0= )
|
||
|
postgres? ( dev-db/postgresql:*[server] )
|
||
|
"
|
||
|
RDEPEND="
|
||
|
${DEPEND}
|
||
|
acct-user/pvpgn
|
||
|
acct-group/pvpgn
|
||
|
"
|
||
10 years ago
|
|
||
3 years ago
|
PATCHES=(
|
||
|
"${FILESDIR}"/${P}-fhs.patch
|
||
|
)
|
||
10 years ago
|
|
||
|
src_configure() {
|
||
3 years ago
|
cd src || die
|
||
|
|
||
|
tc-export CC
|
||
|
# Was: "everything in GAMES_BINDIR (bug #63071)"
|
||
|
# Not anymore.
|
||
|
econf \
|
||
|
--sbindir="/usr/bin" \
|
||
10 years ago
|
$(use_with mysql) \
|
||
|
$(use_with postgres pgsql)
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
emake -C src
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
local f
|
||
|
|
||
|
dodoc README README.DEV CREDITS BUGS TODO UPDATE version-history.txt
|
||
|
docinto docs
|
||
|
dodoc docs/*
|
||
|
|
||
|
emake -C src DESTDIR="${D}" install
|
||
|
|
||
3 years ago
|
insinto /usr/share/${PN}
|
||
10 years ago
|
doins "${WORKDIR}/${SUPPORTP}/"*
|
||
|
|
||
3 years ago
|
# Was: "GAMES_USER_DED here instead of GAMES_USER (bug #65423)"
|
||
10 years ago
|
for f in bnetd d2cs d2dbs ; do
|
||
|
newinitd "${FILESDIR}/${PN}.rc" ${f}
|
||
3 years ago
|
|
||
10 years ago
|
sed -i \
|
||
|
-e "s:NAME:${f}:g" \
|
||
3 years ago
|
-e "s:GAMES_BINDIR:/usr/bin:g" \
|
||
|
-e "s:GAMES_USER:pvpgn:g" \
|
||
|
-e "s:GAMES_GROUP:pvpgn:g" \
|
||
|
"${D}/etc/${PN}/${f}.conf" \
|
||
10 years ago
|
"${D}/etc/init.d/${f}" || die
|
||
|
done
|
||
|
|
||
3 years ago
|
keepdir $(find "${ED}/var/lib"/${PN} -type d -printf "/var/lib/${PN}/%P ") /var/lib/${PN}/log
|
||
10 years ago
|
|
||
3 years ago
|
chown -R pvpgn:pvpgn "${ED}/var/lib/${PN}" || die
|
||
|
fperms 0775 "/var/lib/${PN}/log"
|
||
|
fperms 0770 "/var/lib/${PN}"
|
||
10 years ago
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
elog "If this is a first installation you need to configure the package by"
|
||
3 years ago
|
elog "editing the configuration files provided in /etc/${PN}"
|
||
10 years ago
|
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."
|
||
3 years ago
|
|
||
10 years ago
|
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
|
||
3 years ago
|
|
||
10 years ago
|
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
|
||
|
}
|