edaab9754e4c9de48f1ecdafe6987340f2a02a81
[packages/mozilla-firefox-bin.git] / mozilla-firefox-bin.spec
1 # Conditional build:
2 %bcond_with     system_ffmpeg   # build with system ffmpeg library
3 %bcond_without  system_gtk      # build with internal gtk library
4 %bcond_without  system_sqlite   # build with internal sqlite library
5
6 %define         realname        firefox
7 %define         avcodec_soname_ver      57
8 %define         avutil_soname_ver       55
9 %define         gtk_soname_ver          0
10 %define         sqlite_soname_ver       0
11 Summary:        Mozilla Firefox web browser
12 Summary(pl.UTF-8):      Mozilla Firefox - przeglądarka WWW
13 Name:           mozilla-firefox-bin
14 Version:        60.0.1
15 Release:        1
16 License:        MPL/LGPL
17 Group:          X11/Applications/Networking
18 Source0:        https://ftp.mozilla.org/pub/firefox/releases/%{version}/linux-i686/en-US/%{realname}-%{version}.tar.bz2?/%{realname}-%{version}.i686.tar.bz2
19 # Source0-md5:  06c77a44cb7787867e9640d987a68584
20 Source1:        https://ftp.mozilla.org/pub/firefox/releases/%{version}/linux-x86_64/en-US/%{realname}-%{version}.tar.bz2?/%{realname}-%{version}.x8664.tar.bz2
21 # Source1-md5:  f2617ba957a58e7d97ccf4f83c7436e0
22 Source2:        %{name}.desktop
23 Source3:        %{name}.sh
24 URL:            https://www.mozilla.org/firefox/
25 BuildRequires:  rpmbuild(macros) >= 1.453
26 BuildRequires:  zip
27 Requires(post,postun):  desktop-file-utils
28 Requires:       browser-plugins >= 2.0
29 Requires:       cpuinfo(sse2)
30 %{?with_system_ffmpeg:Requires: ffmpeg-libs >= 3.4}
31 %{?with_system_gtk:Requires:    gtk+3 >= 3.22}
32 Requires:       myspell-common
33 Requires:       nspr >= 1:4.19
34 Requires:       nss >= 1:3.36.1
35 %{?with_system_sqlite:Requires: sqlite3 >= 3.22.0}
36 Suggests:       pulseaudio
37 Provides:       wwwbrowser
38 Obsoletes:      mozilla-firebird
39 Conflicts:      mozilla-firefox
40 ExclusiveArch:  i686 athlon %{x8664}
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %define         _firefoxdir     %{_libdir}/%{name}
44
45 %define         moz_caps        libmozalloc.so libmozavcodec.so libmozavutil.so libclearkey.so liblgpllibs.so libmozgtk.so libmozsandbox.so libmozsqlite3.so libxpcom.so libxul.so
46 %define         sqlite_caps     libsqlite3.so
47
48 # list of files (regexps) which don't generate Provides
49 %define         _noautoprovfiles        %{_libdir}/%{name}/components
50 # list of script capabilities (regexps) not to be used in Provides
51 %define         _noautoprov             %{moz_caps}
52 %define         _noautoreq              %{_noautoprov} %{sqlite_caps} libnotify.so.1
53
54 # no debuginfo available
55 %define         _enable_debug_packages  0
56
57 %description
58 Mozilla Firefox is an open-source web browser, designed for standards
59 compliance, performance and portability.
60
61 %description -l pl.UTF-8
62 Mozilla Firefox jest open sourcową przeglądarką sieci WWW, stworzoną z
63 myślą o zgodności ze standardami, wydajnością i przenośnością.
64
65 %prep
66 %setup -qcT
67 %ifarch i686 athlon
68 %{__tar} jxf %{SOURCE0} --strip-components=1
69 %endif
70 %ifarch %{x8664}
71 %{__tar} jxf %{SOURCE1} --strip-components=1
72 %endif
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76 install -d \
77         $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/%{name}/browser/plugins} \
78         $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}}
79
80 cp -a . $RPM_BUILD_ROOT%{_libdir}/%{name}
81 sed 's,@LIBDIR@,%{_libdir},' %{SOURCE3} > $RPM_BUILD_ROOT%{_bindir}/%{name}
82 ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/firefox-bin
83 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
84 cp -a browser/chrome/icons/default/default128.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
85
86 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/browser/plugins
87
88 # use system dict
89 rm -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
90 ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
91
92 %if %{with system_ffmpeg}
93 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozavcodec.so
94 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozavutil.so
95 ln -s %{_libdir}/libavcodec.so.%{avcodec_soname_ver} $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozavcodec.so
96 ln -s %{_libdir}/libavutil.so.%{avutil_soname_ver} $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozavutil.so
97 %endif
98
99 %if %{with system_gtk}
100 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozgtk.so
101 ln -s %{_libdir}/libgtk-3.so.%{gtk_soname_ver} $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozgtk.so
102 %endif
103
104 %if %{with system_sqlite}
105 # use system sqlite
106 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozsqlite3.so
107 ln -s /%{_lib}/libsqlite3.so.%{sqlite_soname_ver} $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozsqlite3.so
108 %endif
109
110 # never package these
111 # nss
112 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{freeblpriv3,nss3,nssckbi,nssdbm3,nssutil3,smime3,softokn3,ssl3}.*
113 # nspr
114 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{nspr4,plc4,plds4}.so
115 grep -v 'libnspr4.so\|libplc4.so\|libplds4.so\|libnssutil3.so\|libnss3.so\|libsmime3.so\|libssl3.so' \
116         dependentlibs.list > $RPM_BUILD_ROOT%{_libdir}/%{name}/dependentlibs.list
117
118 # remove update notifier, we prefer rpm packages for updating
119 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/updater
120 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/updater.ini
121 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/update-settings.ini
122 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/Throbber-small.gif
123
124 # remove unecessary stuff
125 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/removed-files
126
127 %clean
128 rm -rf $RPM_BUILD_ROOT
129
130 %pretrans
131 if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
132         mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
133 fi
134 exit 0
135
136 %post
137 %update_browser_plugins
138 %update_desktop_database_post
139
140 %postun
141 %update_desktop_database_postun
142 if [ "$1" = 0 ]; then
143         %update_browser_plugins
144 fi
145
146 %files
147 %defattr(644,root,root,755)
148 %attr(755,root,root) %{_bindir}/%{name}
149 %attr(755,root,root) %{_bindir}/firefox-bin
150
151 # browser plugins v2
152 %{_browserpluginsconfdir}/browsers.d/%{name}.*
153 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
154
155 %dir %{_libdir}/%{name}
156 %{_libdir}/%{name}/application.ini
157 %{_libdir}/%{name}/chrome.manifest
158
159 %dir %{_libdir}/%{name}/browser
160 %{_libdir}/%{name}/browser/blocklist.xml
161 %{_libdir}/%{name}/browser/chrome.manifest
162 %{_libdir}/%{name}/browser/omni.ja
163
164 %{_libdir}/%{name}/omni.ja
165 %{_libdir}/%{name}/platform.ini
166 %attr(755,root,root) %{_libdir}/%{name}/firefox
167 %attr(755,root,root) %{_libdir}/%{name}/firefox-bin
168 %attr(755,root,root) %{_libdir}/%{name}/minidump-analyzer
169 %attr(755,root,root) %{_libdir}/%{name}/pingsender
170 %attr(755,root,root) %{_libdir}/%{name}/plugin-container
171 %attr(755,root,root) %{_libdir}/%{name}/precomplete
172
173 %{_libdir}/%{name}/browser/chrome
174 %{_libdir}/%{name}/defaults
175 %{_libdir}/%{name}/dependentlibs.list
176 %{_libdir}/%{name}/dictionaries
177 %{_libdir}/%{name}/icons
178
179 %dir %{_libdir}/%{name}/fonts
180 %{_libdir}/%{name}/fonts/EmojiOneMozilla.ttf
181
182 %dir %{_libdir}/%{name}/gtk2
183 %attr(755,root,root) %{_libdir}/%{name}/gtk2/libmozgtk.so
184
185 %dir %{_libdir}/%{name}/browser/extensions
186 # the signature of the default theme
187 %{_libdir}/%{name}/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi
188
189 %dir %{_libdir}/%{name}/browser/features
190 %{_libdir}/%{name}/browser/features/activity-stream@mozilla.org.xpi
191 %{_libdir}/%{name}/browser/features/aushelper@mozilla.org.xpi
192 %{_libdir}/%{name}/browser/features/firefox@getpocket.com.xpi
193 %{_libdir}/%{name}/browser/features/followonsearch@mozilla.com.xpi
194 %{_libdir}/%{name}/browser/features/formautofill@mozilla.org.xpi
195 %{_libdir}/%{name}/browser/features/onboarding@mozilla.org.xpi
196 %{_libdir}/%{name}/browser/features/screenshots@mozilla.org.xpi
197 %{_libdir}/%{name}/browser/features/webcompat@mozilla.org.xpi
198
199 %dir %{_libdir}/%{name}/browser/plugins
200 %attr(755,root,root) %{_libdir}/%{name}/*.so
201
202 # crashreporter
203 %attr(755,root,root) %{_libdir}/%{name}/crashreporter
204 %{_libdir}/%{name}/browser/crashreporter-override.ini
205 %{_libdir}/%{name}/crashreporter.ini
206
207 %dir %{_libdir}/%{name}/gmp-clearkey
208 %dir %{_libdir}/%{name}/gmp-clearkey/0.1
209 %{_libdir}/%{name}/gmp-clearkey/0.1/manifest.json
210 %attr(755,root,root) %{_libdir}/%{name}/gmp-clearkey/0.1/libclearkey.so
211
212 %{_pixmapsdir}/%{name}.png
213 %{_desktopdir}/%{name}.desktop
This page took 0.056676 seconds and 2 git commands to generate.