]> git.pld-linux.org Git - packages/firefox.git/blob - mozilla-firefox.spec
- updated to 1.0.3 (it builds and even works! ;) )
[packages/firefox.git] / mozilla-firefox.spec
1 #
2 # TODO:
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 #
8 # Conditional build:
9 %bcond_with     tests   # enable tests (whatever they check)
10 %bcond_with     ft218   # compile with freetype >= 2.1.8
11 #
12 Summary:        Mozilla Firefox web browser
13 Summary(pl):    Mozilla Firefox - przegl±darka WWW
14 Name:           mozilla-firefox
15 Version:        1.0.3
16 Release:        1
17 License:        MPL/LGPL
18 Group:          X11/Applications/Networking
19 Source0:        http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/source/firefox-%{version}-source.tar.bz2
20 # Source0-md5:  f1a9a8da0547564a0f8a249f9d56bdf4
21 Source1:        %{name}.desktop
22 Source2:        %{name}.sh
23 Patch0:         %{name}-alpha-gcc3.patch
24 Patch1:         %{name}-gfx.patch
25 Patch2:         %{name}-nss.patch
26 Patch3:         %{name}-lib_path.patch
27 Patch4:         %{name}-freetype.patch
28 URL:            http://www.mozilla.org/projects/firefox/
29 BuildRequires:  automake
30 %if %{with ft218}
31 BuildRequires:  freetype-devel >= 1:2.1.9
32 %else
33 BuildRequires:  freetype-devel >= 2.1.3
34 BuildRequires:  freetype-devel < 1:2.1.8
35 BuildConflicts: freetype-devel = 2.1.8
36 %endif
37 BuildRequires:  gtk+2-devel >= 1:2.0.0
38 BuildRequires:  libIDL-devel >= 0.8.0
39 BuildRequires:  libjpeg-devel >= 6b
40 BuildRequires:  libpng-devel >= 1.2.0
41 BuildRequires:  libstdc++-devel
42 BuildRequires:  nspr-devel >= 1:4.6-0.20041030.1
43 BuildRequires:  nss-devel >= 3.8
44 BuildRequires:  pango-devel >= 1:1.1.0
45 BuildRequires:  perl-modules
46 BuildRequires:  pkgconfig
47 BuildRequires:  zip
48 Requires:       %{name}-lang-resources = %{version}
49 %if %{with ft218}
50 Requires:       freetype >= 1:2.1.3
51 %else
52 Requires:       freetype >= 2.1.3
53 Conflicts:      freetype = 2.1.8
54 %endif
55 Requires:       nspr >= 1:4.6-0.20041030.1
56 Requires:       nss >= 3.8
57 Obsoletes:      mozilla-firebird
58 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
60 %define         _firefoxdir     %{_libdir}/%{name}
61 # mozilla and firefox provide their own versions
62 %define         _noautoreqdep           libgkgfx.so libgtkembedmoz.so libgtkxtbin.so libjsj.so libmozjs.so libxpcom.so libxpcom_compat.so
63 %define         _noautoprovfiles        libplc4.so libplds4.so
64
65 %description
66 Mozilla Firefox is an open-source web browser, designed for standards
67 compliance, performance and portability.
68
69 %description -l pl
70 Mozilla Firefox jest open sourcow± przegl±dark± sieci WWW, stworzon± z
71 my¶l± o zgodno¶ci ze standardami, wydajno¶ci± i przeno¶no¶ci±.
72
73 %package lang-en
74 Summary:        English resources for Mozilla-firefox
75 Summary(pl):    Anglojêzyczne zasoby dla Mozilla-FireFox
76 Group:          X11/Applications/Networking
77 Requires(post,postun):  %{name} = %{version}-%{release}
78 Requires(post,postun):  textutils
79 Requires:       %{name} = %{version}-%{release}
80 Provides:       %{name}-lang-resources = %{version}-%{release}
81
82 %description lang-en
83 English resources for Mozilla-firefox
84
85 %description lang-en -l pl
86 Anglojêzyczne zasoby dla Mozilla-FireFox
87
88 %prep
89 %setup -q -n mozilla
90 %patch0 -p1
91 %patch1 -p1
92 %patch2 -p1
93 %patch3 -p1
94 %{?with_ft218:%patch4 -p1}
95
96 %build
97 export CFLAGS="%{rpmcflags}"
98 export CXXFLAGS="%{rpmcflags}"
99 export MOZ_PHOENIX="1"
100 export BUILD_OFFICIAL="1"
101 export MOZILLA_OFFICIAL="1"
102
103 cp -f %{_datadir}/automake/config.* build/autoconf
104 cp -f %{_datadir}/automake/config.* nsprpub/build/autoconf
105 cp -f %{_datadir}/automake/config.* directory/c-sdk/config/autoconf
106 %configure2_13 \
107 %if %{?debug:1}0
108         --enable-debug \
109         --enable-debug-modules \
110 %else
111         --disable-debug \
112         --disable-debug-modules \
113 %endif
114         --disable-composer \
115         --disable-dtd-debug \
116         --disable-installer \
117         --disable-jsd \
118         --disable-ldap \
119         --disable-mailnews \
120 %if %{with tests}
121         --enable-tests \
122 %else
123         --disable-tests \
124 %endif
125         --disable-xprint \
126         --enable-crypto \
127         --enable-freetype2 \
128         --enable-mathml \
129         --enable-optimize="%{rpmcflags}" \
130         --enable-plaintext-editor-only \
131         --enable-reorder \
132         --enable-strip \
133         --enable-strip-libs \
134         --enable-xinerama \
135         --enable-xft \
136         --enable-default-toolkit="gtk2" \
137         --with-pthreads \
138         --with-system-nspr \
139         --with-system-jpeg \
140         --with-system-png \
141         --with-system-zlib \
142         --enable-single-profile \
143         --disable-profilesharing \
144         --enable-extensions=cookie,xml-rpc,xmlextras,pref,transformiix,universalchardet,webservices,inspector,gnomevfs,negotiateauth
145         
146
147 %{__make}
148
149 %install
150 rm -rf $RPM_BUILD_ROOT
151 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir},%{_pixmapsdir},%{_desktopdir}}
152
153 %{__make} -C xpinstall/packager \
154         MOZ_PKG_APPNAME="mozilla-firefox" \
155         MOZILLA_BIN="\$(DIST)/bin/firefox-bin" \
156         EXCLUDE_NSPR_LIBS=1
157
158 install %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox
159 sed -i $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox -e "s@/usr/lib/@%{_libdir}/@g"
160
161 tar -xvz -C $RPM_BUILD_ROOT%{_libdir} -f dist/mozilla-firefox-*-linux-gnu.tar.gz
162
163 install other-licenses/branding/firefox/content/icon32.png $RPM_BUILD_ROOT%{_pixmapsdir}/mozilla-firefox.png
164 #install -m0644 bookmarks.html $RPM_BUILD_ROOT%{_firefoxdir}/defaults/profile/
165 #install -m0644 bookmarks.html $RPM_BUILD_ROOT%{_firefoxdir}/defaults/profile/US/
166
167 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
168
169 grep locale $RPM_BUILD_ROOT%{_firefoxdir}/chrome/installed-chrome.txt > $RPM_BUILD_ROOT%{_firefoxdir}/chrome/%{name}-en-US-installed-chrome.txt
170 grep -v locale $RPM_BUILD_ROOT%{_firefoxdir}/chrome/installed-chrome.txt > $RPM_BUILD_ROOT%{_firefoxdir}/chrome/%{name}-misc-installed-chrome.txt
171
172 rm -rf US classic comm embed-sample en-{US,mac,unix,win} modern pipnss pippki toolkit
173 rm -f en-win.jar en-mac.jar embed-sample.jar modern.jar
174
175 cat << EOF > $RPM_BUILD_ROOT%{_sbindir}/firefox-chrome+xpcom-generate
176 #!/bin/sh
177 umask 022
178 cat %{_firefoxdir}/chrome/*-installed-chrome.txt > %{_firefoxdir}/chrome/installed-chrome.txt
179 rm -f %{_firefoxdir}/chrome/{chrome.rdf,overlayinfo/*/*/*.rdf}
180 rm -f %{_firefoxdir}/components/{compreg,xpti}.dat
181 MOZILLA_FIVE_HOME=%{_firefoxdir}
182 export MOZILLA_FIVE_HOME
183
184 # PATH
185 PATH=%{_firefoxdir}:$PATH
186 export PATH
187
188 # added /usr/lib : don't load your local library
189 LD_LIBRARY_PATH=%{_firefoxdir}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
190 export LD_LIBRARY_PATH
191
192 %{_firefoxdir}/regxpcom
193 %{_firefoxdir}/regchrome
194 %{_firefoxdir}/firefox -register
195 EOF
196
197 %clean
198 rm -rf $RPM_BUILD_ROOT
199
200 %post
201 %{_sbindir}/firefox-chrome+xpcom-generate
202
203 %postun
204 if [ "$1" != "0" ]; then
205         %{_sbindir}/firefox-chrome+xpcom-generate
206 fi
207
208 %preun
209 if [ "$1" == "0" ]; then
210         rm -rf %{_firefoxdir}/chrome/overlayinfo
211         rm -f  %{_firefoxdir}/chrome/*.rdf
212         rm -rf %{_firefoxdir}/components
213         rm -rf %{_firefoxdir}/extensions
214 fi
215
216 %post lang-en
217 umask 022
218 cat %{_firefoxdir}/chrome/*-installed-chrome.txt >%{_firefoxdir}/chrome/installed-chrome.txt
219
220 %postun lang-en
221 umask 022
222 cat %{_firefoxdir}/chrome/*-installed-chrome.txt >%{_firefoxdir}/chrome/installed-chrome.txt
223
224 %files
225 %defattr(644,root,root,755)
226 %attr(755,root,root) %{_bindir}/*
227 %attr(755,root,root) %{_sbindir}/*
228 %dir %{_firefoxdir}
229 %{_firefoxdir}/res
230 %dir %{_firefoxdir}/components
231 %attr(755,root,root) %{_firefoxdir}/components/*.so
232 %{_firefoxdir}/components/*.js
233 %{_firefoxdir}/components/*.xpt
234 %{_firefoxdir}/plugins
235 %{_firefoxdir}/searchplugins
236 %{_firefoxdir}/icons
237 %{_firefoxdir}/defaults
238 %{_firefoxdir}/greprefs
239 %dir %{_firefoxdir}/init.d
240 %attr(755,root,root) %{_firefoxdir}/*.so
241 %attr(755,root,root) %{_firefoxdir}/*.sh
242 %attr(755,root,root) %{_firefoxdir}/m*
243 %attr(755,root,root) %{_firefoxdir}/f*
244 %attr(755,root,root) %{_firefoxdir}/reg*
245 %attr(755,root,root) %{_firefoxdir}/x*
246 %attr(755,root,root) %{_firefoxdir}/T*
247 %ifarch %{ix86}
248 %attr(755,root,root) %{_firefoxdir}/elf-dynstr-gc
249 %endif
250 %{_firefoxdir}/bloaturls.txt
251 %{_pixmapsdir}/*
252 %{_desktopdir}/*
253
254 %dir %{_firefoxdir}/chrome
255 %{_firefoxdir}/chrome/browser.jar
256 # -chat subpackage?
257 #%{_firefoxdir}/chrome/chatzilla.jar
258 %{_firefoxdir}/chrome/classic.jar
259 %{_firefoxdir}/chrome/comm.jar
260 #%{_firefoxdir}/chrome/content-packs.jar
261 %{_firefoxdir}/chrome/help.jar
262 # -dom-inspector subpackage?
263 %{_firefoxdir}/chrome/inspector.jar
264 %{_firefoxdir}/chrome/modern.jar
265 %{_firefoxdir}/chrome/pip*.jar
266 %{_firefoxdir}/chrome/toolkit.jar
267 %{_firefoxdir}/chrome/mozilla-firefox-misc-installed-chrome.txt
268 %dir %{_firefoxdir}/chrome/icons
269 %{_firefoxdir}/chrome/icons/default
270
271 %files lang-en
272 %defattr(644,root,root,755)
273 %{_firefoxdir}/chrome/en-US.jar
274 %{_firefoxdir}/chrome/mozilla-firefox-en-US-installed-chrome.txt
This page took 0.048036 seconds and 4 git commands to generate.