Contents of /branches/magellan-next/include/xfce.sminc
Parent Directory | Revision Log
Revision 5716 -
(show annotations)
(download)
Sat Aug 7 12:21:04 2010 UTC (14 years, 1 month ago) by niro
Original Path: trunk/core/include/xfce.sminc
File size: 2387 byte(s)
Sat Aug 7 12:21:04 2010 UTC (14 years, 1 month ago) by niro
Original Path: trunk/core/include/xfce.sminc
File size: 2387 byte(s)
-fixed missing functions
1 | # $Id$ |
2 | |
3 | : ${PCATEGORIE="xfce-base"} |
4 | : ${HOMEPAGE="http://www.xfce.org/"} |
5 | |
6 | : ${SRCFILE="${PNAME}-${PVER}.tar.bz2"} |
7 | : ${SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"} |
8 | |
9 | SDEPEND="${SDEPEND} |
10 | >= dev-util/pkgconfig-0.23 |
11 | >= dev-util/intltool-0.40 |
12 | >= sys-dev/gettext-0.17" |
13 | |
14 | sminclude mtools |
15 | |
16 | # default SRC_URIs |
17 | SRC_URI=( |
18 | ${SRC_URI[*]} |
19 | http://mocha.xfce.org/archive/src/xfce/${PNAME}/${PVER%.*}/${SRCFILE} |
20 | mirror://${PNAME}/${SRCFILE} |
21 | ) |
22 | |
23 | # special functions needed by postinstall|postremove |
24 | SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} xfce_update_desktop_db xfce_update_mime_db xfce_update_icon_cache xfce_postinstall xfce_postremove" |
25 | |
26 | xfce_configure() |
27 | { |
28 | local configure_opts="$@" |
29 | mconfigure ${configure_opts} || die |
30 | } |
31 | |
32 | xfce_src_prepare() |
33 | { |
34 | munpack ${SRCFILE} || die |
35 | } |
36 | |
37 | xfce_src_compile() |
38 | { |
39 | cd ${SRCDIR} |
40 | xfce_configure --disable-debug --disable-static || die |
41 | mmake ${XFCE_MAKE_OPTS} || die |
42 | } |
43 | |
44 | xfce_src_install() |
45 | { |
46 | cd ${SRCDIR} |
47 | mmake DESTDIR=${BINDIR} ${XFCE_MAKE_OPTS} install || die |
48 | |
49 | local i |
50 | for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ |
51 | FAQ LICENSE NEWS README TODO |
52 | do |
53 | if [ -f ${SRCDIR}/${i} ] |
54 | then |
55 | minstalldocs ${i} || die |
56 | fi |
57 | done |
58 | } |
59 | |
60 | xfce_update_desktop_db() |
61 | { |
62 | # update desktop db |
63 | if [ -x ${MROOT}/usr/bin/update-desktop-database ] |
64 | then |
65 | echo "Updating desktop mime database ..." |
66 | ${MROOT}/usr/bin/update-desktop-database -q ${MROOT}/usr/share/applications |
67 | fi |
68 | } |
69 | |
70 | xfce_update_mime_db() |
71 | { |
72 | # update mime db |
73 | if [ -x ${MROOT}/usr/bin/update-mime-database ] |
74 | then |
75 | echo "Updating shared mime info database ..." |
76 | ${MROOT}/usr/bin/update-mime-database ${MROOT}/usr/share/mime |
77 | fi |
78 | } |
79 | |
80 | xfce_update_icon_cache() |
81 | { |
82 | if [ -x ${MROOT}/usr/bin/gtk-update-icon-cache ] |
83 | then |
84 | pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null |
85 | local icons=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null) |
86 | popd &> /dev/null |
87 | |
88 | # abort here, if no icons where found |
89 | [[ -z ${icons} ]] && return |
90 | |
91 | echo "Updating icons cache ..." |
92 | local i |
93 | for i in ${icons} |
94 | do |
95 | if [[ -f ${MROOT}/${i}/index.theme ]] |
96 | then |
97 | ${MROOT}/usr/bin/gtk-update-icon-cache -qf ${MROOT}/${i} |
98 | fi |
99 | done |
100 | fi |
101 | } |
102 | |
103 | xfce_postinstall() |
104 | { |
105 | xfce_update_desktop_db |
106 | xfce_update_mime_db |
107 | xfce_update_icon_cache |
108 | } |
109 | |
110 | xfce_postremove() |
111 | { |
112 | xfce_update_desktop_db |
113 | xfce_update_mime_db |
114 | xfce_update_icon_cache |
115 | } |
116 | |
117 | export_inherits xfce src_prepare src_compile src_install postinstall postremove |