Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9863 - (show annotations) (download)
Fri Jan 13 19:22:05 2012 UTC (12 years, 9 months ago) by niro
Original Path: branches/magellan-next/include/xfce.sminc
File size: 2910 byte(s)
- PCATEGORIE -> PCAT transition
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) 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_install()
61 {
62 cd ${SRCDIR}
63 mmake DESTDIR=${BINDIR} ${XFCE_MAKE_OPTS} install || die
64
65 local i
66 for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \
67 FAQ LICENSE NEWS README TODO
68 do
69 if [ -f ${SRCDIR}/${i} ]
70 then
71 minstalldocs ${i} || die
72 fi
73 done
74 }
75
76 xfce_update_desktop_db()
77 {
78 # update desktop db
79 if [ -x ${MROOT}/usr/bin/update-desktop-database ]
80 then
81 echo "Updating desktop mime database ..."
82 ${MROOT}/usr/bin/update-desktop-database -q ${MROOT}/usr/share/applications
83 fi
84 }
85
86 xfce_update_mime_db()
87 {
88 # update mime db
89 if [ -x ${MROOT}/usr/bin/update-mime-database ]
90 then
91 echo "Updating shared mime info database ..."
92 ${MROOT}/usr/bin/update-mime-database ${MROOT}/usr/share/mime
93 fi
94 }
95
96 xfce_update_icon_cache()
97 {
98 if [ -x ${MROOT}/usr/bin/gtk-update-icon-cache ]
99 then
100 pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null
101 local icons=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null)
102 popd &> /dev/null
103
104 # abort here, if no icons where found
105 [[ -z ${icons} ]] && return
106
107 echo "Updating icons cache ..."
108 local i
109 for i in ${icons}
110 do
111 if [[ -f ${MROOT}/${i}/index.theme ]]
112 then
113 ${MROOT}/usr/bin/gtk-update-icon-cache -qf ${MROOT}/${i}
114 fi
115 done
116 fi
117 }
118
119 xfce_postinstall()
120 {
121 xfce_update_desktop_db
122 xfce_update_mime_db
123 xfce_update_icon_cache
124 }
125
126 xfce_postremove()
127 {
128 xfce_update_desktop_db
129 xfce_update_mime_db
130 xfce_update_icon_cache
131 }
132
133 export_inherits xfce src_prepare src_compile src_install postinstall postremove