# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id: 0778efd94d9a99a807f266613481f741f9a113f7 $ EAPI=6 inherit autotools desktop user MY_PN="${PN/emilia-/}" MY_P="${MY_PN}-${PV}" DESCRIPTION="SDL OpenGL pinball game" HOMEPAGE="http://pinball.sourceforge.net/ https://github.com/sergiomb2/pinball" SRC_URI="https://github.com/sergiomb2/pinball/archive/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc ~sparc ~x86" IUSE="" # Drop the libtool dep once libltdl goes stable. RDEPEND=" media-libs/libsdl[joystick,opengl,video,X] virtual/opengl || ( dev-libs/libltdl:0 /dev/null || die local scorefile for scorefile in $(find var/games/${MY_PN} -name "highscores") ; do if [[ -f "${EROOT%/}/${scorefile}" ]] ; then chown root:gamestat "${EROOT%/}/${scorefile}" || die chmod 2660 "${EROOT%/}/${scorefile}" || die continue fi mkdir -p "${EROOT%/}/${scorefile%/*}" || die mv "${scorefile}" "${EROOT%/}/${scorefile%/*}" || die done rm -rf var/games/${MY_PN} popd &>/dev/null || die } pkg_postinst() { einfo "Please add your user to the \"gamestat\" group in order to get write access" einfo "to the highscore files." }