Permalink
Browse files

sync live ebuild

  • Loading branch information...
1 parent 13c174a commit c37bec0b282027f205f988002f7b429ecb1fce13 hasufell committed Nov 3, 2012
Showing with 34 additions and 4 deletions.
  1. +34 −4 games-action/minetest/minetest-9999.ebuild
@@ -3,9 +3,9 @@
# $Header: $
EAPI=4
-inherit eutils cmake-utils git-2 gnome2-utils vcs-snapshot games
+inherit eutils cmake-utils git-2 gnome2-utils vcs-snapshot user games
-DESCRIPTION="Building single/multiplayer game similar to Minecraft"
+DESCRIPTION="An InfiniMiner/Minecraft inspired game"
HOMEPAGE="http://c55.me/minetest/"
GIT_REPO_URI="git://github.com/celeron55/${PN}.git"
@@ -33,10 +33,26 @@ DEPEND="${RDEPEND}
>=dev-games/irrlicht-1.7
nls? ( sys-devel/gettext )"
+pkg_setup() {
+ games_pkg_setup
+
+ if use server || use dedicated ; then
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${GAMES_GROUP}
+ fi
+}
+
src_unpack() {
git-2_src_unpack
}
+src_prepare() {
+ # set paths
+ sed \
+ -e "s#@BINDIR@#${GAMES_BINDIR}#g" \
+ -e "s#@GROUP@#${GAMES_GROUP}#g" \
+ "${FILESDIR}"/minetestserver.confd > "${T}"/minetestserver.confd || die
+}
+
src_configure() {
local mycmakeargs=(
-DRUN_IN_PLACE=0
@@ -56,6 +72,12 @@ src_compile() {
src_install() {
cmake-utils_src_install
+
+ if use server || use dedicated ; then
+ newinitd "${FILESDIR}"/minetestserver.initd minetest-server
+ newconfd "${T}"/minetestserver.confd minetest-server
+ fi
+
prepgamesdirs
}
@@ -69,10 +91,18 @@ pkg_postinst() {
gnome2_icon_cache_update
if ! use dedicated ; then
- echo
+ elog
elog "optional dependencies:"
elog " games-action/minetest_game (official mod)"
- echo
+ elog
+ fi
+
+ if use server || use dedicated ; then
+ elog
+ elog "Configure your server via /etc/conf.d/minetest-server"
+ elog "The user \"minetest\" is created with /var/lib/${PN} homedir."
+ elog "Default logfile is ~/minetest-server.log"
+ elog
fi
}

0 comments on commit c37bec0

Please sign in to comment.