Magellan Linux

Annotation of /trunk/include/xfce.sminc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5726 - (hide annotations) (download)
Sat Aug 7 12:51:24 2010 UTC (14 years, 3 months ago) by niro
Original Path: trunk/core/include/xfce.sminc
File size: 2503 byte(s)
-fixed several issues
1 niro 5709 # $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 niro 5716 SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} xfce_update_desktop_db xfce_update_mime_db xfce_update_icon_cache xfce_postinstall xfce_postremove"
25 niro 5709
26     xfce_configure()
27     {
28     local configure_opts="$@"
29 niro 5726 mconfigure \
30     --libexecdir=/usr/$(mlibdir)/${PNAME} \
31     --with-html-dir=/usr/share/doc/${PNAME}-${PVER}/html \
32     --disable-debug \
33     --disable-static \
34     ${configure_opts} \
35     || die
36 niro 5709 }
37    
38     xfce_src_prepare()
39     {
40     munpack ${SRCFILE} || die
41     }
42    
43     xfce_src_compile()
44     {
45     cd ${SRCDIR}
46 niro 5721
47 niro 5726 xfce_configure || die
48 niro 5709 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