Magellan Linux

Annotation of /trunk/include/gnome2.sminc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (hide annotations) (download)
Fri Oct 10 13:29:42 2008 UTC (15 years, 7 months ago) by niro
Original Path: trunk/core/include/gnome2.sminc
File size: 3700 byte(s)
import repo
1 niro 2 # $Header: /magellan-cvs/smage/include/gnome2.sminc,v 1.23 2008/03/28 10:39:41 niro Exp $
2    
3     : ${SRCFILE="${PNAME}-${PVER}.tar.bz2"}
4     : ${SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"}
5    
6     INHERITS="${INHERITS} gnome2"
7    
8     # default SRC_URIs
9     SRC_URI=(
10     gnome://${PNAME}/${PVER%.*}/${SRCFILE}
11     gnome://${PNAME}/${PVER%.*.*}/${SRCFILE}
12     mirror://${PNAME}/${SRCFILE}
13     )
14    
15     # gnome default setup
16     export SCROLLKEEPER_UPDATE=${SCROLLKEEPER_UPDATE:-0}
17     export SCROLL_DEBUG=${SCROLL_DEBUG:-0}
18     export GNOME_PREFIX="/usr"
19     export PATH="${PATH}:${GNOME_PREFIX}/bin"
20     export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${GNOME_PREFIX}/$(mlibdir)/pkgconfig"
21     export GNOME_LIBCONFIG_PATH="/usr/$(mlibdir):${GNOME_PREFIX}/$(mlibdir)"
22    
23     # add scrollkeeper to dependencies if requested
24     if [[ ${SCROLLKEEPER_UPDATE} = 1 ]]
25     then
26     DEPEND="${DEPEND}
27     >= app-text/scrollkeeper-0.3.14"
28     fi
29    
30    
31     # function to clean gnome pakages
32     # scrollkeeper and mimeinfo crap
33     gn2_clean_gnome_pkg()
34     {
35     # litte check to show if you must run scrollkeeper in postinstall or not
36     if [ -z "$(find ${BINDIR} -name '*.omf')" ]
37     then
38     echo
39     echo "########################"
40     echo "scrollkeeper isn't needed to run."
41     echo "########################"
42     echo
43     if [ "${SCROLL_DEBUG}" = "1" ]
44     then
45     echo "Press [Enter] to continue ..."
46     read
47     else
48     sleep 3
49     fi
50     else
51     echo
52     echo "########################"
53     echo "you need to run scrollkeeper in postinstall for ${PNAME}-${PVER}"
54     echo "########################"
55     echo
56     if [ "${SCROLL_DEBUG}" = "1" ]
57     then
58     echo "Press [Enter] to continue ..."
59     read
60     else
61     sleep 3
62     fi
63     fi
64    
65     # remove scrollkeeper crap
66     if [[ -d ${BINDIR}/var/lib/scrollkeeper ]]
67     then
68     rm -rf ${BINDIR}/var/lib/scrollkeeper || die
69     fi
70    
71     # mime database will rebuilded later
72     if [[ -e ${BINDIR}/usr/share/applications/mimeinfo.cache ]]
73     then
74     rm -rf ${BINDIR}/usr/share/applications/mimeinfo.cache || die
75     fi
76    
77     # delete /var/tmp if exist
78     if [[ -d ${BINDIR}/var/tmp ]]
79     then
80     rm -rf ${BINDIR}/var/tmp || die
81     fi
82     }
83    
84     gn2_configure()
85     {
86     local configure_opts="$@"
87    
88     # we run scrollkeeper manually within postinstall
89     [[ ${SCROLLKEEPER_UPDATE} = 1 ]] && configure_opts="${configure_opts} --disable-scrollkeeper"
90    
91     ./configure \
92     --host=${CHOST} \
93     --prefix=${GNOME_PREFIX} \
94     --sysconfdir=/etc \
95     --infodir=${GNOME_PREFIX}/share/info \
96     --mandir=${GNOME_PREFIX}/share/man \
97     --localstatedir=/var/lib \
98     --libdir=${GNOME_PREFIX}/$(mlibdir) \
99     --libexecdir=${GNOME_PREFIX}/$(mlibdir)/${PNAME} \
100     --enable-static=no \
101     --disable-gtk-doc \
102     ${configure_opts} \
103     || die
104     }
105    
106     gn2_src_prepare()
107     {
108     munpack ${SRCFILE} || die
109     }
110    
111     gn2_src_compile()
112     {
113     cd ${SRCDIR}
114     gn2_configure || die
115     mmake ${GN2_MAKE_OPTS} || die
116     }
117    
118     gn2_src_install()
119     {
120     cd ${SRCDIR}
121    
122     # needed directories
123     # scrollkeeper needs this
124     install -d ${BINDIR}/var/lib/scrollkeeper || die
125    
126     # using make install instead of minstall
127     make DESTDIR=${BINDIR} ${GN2_MAKE_OPTS} install || die
128    
129     local i
130     for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \
131     FAQ LICENSE NEWS README TODO
132     do
133     if [ -f ${SRCDIR}/${i} ]
134     then
135     minstalldocs ${i} || die
136     fi
137     done
138    
139     gn2_clean_gnome_pkg
140     }
141    
142     gn2_fix_omf_makefiles()
143     {
144     # remove scrollkeeper update; we do it later
145     # taken from gentoo
146     local omf_makefiles
147     local omf_base
148     local omf
149    
150     omf_makefiles="$@"
151    
152     [ -f ${SRCDIR}/omf-install/Makefile.in ] \
153     && omf_makefiles="${omf_makefiles} ${SRCDIR}/omf-install/Makefile.in"
154    
155     [ -f ${SRCDIR}/omf.make ] \
156     && omf_makefiles="${omf_makefiles} ${SRCDIR}/omf.make"
157    
158     for omf in ${omf_makefiles}; do
159     omfbase=$(basename ${omf})
160     echo "Fixing OMF Makefile: ${omf#${SRCDIR}/}"
161     sed -i 's:-scrollkeeper-update.*::' ${omf}
162     done
163     }
164    
165     export_inherits gn2 src_prepare src_compile src_install