]> git.pld-linux.org Git - packages/firefox.git/blob - mozilla-firefox.spec
- added amd64 patch, release 3
[packages/firefox.git] / mozilla-firefox.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # enable tests (whatever they check)
4 #
5 Summary:        Mozilla Firefox web browser
6 Summary(pl):    Mozilla Firefox - przegl±darka WWW
7 Name:           mozilla-firefox
8 Version:        0.8
9 Release:        3
10 License:        MPL/LGPL
11 Group:          X11/Applications/Networking
12 Source0:        http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/firefox-source-%{version}.tar.bz2
13 # Source0-md5:  cdc85152f4219bf3e3f1a8dc46e04654
14 Source1:        %{name}.desktop
15 Patch0:         %{name}-alpha-gcc3.patch
16 Patch1:         %{name}-nspr.patch
17 Patch2:         %{name}-nss.patch
18 Patch3:         %{name}-amd64.patch
19 URL:            http://www.mozilla.org/projects/firefox/
20 BuildRequires:  gtk+2-devel >= 2.0.0
21 BuildRequires:  libIDL-devel >= 0.8.0
22 BuildRequires:  libjpeg-devel >= 6b
23 BuildRequires:  libpng-devel >= 1.2.0
24 BuildRequires:  libstdc++-devel
25 BuildRequires:  nspr-devel >= 1:4.5.0
26 BuildRequires:  nss-devel >= 3.8
27 BuildRequires:  pango-devel >= 1.1.0
28 BuildRequires:  zip
29 Requires:       %{name}-lang-resources = %{version}
30 Requires:       nspr >= 1:4.5.0
31 Requires:       nss >= 3.8
32 Obsoletes:      mozilla-firebird
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %define         _firefoxdir     %{_libdir}/%{name}
36 # mozilla and firefox provide their own versions
37 %define         _noautoreqdep   libgkgfx.so libgtkembedmoz.so libgtkxtbin.so libjsj.so libmozjs.so libxpcom.so libxpcom_compat.so
38
39 %description
40 Mozilla Firefox is an open-source web browser, designed for standards
41 compliance, performance and portability.
42
43 %description -l pl
44 Mozilla Firefox jest open sourcow± przegl±dark± sieci www, stworzon± z
45 my¶l± o zgodno¶ci ze standartami, wydajno¶ci± i przeno¶no¶ci±.
46
47 %package lang-en
48 Summary:        English resources for Mozilla-firefox
49 Summary(pl):    Anglojêzyczne zasoby dla Mozilla-FireFox
50 Group:  X11/Applications/Networking
51 Requires(post,postun):  %{name} = %{version}-%{release}
52 Requires(post,postun):  textutils
53 Requires:       %{name} = %{version}-%{release}
54 Provides:       %{name}-lang-resources = %{version}-%{release}
55
56 %description lang-en
57 English resources for Mozilla-firefox
58
59 %description lang-en -l pl
60 Anglojêzyczne zasoby dla Mozilla-FireFox
61
62 %prep
63 %setup -q -n mozilla
64 %patch0 -p1
65 %patch1 -p1
66 %patch2 -p1
67 %patch3 -p1
68
69 %build
70 export CFLAGS="%{optflags}"
71 export CXXFLAGS="%{optflags}"
72 export MOZ_PHOENIX="1"
73
74 cp -f /usr/share/automake/config.* build/autoconf
75 cp -f /usr/share/automake/config.* nsprpub/build/autoconf
76 cp -f /usr/share/automake/config.* directory/c-sdk/config/autoconf
77 %configure2_13 \
78 %if %{with debug}
79         --enable-debug \
80         --enable-debug-modules \
81 %else
82         --disable-debug \
83         --disable-debug-modules \
84 %endif
85         --disable-composer \
86         --disable-dtd-debug \
87         --disable-installer \
88         --disable-jsd \
89         --disable-ldap \
90         --disable-mailnews \
91 %if %{with tests}
92         --enable-tests \
93 %else
94         --disable-tests \
95 %endif
96         --disable-xprint \
97         --enable-crypto \
98         --enable-freetype2 \
99         --enable-mathml \
100         --enable-optimize="%{optflags}" \
101         --enable-plaintext-editor-only \
102         --enable-reorder \
103         --enable-strip \
104         --enable-strip-libs \
105         --enable-xinerama \
106         --enable-xft \
107         --enable-default-toolkit="gtk2" \
108         --with-pthreads \
109         --with-system-jpeg \
110         --with-system-nspr \
111         --with-system-png \
112         --with-system-zlib
113
114 %{__make}
115
116 %install
117 rm -rf $RPM_BUILD_ROOT
118 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_pixmapsdir},%{_desktopdir}}
119
120 %{__make} -C xpinstall/packager \
121         MOZ_PKG_APPNAME="mozilla-firefox" \
122         MOZILLA_BIN="\$(DIST)/bin/firefox-bin" \
123         EXCLUDE_NSPR_LIBS=1
124
125 #install -m0755 %{name}.sh $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox
126 ln -sf %{_firefoxdir}/firefox $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox
127
128 tar -xvz -C $RPM_BUILD_ROOT%{_libdir} -f dist/mozilla-firefox-*-linux-gnu.tar.gz
129
130 install browser/base/skin/Throbber.png $RPM_BUILD_ROOT%{_pixmapsdir}/mozilla-firefox.png
131 #install -m0644 bookmarks.html $RPM_BUILD_ROOT%{_firefoxdir}/defaults/profile/
132 #install -m0644 bookmarks.html $RPM_BUILD_ROOT%{_firefoxdir}/defaults/profile/US/
133
134 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
135
136 grep locale $RPM_BUILD_ROOT%{_firefoxdir}/chrome/installed-chrome.txt > $RPM_BUILD_ROOT%{_firefoxdir}/chrome/%{name}-en-US-installed-chrome.txt
137 grep -v locale $RPM_BUILD_ROOT%{_firefoxdir}/chrome/installed-chrome.txt > $RPM_BUILD_ROOT%{_firefoxdir}/chrome/%{name}-misc-installed-chrome.txt
138
139 rm -rf US classic comm embed-sample en-{US,mac,unix,win} modern pipnss pippki toolkit
140 rm -f en-win.jar en-mac.jar embed-sample.jar modern.jar
141
142 %clean
143 rm -rf $RPM_BUILD_ROOT
144
145 %post
146 umask 022
147 cat %{_firefoxdir}/chrome/*-installed-chrome.txt >%{_firefoxdir}/chrome/installed-chrome.txt
148
149 %postun
150 if [ "$1" != "0" ]; then
151         umask 022
152         cat %{_firefoxdir}/chrome/*-installed-chrome.txt >%{_firefoxdir}/chrome/installed-chrome.txt
153 fi
154
155 %post lang-en
156 umask 022
157 cat %{_firefoxdir}/chrome/*-installed-chrome.txt >%{_firefoxdir}/chrome/installed-chrome.txt
158
159 %postun lang-en
160 umask 022
161 cat %{_firefoxdir}/chrome/*-installed-chrome.txt >%{_firefoxdir}/chrome/installed-chrome.txt
162
163 %files
164 %defattr(644,root,root,755)
165 %attr(755,root,root) %{_bindir}/*
166 %dir %{_firefoxdir}
167 %{_firefoxdir}/res
168 %dir %{_firefoxdir}/components
169 %attr(755,root,root) %{_firefoxdir}/components/*.so
170 %{_firefoxdir}/components/*.js
171 %{_firefoxdir}/components/*.xpt
172 %{_firefoxdir}/components/myspell
173 %{_firefoxdir}/plugins
174 %{_firefoxdir}/searchplugins
175 %{_firefoxdir}/icons
176 %{_firefoxdir}/defaults
177 %{_firefoxdir}/ipc
178 %attr(755,root,root) %{_firefoxdir}/*.so
179 %attr(755,root,root) %{_firefoxdir}/*.sh
180 %attr(755,root,root) %{_firefoxdir}/m*
181 %attr(755,root,root) %{_firefoxdir}/f*
182 %attr(755,root,root) %{_firefoxdir}/reg*
183 %attr(755,root,root) %{_firefoxdir}/x*
184 %attr(755,root,root) %{_firefoxdir}/T*
185 %ifarch %{ix86}
186 %attr(755,root,root) %{_firefoxdir}/elf-dynstr-gc
187 %endif
188 %{_firefoxdir}/bloaturls.txt
189 %{_pixmapsdir}/*
190 %{_desktopdir}/*
191
192 %dir %{_firefoxdir}/chrome
193 %{_firefoxdir}/chrome/browser.jar
194 # -chat subpackage?
195 #%{_firefoxdir}/chrome/chatzilla.jar
196 %{_firefoxdir}/chrome/classic.jar
197 %{_firefoxdir}/chrome/comm.jar
198 %{_firefoxdir}/chrome/content-packs.jar
199 %{_firefoxdir}/chrome/help.jar
200 # -dom-inspector subpackage?
201 #%{_firefoxdir}/chrome/inspector.jar
202 %{_firefoxdir}/chrome/modern.jar
203 %{_firefoxdir}/chrome/pip*.jar
204 %{_firefoxdir}/chrome/toolkit.jar
205 %{_firefoxdir}/chrome/mozilla-firefox-misc-installed-chrome.txt
206
207 %files lang-en
208 %defattr(644,root,root,755)
209 %{_firefoxdir}/chrome/en-US.jar
210 %{_firefoxdir}/chrome/en-unix.jar
211 %{_firefoxdir}/chrome/US.jar
212 %{_firefoxdir}/chrome/mozilla-firefox-en-US-installed-chrome.txt
This page took 0.041709 seconds and 4 git commands to generate.