Magellan Linux

Annotation of /trunk/include/xfce.sminc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9015 - (hide annotations) (download)
Thu Sep 29 20:01:39 2011 UTC (13 years, 1 month ago) by niro
Original Path: branches/magellan-next/include/xfce.sminc
File size: 2759 byte(s)
-added parole
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 niro 9012 case ${PNAME} in
17     thunar-*-plugin) URISUBDIR="thunar-plugins" ;;
18     xfce4-*-plugin) URISUBDIR="panel-plugins" ;;
19 niro 9015 parole) URISUBDIR="apps" ;;
20 niro 9012 *) URISUBDIR="xfce" ;;
21     esac
22    
23 niro 5709 # default SRC_URIs
24     SRC_URI=(
25     ${SRC_URI[*]}
26 niro 9012 http://mocha.xfce.org/archive/src/${URISUBDIR}/${PNAME}/${PVER%.*}/${SRCFILE}
27     http://archive.xfce.org/src/${URISUBDIR}/${PNAME}/${PVER%.*}/${SRCFILE}
28 niro 5709 mirror://${PNAME}/${SRCFILE}
29     )
30    
31     # special functions needed by postinstall|postremove
32 niro 5716 SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} xfce_update_desktop_db xfce_update_mime_db xfce_update_icon_cache xfce_postinstall xfce_postremove"
33 niro 5709
34     xfce_configure()
35     {
36     local configure_opts="$@"
37 niro 5726 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 niro 5709 }
45    
46     xfce_src_prepare()
47     {
48     munpack ${SRCFILE} || die
49     }
50    
51     xfce_src_compile()
52     {
53     cd ${SRCDIR}
54 niro 5721
55 niro 5726 xfce_configure || die
56 niro 5709 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