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