3 # - handle locales differently (runtime, since it's possible to do)
4 # - move most of %%post to external script as it's done in debian
5 # - see ftp://ftp.debian.org/debian/pool/main/m/mozilla-firefox/*diff*
6 # for hints how to make locales and other stuff like extensions working
7 # - SECURITY: http://securitytracker.com/alerts/2004/Sep/1011318.html
10 %bcond_with tests # enable tests (whatever they check)
11 %bcond_with ft218 # compile with freetype >= 2.1.8
13 Summary: Mozilla Firefox web browser
14 Summary(pl): Mozilla Firefox - przegl±darka WWW
19 Group: X11/Applications/Networking
20 Source0: http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0/source/firefox-1.0-source.tar.bz2
21 # Source0-md5: 49c16a71f4de014ea471be81e46b1da8
22 Source1: %{name}.desktop
24 Patch0: %{name}-alpha-gcc3.patch
25 Patch1: %{name}-gfx.patch
26 Patch2: %{name}-nss.patch
27 Patch3: %{name}-lib_path.patch
28 Patch4: %{name}-freetype.patch
29 URL: http://www.mozilla.org/projects/firefox/
30 BuildRequires: automake
32 BuildRequires: freetype-devel >= 1:2.1.8
34 BuildRequires: freetype-devel >= 2.1.3
35 BuildRequires: freetype-devel < 1:2.1.8
36 BuildConflicts: freetype-devel = 2.1.8
38 BuildRequires: gtk+2-devel >= 1:2.0.0
39 BuildRequires: libIDL-devel >= 0.8.0
40 BuildRequires: libjpeg-devel >= 6b
41 BuildRequires: libpng-devel >= 1.2.0
42 BuildRequires: libstdc++-devel
43 BuildRequires: nspr-devel >= 1:4.6-0.20041030.1
44 BuildRequires: nss-devel >= 3.8
45 BuildRequires: pango-devel >= 1:1.1.0
46 BuildRequires: perl(Time::localtime)
48 Requires: %{name}-lang-resources = %{version}
50 Requires: freetype >= 1:2.1.3
52 Requires: freetype >= 2.1.3
53 Requires: freetype < 1:2.1.8
54 Conflicts: freetype = 2.1.8
56 Requires: nspr >= 1:4.6-0.20041030.1
58 Obsoletes: mozilla-firebird
59 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61 %define _firefoxdir %{_libdir}/%{name}
62 # mozilla and firefox provide their own versions
63 %define _noautoreqdep libgkgfx.so libgtkembedmoz.so libgtkxtbin.so libjsj.so libmozjs.so libxpcom.so libxpcom_compat.so
64 %define _noautoprovfiles libplc4.so libplds4.so
67 Mozilla Firefox is an open-source web browser, designed for standards
68 compliance, performance and portability.
71 Mozilla Firefox jest open sourcow± przegl±dark± sieci WWW, stworzon± z
72 my¶l± o zgodno¶ci ze standardami, wydajno¶ci± i przeno¶no¶ci±.
75 Summary: English resources for Mozilla-firefox
76 Summary(pl): Anglojêzyczne zasoby dla Mozilla-FireFox
77 Group: X11/Applications/Networking
78 Requires(post,postun): %{name} = %{version}-%{release}
79 Requires(post,postun): textutils
80 Requires: %{name} = %{version}-%{release}
81 Provides: %{name}-lang-resources = %{version}-%{release}
84 English resources for Mozilla-firefox
86 %description lang-en -l pl
87 Anglojêzyczne zasoby dla Mozilla-FireFox
95 %{?with_ft218:%patch4 -p1}
98 export CFLAGS="%{rpmcflags}"
99 export CXXFLAGS="%{rpmcflags}"
100 export MOZ_PHOENIX="1"
101 export BUILD_OFFICIAL="1"
102 export MOZILLA_OFFICIAL="1"
104 cp -f %{_datadir}/automake/config.* build/autoconf
105 cp -f %{_datadir}/automake/config.* nsprpub/build/autoconf
106 cp -f %{_datadir}/automake/config.* directory/c-sdk/config/autoconf
110 --enable-debug-modules \
113 --disable-debug-modules \
116 --disable-dtd-debug \
117 --disable-installer \
130 --enable-optimize="%{rpmcflags}" \
131 --enable-plaintext-editor-only \
134 --enable-strip-libs \
137 --enable-default-toolkit="gtk2" \
143 --enable-single-profile \
144 --disable-profilesharing \
145 --enable-extensions=cookie,xml-rpc,xmlextras,pref,transformiix,universalchardet,webservices,inspector,gnomevfs,negotiateauth
151 rm -rf $RPM_BUILD_ROOT
152 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_pixmapsdir},%{_desktopdir}}
154 %{__make} -C xpinstall/packager \
155 MOZ_PKG_APPNAME="mozilla-firefox" \
156 MOZILLA_BIN="\$(DIST)/bin/firefox-bin" \
159 install %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox
160 sed -i $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox -e "s@/usr/lib/@%{_libdir}/@g"
162 tar -xvz -C $RPM_BUILD_ROOT%{_libdir} -f dist/mozilla-firefox-*-linux-gnu.tar.gz
164 install other-licenses/branding/firefox/content/icon32.png $RPM_BUILD_ROOT%{_pixmapsdir}/mozilla-firefox.png
165 #install -m0644 bookmarks.html $RPM_BUILD_ROOT%{_firefoxdir}/defaults/profile/
166 #install -m0644 bookmarks.html $RPM_BUILD_ROOT%{_firefoxdir}/defaults/profile/US/
168 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
170 grep locale $RPM_BUILD_ROOT%{_firefoxdir}/chrome/installed-chrome.txt > $RPM_BUILD_ROOT%{_firefoxdir}/chrome/%{name}-en-US-installed-chrome.txt
171 grep -v locale $RPM_BUILD_ROOT%{_firefoxdir}/chrome/installed-chrome.txt > $RPM_BUILD_ROOT%{_firefoxdir}/chrome/%{name}-misc-installed-chrome.txt
173 rm -rf US classic comm embed-sample en-{US,mac,unix,win} modern pipnss pippki toolkit
174 rm -f en-win.jar en-mac.jar embed-sample.jar modern.jar
177 rm -rf $RPM_BUILD_ROOT
181 cat %{_firefoxdir}/chrome/*-installed-chrome.txt > %{_firefoxdir}/chrome/installed-chrome.txt
183 unset MOZILLA_FIVE_HOME || :
184 MOZILLA_FIVE_HOME=%{_firefoxdir}
185 export MOZILLA_FIVE_HOME
188 PATH=%{_firefoxdir}:$PATH
191 # added /usr/lib : don't load your local library
192 LD_LIBRARY_PATH=%{_firefoxdir}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
193 export LD_LIBRARY_PATH
197 %{_firefoxdir}/regxpcom >/dev/null || echo "E: regxpcom was exited: $?" >&2
198 %{_firefoxdir}/regchrome >/dev/null || echo "E: regchrome was exited: $?" >&2
200 %{_firefoxdir}/firefox -register
203 if [ "$1" != "0" ]; then
205 cat %{_firefoxdir}/chrome/*-installed-chrome.txt >%{_firefoxdir}/chrome/installed-chrome.txt
209 if [ "$1" == "0" ]; then
210 rm -rf %{_firefoxdir}/chrome/overlayinfo
211 rm -rf %{_firefoxdir}/components
212 rm -f %{_firefoxdir}/chrome/*.rdf
213 rm -rf %{_firefoxdir}/extensions
218 cat %{_firefoxdir}/chrome/*-installed-chrome.txt >%{_firefoxdir}/chrome/installed-chrome.txt
222 cat %{_firefoxdir}/chrome/*-installed-chrome.txt >%{_firefoxdir}/chrome/installed-chrome.txt
225 %defattr(644,root,root,755)
226 %attr(755,root,root) %{_bindir}/*
229 %dir %{_firefoxdir}/components
230 %attr(755,root,root) %{_firefoxdir}/components/*.so
231 %{_firefoxdir}/components/*.js
232 %{_firefoxdir}/components/*.xpt
233 %{_firefoxdir}/plugins
234 %{_firefoxdir}/searchplugins
236 %{_firefoxdir}/defaults
237 %{_firefoxdir}/greprefs
238 %dir %{_firefoxdir}/init.d
239 %attr(755,root,root) %{_firefoxdir}/*.so
240 %attr(755,root,root) %{_firefoxdir}/*.sh
241 %attr(755,root,root) %{_firefoxdir}/m*
242 %attr(755,root,root) %{_firefoxdir}/f*
243 %attr(755,root,root) %{_firefoxdir}/reg*
244 %attr(755,root,root) %{_firefoxdir}/x*
245 %attr(755,root,root) %{_firefoxdir}/T*
247 %attr(755,root,root) %{_firefoxdir}/elf-dynstr-gc
249 %{_firefoxdir}/bloaturls.txt
253 %dir %{_firefoxdir}/chrome
254 %{_firefoxdir}/chrome/browser.jar
256 #%{_firefoxdir}/chrome/chatzilla.jar
257 %{_firefoxdir}/chrome/classic.jar
258 %{_firefoxdir}/chrome/comm.jar
259 #%{_firefoxdir}/chrome/content-packs.jar
260 %{_firefoxdir}/chrome/help.jar
261 # -dom-inspector subpackage?
262 #%{_firefoxdir}/chrome/inspector.jar
263 %{_firefoxdir}/chrome/modern.jar
264 %{_firefoxdir}/chrome/pip*.jar
265 %{_firefoxdir}/chrome/toolkit.jar
266 %{_firefoxdir}/chrome/mozilla-firefox-misc-installed-chrome.txt
267 %dir %{_firefoxdir}/chrome/icons
268 %{_firefoxdir}/chrome/icons/default
271 %defattr(644,root,root,755)
272 %{_firefoxdir}/chrome/en-US.jar
273 %{_firefoxdir}/chrome/mozilla-firefox-en-US-installed-chrome.txt