/[gentoo-x86]/eclass/xfconf.eclass
Gentoo

Contents of /eclass/xfconf.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Aug 1 20:08:30 2009 UTC (4 years, 8 months ago) by ssuominen
Branch: MAIN
xfconf.eclass

1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 # @ECLASS: xfconf.eclass
6 # @MAINTAINER:
7 # XFCE maintainers <xfce@gentoo.org>
8 # @BLURB: Default XFCE ebuild layout
9 # @DESCRIPTION:
10 # Default XFCE ebuild layout
11
12 # @ECLASS-VARIABLE: EAUTORECONF
13 # @DESCRIPTION:
14 # Run eautoreconf instead of elibtoolize if set "yes"
15
16 # @ECLASS-VARIABLE: EINTLTOOLIZE
17 # @DESCRIPTION:
18 # Run intltoolize --force --copy --automake if set "yes"
19
20 # @ECLASS-VARIABLE: DOCS
21 # @DESCRIPTION:
22 # Define documentation to install
23
24 # @ECLASS-VARIABLE: PATCHES
25 # @DESCRIPTION:
26 # Define patches to apply
27
28 # @ECLASS-VARIABLE: XFCONF
29 # @DESCRIPTION:
30 # Define options for econf
31
32 inherit autotools base fdo-mime gnome2-utils libtool
33
34 MY_P=${P}
35 SRC_URI="mirror://xfce/xfce-${PV}/src/${MY_P}.tar.bz2"
36
37 if [[ "${EINTLTOOLIZE}" == "yes" ]]; then
38 _xfce4_intltool="dev-util/intltool"
39 fi
40
41 if [[ "${EAUTORECONF}" == "yes" ]]; then
42 _xfce4_m4="dev-util/xfce4-dev-tools"
43 fi
44
45 RDEPEND=""
46 DEPEND="${_xfce4_intltool}
47 ${_xfce4_m4}"
48
49 unset _xfce4_intltool
50 unset _xfce4_m4
51
52 EXPF="src_unpack src_compile src_install pkg_preinst pkg_postinst pkg_postrm"
53 case ${EAPI:-0} in
54 2) EXPF="${EXPF} src_prepare src_configure" ;;
55 1|0) ;;
56 *) die "Unknown EAPI." ;;
57 esac
58 EXPORT_FUNCTIONS ${EXPF}
59
60 # @FUNCTION: xfconf_src_unpack
61 # @DESCRIPTION:
62 # Run base_src_util autopatch and eautoreconf or elibtoolize
63 xfconf_src_unpack() {
64 unpack ${A}
65 cd "${S}"
66 has src_prepare ${EXPF} || xfconf_src_prepare
67 }
68
69 # @FUNCTION: xfconf_src_prepare
70 # @DESCRIPTION:
71 # Run base_src_util autopatch and eautoreconf or elibtoolize
72 xfconf_src_prepare() {
73 base_src_util autopatch
74
75 if [[ "${EINTLTOOLIZE}" == "yes" ]]; then
76 intltoolize --force --copy --automake || die "intltoolize failed"
77 fi
78
79 if [[ "${EAUTORECONF}" == "yes" ]]; then
80 AT_M4DIR="/usr/share/xfce4/dev-tools/m4macros" eautoreconf
81 else
82 elibtoolize
83 fi
84 }
85
86 # @FUNCTION: xfconf_src_configure
87 # @DESCRIPTION:
88 # Run econf with opts in XFCONF variable
89 xfconf_src_configure() {
90 econf ${XFCONF}
91 }
92
93 # @FUNCTION: xfconf_src_compile
94 # @DESCRIPTION:
95 # Run econf with opts in XFCONF variable
96 xfconf_src_compile() {
97 has src_configure ${EXPF} || xfconf_src_configure
98 emake || die "emake failed"
99 }
100
101 # @FUNCTION: xfconf_src_install
102 # @DESCRIPTION:
103 # Run emake install and install documentation in DOCS variable
104 xfconf_src_install() {
105 emake DESTDIR="${D}" install || die "emake install failed"
106
107 if [[ -n ${DOCS} ]]; then
108 dodoc ${DOCS} || die "dodoc failed"
109 fi
110 }
111
112 # @FUNCTION: xfconf_pkg_preinst
113 # @DESCRIPTION:
114 # Run gnome2_icon_savelist
115 xfconf_pkg_preinst() {
116 gnome2_icon_savelist
117 }
118
119 # @FUNCTION: xfconf_pkg_postinst
120 # @DESCRIPTION:
121 # Run fdo-mime_{desktop,mime}_database_update and gnome2_icon_cache_update
122 xfconf_pkg_postinst() {
123 fdo-mime_desktop_database_update
124 fdo-mime_mime_database_update
125 gnome2_icon_cache_update
126 }
127
128 # @FUNCTION: xfconf_pkg_postrm
129 # @DESCRIPTION:
130 # Run fdo-mime_{desktop,mime}_database_update and gnome2_icon_cache_update
131 xfconf_pkg_postrm() {
132 fdo-mime_desktop_database_update
133 fdo-mime_mime_database_update
134 gnome2_icon_cache_update
135 }

  ViewVC Help
Powered by ViewVC 1.1.20