Contents of /trunk/include/xfce.sminc
Parent Directory | Revision Log
Revision 5721 -
(show annotations)
(download)
Sat Aug 7 12:43:36 2010 UTC (14 years, 1 month ago) by niro
Original Path: trunk/core/include/xfce.sminc
File size: 2500 byte(s)
Sat Aug 7 12:43:36 2010 UTC (14 years, 1 month ago) by niro
Original Path: trunk/core/include/xfce.sminc
File size: 2500 byte(s)
-pre-define html and libexec dir
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 | |
41 | xfce_configure \ |
42 | --libexecdir=/usr/$(mlibdir)/${PNAME} \ |
43 | --with-html-dir=/usr/share/doc/${PNAME}-${PVER}/html \ |
44 | --disable-debug \ |
45 | --disable-static \ |
46 | || die |
47 | |
48 | mmake ${XFCE_MAKE_OPTS} || die |
49 | } |
50 | |
51 | xfce_src_install() |
52 | { |
53 | cd ${SRCDIR} |
54 | mmake DESTDIR=${BINDIR} ${XFCE_MAKE_OPTS} install || die |
55 | |
56 | local i |
57 | for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ |
58 | FAQ LICENSE NEWS README TODO |
59 | do |
60 | if [ -f ${SRCDIR}/${i} ] |
61 | then |
62 | minstalldocs ${i} || die |
63 | fi |
64 | done |
65 | } |
66 | |
67 | xfce_update_desktop_db() |
68 | { |
69 | # update desktop db |
70 | if [ -x ${MROOT}/usr/bin/update-desktop-database ] |
71 | then |
72 | echo "Updating desktop mime database ..." |
73 | ${MROOT}/usr/bin/update-desktop-database -q ${MROOT}/usr/share/applications |
74 | fi |
75 | } |
76 | |
77 | xfce_update_mime_db() |
78 | { |
79 | # update mime db |
80 | if [ -x ${MROOT}/usr/bin/update-mime-database ] |
81 | then |
82 | echo "Updating shared mime info database ..." |
83 | ${MROOT}/usr/bin/update-mime-database ${MROOT}/usr/share/mime |
84 | fi |
85 | } |
86 | |
87 | xfce_update_icon_cache() |
88 | { |
89 | if [ -x ${MROOT}/usr/bin/gtk-update-icon-cache ] |
90 | then |
91 | pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null |
92 | local icons=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null) |
93 | popd &> /dev/null |
94 | |
95 | # abort here, if no icons where found |
96 | [[ -z ${icons} ]] && return |
97 | |
98 | echo "Updating icons cache ..." |
99 | local i |
100 | for i in ${icons} |
101 | do |
102 | if [[ -f ${MROOT}/${i}/index.theme ]] |
103 | then |
104 | ${MROOT}/usr/bin/gtk-update-icon-cache -qf ${MROOT}/${i} |
105 | fi |
106 | done |
107 | fi |
108 | } |
109 | |
110 | xfce_postinstall() |
111 | { |
112 | xfce_update_desktop_db |
113 | xfce_update_mime_db |
114 | xfce_update_icon_cache |
115 | } |
116 | |
117 | xfce_postremove() |
118 | { |
119 | xfce_update_desktop_db |
120 | xfce_update_mime_db |
121 | xfce_update_icon_cache |
122 | } |
123 | |
124 | export_inherits xfce src_prepare src_compile src_install postinstall postremove |