Contents of /branches/magellan-next/include/xfce.sminc
Parent Directory | Revision Log
Revision 9385 -
(show annotations)
(download)
Mon Nov 28 19:52:11 2011 UTC (12 years, 10 months ago) by niro
File size: 2861 byte(s)
Mon Nov 28 19:52:11 2011 UTC (12 years, 10 months ago) by niro
File size: 2861 byte(s)
-updated SRC_URIs to individual programs
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 | case ${PNAME} in |
17 | thunar-*-plugin) URISUBDIR="thunar-plugins" ;; |
18 | xfce4-*-plugin) URISUBDIR="panel-plugins" ;; |
19 | parole|xfburn|xfce4-{dict,mixer,notifyd}|orage|ristretto|taskmanager) URISUBDIR="apps" ;; |
20 | *) URISUBDIR="xfce" ;; |
21 | esac |
22 | |
23 | # default SRC_URIs |
24 | SRC_URI=( |
25 | ${SRC_URI[*]} |
26 | http://mocha.xfce.org/archive/src/${URISUBDIR}/${PNAME}/$(echo ${PVER} | cut -d. -f1-2)/${SRCFILE} |
27 | http://archive.xfce.org/src/${URISUBDIR}/${PNAME}/$(echo ${PVER} | cut -d. -f1-2)/${SRCFILE} |
28 | mirror://${PNAME}/${SRCFILE} |
29 | ) |
30 | |
31 | # special functions needed by postinstall|postremove |
32 | SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} xfce_update_desktop_db xfce_update_mime_db xfce_update_icon_cache xfce_postinstall xfce_postremove" |
33 | |
34 | xfce_configure() |
35 | { |
36 | local configure_opts="$@" |
37 | mconfigure \ |
38 | --libexecdir=/usr/$(mlibdir)/${PNAME} \ |
39 | --with-html-dir=/usr/share/doc/${PNAME}-${PVER}/html \ |
40 | --disable-debug \ |
41 | --disable-static \ |
42 | ${configure_opts} \ |
43 | || die |
44 | } |
45 | |
46 | xfce_src_prepare() |
47 | { |
48 | munpack ${SRCFILE} || die |
49 | } |
50 | |
51 | xfce_src_compile() |
52 | { |
53 | cd ${SRCDIR} |
54 | |
55 | xfce_configure || die |
56 | mmake ${XFCE_MAKE_OPTS} || die |
57 | } |
58 | |
59 | xfce_src_install() |
60 | { |
61 | cd ${SRCDIR} |
62 | mmake DESTDIR=${BINDIR} ${XFCE_MAKE_OPTS} install || die |
63 | |
64 | local i |
65 | for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ |
66 | FAQ LICENSE NEWS README TODO |
67 | do |
68 | if [ -f ${SRCDIR}/${i} ] |
69 | then |
70 | minstalldocs ${i} || die |
71 | fi |
72 | done |
73 | } |
74 | |
75 | xfce_update_desktop_db() |
76 | { |
77 | # update desktop db |
78 | if [ -x ${MROOT}/usr/bin/update-desktop-database ] |
79 | then |
80 | echo "Updating desktop mime database ..." |
81 | ${MROOT}/usr/bin/update-desktop-database -q ${MROOT}/usr/share/applications |
82 | fi |
83 | } |
84 | |
85 | xfce_update_mime_db() |
86 | { |
87 | # update mime db |
88 | if [ -x ${MROOT}/usr/bin/update-mime-database ] |
89 | then |
90 | echo "Updating shared mime info database ..." |
91 | ${MROOT}/usr/bin/update-mime-database ${MROOT}/usr/share/mime |
92 | fi |
93 | } |
94 | |
95 | xfce_update_icon_cache() |
96 | { |
97 | if [ -x ${MROOT}/usr/bin/gtk-update-icon-cache ] |
98 | then |
99 | pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null |
100 | local icons=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null) |
101 | popd &> /dev/null |
102 | |
103 | # abort here, if no icons where found |
104 | [[ -z ${icons} ]] && return |
105 | |
106 | echo "Updating icons cache ..." |
107 | local i |
108 | for i in ${icons} |
109 | do |
110 | if [[ -f ${MROOT}/${i}/index.theme ]] |
111 | then |
112 | ${MROOT}/usr/bin/gtk-update-icon-cache -qf ${MROOT}/${i} |
113 | fi |
114 | done |
115 | fi |
116 | } |
117 | |
118 | xfce_postinstall() |
119 | { |
120 | xfce_update_desktop_db |
121 | xfce_update_mime_db |
122 | xfce_update_icon_cache |
123 | } |
124 | |
125 | xfce_postremove() |
126 | { |
127 | xfce_update_desktop_db |
128 | xfce_update_mime_db |
129 | xfce_update_icon_cache |
130 | } |
131 | |
132 | export_inherits xfce src_prepare src_compile src_install postinstall postremove |