eclass: fix various doc errors #537392
[gentoo.git] / eclass / gnome-games.eclass
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 # @ECLASS: gnome-games.eclass
6 # @MAINTAINER:
7 # Gnome team <gnome@gentoo.org>
8 # @AUTHOR:
9 # Author: Pacho Ramos <pacho@gentoo.org>
10 # @BLURB: An eclass to build gnome-games.
11 # @DESCRIPTION:
12 # An eclass to build gnome-games using proper phases from gnome2 and
13 # games eclasses.
14
15 case "${EAPI:-0}" in
16         0|1)
17                 die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
18                 ;;
19         2|3|4|5)
20                 ;;
21         *)
22                 die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
23                 ;;
24 esac
25
26 inherit autotools games gnome2
27
28 EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm
29
30 if [[ ! ${_GNOME_GAMES} ]]; then
31
32 DEPEND=">=dev-util/intltool-0.50.2-r1"
33 RDEPEND="!gnome-extra/gnome-games"
34
35 # @FUNCTION: gnome-games_pkg_setup
36 # @DESCRIPTION:
37 # Set proper phase defaults
38 gnome-games_pkg_setup() {
39         debug-print-function ${FUNCNAME} "${@}"
40         games_pkg_setup
41 }
42
43 # @FUNCTION: gnome-games_src_prepare
44 # @DESCRIPTION:
45 # Set proper phase defaults
46 gnome-games_src_prepare() {
47         debug-print-function ${FUNCNAME} "${@}"
48
49         # Fix intltoolize broken file:
50         # https://bugs.launchpad.net/intltool/+bug/398571
51         intltoolize --force --copy --automake || die "intltoolize failed"
52         eautoreconf
53
54         gnome2_src_prepare
55 }
56
57 # @FUNCTION: gnome-games_src_configure
58 # @DESCRIPTION:
59 # Set proper phase defaults, relying on gnome2_src_configure
60 # and passing extra arguments from egamesconf (games.eclass)
61 gnome-games_src_configure() {
62         debug-print-function ${FUNCNAME} "${@}"
63         gnome2_src_configure \
64                 --prefix="${GAMES_PREFIX}" \
65                 --libdir="$(games_get_libdir)" \
66                 --sysconfdir="${GAMES_SYSCONFDIR}" \
67                 --localstatedir=/var \
68                 --localedir=/usr/share/locale \
69                 "$@"
70 }
71
72 # @FUNCTION: gnome-games_src_compile
73 # @DESCRIPTION:
74 # Set proper phase defaults
75 gnome-games_src_compile() {
76         debug-print-function ${FUNCNAME} "${@}"
77         gnome2_src_compile
78 }
79
80 # @FUNCTION: gnome-games_src_install
81 # @DESCRIPTION:
82 # Set proper phase defaults
83 gnome-games_src_install() {
84         debug-print-function ${FUNCNAME} "${@}"
85         gnome2_src_install
86         prepgamesdirs
87 }
88
89 # @FUNCTION: gnome-games_pkg_preinst
90 # @DESCRIPTION:
91 # Set proper phase defaults
92 gnome-games_pkg_preinst() {
93         debug-print-function ${FUNCNAME} "${@}"
94         gnome2_pkg_preinst
95         games_pkg_preinst
96 }
97
98 # @FUNCTION: gnome-games_pkg_postinst
99 # @DESCRIPTION:
100 # Set proper phase defaults
101 gnome-games_pkg_postinst() {
102         debug-print-function ${FUNCNAME} "${@}"
103         gnome2_pkg_postinst
104         games_pkg_postinst
105 }
106
107 # @FUNCTION: gnome-games_pkg_postrm
108 # @DESCRIPTION:
109 # Set proper phase defaults
110 gnome-games_pkg_postrm() {
111         debug-print-function ${FUNCNAME} "${@}"
112         gnome2_pkg_postrm
113 }
114
115 _GNOME_GAMES=1
116 fi