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