Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6654 - (show annotations) (download)
Tue Sep 14 16:46:32 2010 UTC (14 years, 1 month ago) by niro
Original Path: branches/magellan-next/include/gnome2.sminc
File size: 3721 byte(s)
imported from trunk
1 # $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 --build=${CHOST} \
94 --prefix=${GNOME_PREFIX} \
95 --sysconfdir=/etc \
96 --infodir=${GNOME_PREFIX}/share/info \
97 --mandir=${GNOME_PREFIX}/share/man \
98 --localstatedir=/var/lib \
99 --libdir=${GNOME_PREFIX}/$(mlibdir) \
100 --libexecdir=${GNOME_PREFIX}/$(mlibdir)/${PNAME} \
101 --enable-static=no \
102 --disable-gtk-doc \
103 ${configure_opts} \
104 || die
105 }
106
107 gn2_src_prepare()
108 {
109 munpack ${SRCFILE} || die
110 }
111
112 gn2_src_compile()
113 {
114 cd ${SRCDIR}
115 gn2_configure || die
116 mmake ${GN2_MAKE_OPTS} || die
117 }
118
119 gn2_src_install()
120 {
121 cd ${SRCDIR}
122
123 # needed directories
124 # scrollkeeper needs this
125 install -d ${BINDIR}/var/lib/scrollkeeper || die
126
127 # using make install instead of minstall
128 make DESTDIR=${BINDIR} ${GN2_MAKE_OPTS} install || die
129
130 local i
131 for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \
132 FAQ LICENSE NEWS README TODO
133 do
134 if [ -f ${SRCDIR}/${i} ]
135 then
136 minstalldocs ${i} || die
137 fi
138 done
139
140 gn2_clean_gnome_pkg
141 }
142
143 gn2_fix_omf_makefiles()
144 {
145 # remove scrollkeeper update; we do it later
146 # taken from gentoo
147 local omf_makefiles
148 local omf_base
149 local omf
150
151 omf_makefiles="$@"
152
153 [ -f ${SRCDIR}/omf-install/Makefile.in ] \
154 && omf_makefiles="${omf_makefiles} ${SRCDIR}/omf-install/Makefile.in"
155
156 [ -f ${SRCDIR}/omf.make ] \
157 && omf_makefiles="${omf_makefiles} ${SRCDIR}/omf.make"
158
159 for omf in ${omf_makefiles}; do
160 omfbase=$(basename ${omf})
161 echo "Fixing OMF Makefile: ${omf#${SRCDIR}/}"
162 sed -i 's:-scrollkeeper-update.*::' ${omf}
163 done
164 }
165
166 export_inherits gn2 src_prepare src_compile src_install