games-envd-0.ebuild 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit multilib games
  5. DESCRIPTION="Environment file for gentoo games"
  6. HOMEPAGE="https://www.gentoo.org/proj/en/desktop/games/index.xml"
  7. SRC_URI=""
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
  11. S=${WORKDIR}
  12. pkg_setup() {
  13. games_pkg_setup
  14. if [[ -z "${REPLACING_VERSIONS}" ]] ; then
  15. if [[ -e "${EROOT%/}/etc/env.d/${GAMES_ENVD}" ]] ; then
  16. einfo "removing ${EROOT%/}/etc/env.d/${GAMES_ENVD}"
  17. rm "${EROOT%/}/etc/env.d/${GAMES_ENVD}" || die
  18. fi
  19. fi
  20. }
  21. src_prepare() {
  22. local d libdirs
  23. for d in $(get_all_libdirs) ; do
  24. libdirs="${libdirs}:${GAMES_PREFIX}/${d}"
  25. done
  26. cat <<-EOF > ${GAMES_ENVD} || die
  27. # if you don't want these added for non-games users
  28. # see https://bugs.gentoo.org/show_bug.cgi?id=408615
  29. LDPATH="${libdirs:1}"
  30. PATH="${GAMES_BINDIR}"
  31. EOF
  32. }
  33. src_configure() { :; }
  34. src_compile() { :; }
  35. src_install() {
  36. doenvd ${GAMES_ENVD}
  37. gamesowners "${ED%/}"/etc/env.d/${GAMES_ENVD}
  38. gamesperms "${ED%/}"/etc/env.d/${GAMES_ENVD}
  39. }
  40. pkg_preinst() { :; }
  41. pkg_postinst() { :; }