Magellan Linux

Contents of /branches/R11-unstable/include/xfce.sminc

Parent Directory Parent Directory | Revision Log Revision Log


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