up to 80.0
[packages/mozilla-firefox-bin.git] / mozilla-firefox-bin.spec
CommitLineData
323a3dea 1# Conditional build:
41098426 2%bcond_with system_ffmpeg # build with system ffmpeg library
323a3dea 3%bcond_without system_gtk # build with internal gtk library
1a05f32d 4%bcond_with system_sqlite # build with internal sqlite library
323a3dea 5
0ee9c31a 6%define realname firefox
323a3dea
JP
7%define avcodec_soname_ver 57
8%define avutil_soname_ver 55
9%define gtk_soname_ver 0
10%define sqlite_soname_ver 0
0ee9c31a 11Summary: Mozilla Firefox web browser
42b6dbdb 12Summary(pl.UTF-8): Mozilla Firefox - przeglądarka WWW
0ee9c31a 13Name: mozilla-firefox-bin
6e3970fd 14Version: 80.0
f9b99426 15Release: 1
0ee9c31a 16License: MPL/LGPL
17Group: X11/Applications/Networking
53cf26c7 18Source0: https://ftp.mozilla.org/pub/firefox/releases/%{version}/linux-i686/en-US/%{realname}-%{version}.tar.bz2?/%{realname}-%{version}.i686.tar.bz2
6e3970fd 19# Source0-md5: 45f185a70e57fa6a33174d495eed5c47
53cf26c7 20Source1: https://ftp.mozilla.org/pub/firefox/releases/%{version}/linux-x86_64/en-US/%{realname}-%{version}.tar.bz2?/%{realname}-%{version}.x8664.tar.bz2
6e3970fd 21# Source1-md5: 5f79c169c70451b24804a33b28aec503
bf425d99 22Source2: %{name}.desktop
23Source3: %{name}.sh
dc61d8d8 24URL: https://www.mozilla.org/firefox/
84e0e533 25BuildRequires: rpmbuild(macros) >= 1.453
795e56bb 26BuildRequires: zip
76503d5c 27Requires(post,postun): desktop-file-utils
84e0e533 28Requires: browser-plugins >= 2.0
1392096a 29Requires: cpuinfo(sse2)
efbd41ad 30%{?with_system_ffmpeg:Requires: ffmpeg-libs >= 3.4}
6e3970fd 31Requires: glib2 >= 1:2.42
323a3dea 32%{?with_system_gtk:Requires: gtk+3 >= 3.22}
6e3970fd
JP
33Requires: nspr >= 1:4.27
34Requires: nss >= 1:3.55
3a57c39f 35%{?with_system_sqlite:Requires: sqlite3 >= 3.31.1}
062c1f9d 36Suggests: pulseaudio
84e0e533 37Provides: wwwbrowser
0ee9c31a 38Obsoletes: mozilla-firebird
39Conflicts: mozilla-firefox
bf425d99 40ExclusiveArch: i686 athlon %{x8664}
0ee9c31a 41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43%define _firefoxdir %{_libdir}/%{name}
cb99552d 44
12411620 45%define moz_caps libmozalloc.so libmozavcodec.so libmozavutil.so libclearkey.so liblgpllibs.so libmozgtk.so libmozsandbox.so libmozsqlite3.so libxpcom.so libxul.so
48ac9971 46%define sqlite_caps libsqlite3.so
ac3e1eda 47
cb99552d 48# list of files (regexps) which don't generate Provides
f757977d 49%define _noautoprovfiles %{_libdir}/%{name}/components
cb99552d 50# list of script capabilities (regexps) not to be used in Provides
dc61d8d8
JR
51%define _noautoprov %{moz_caps}
52%define _noautoreq %{_noautoprov} %{sqlite_caps} libnotify.so.1
0ee9c31a 53
0ad73835
ER
54# no debuginfo available
55%define _enable_debug_packages 0
56
0ee9c31a 57%description
58Mozilla Firefox is an open-source web browser, designed for standards
59compliance, performance and portability.
60
dc043ca8
JR
61%description -l pl.UTF-8
62Mozilla Firefox jest open sourcową przeglądarką sieci WWW, stworzoną z
63myślą o zgodności ze standardami, wydajnością i przenośnością.
0ee9c31a 64
65%prep
2f8b63bb 66%setup -qcT
bf425d99 67%ifarch i686 athlon
2f8b63bb 68%{__tar} jxf %{SOURCE0} --strip-components=1
bf425d99 69%endif
70%ifarch %{x8664}
71%{__tar} jxf %{SOURCE1} --strip-components=1
72%endif
72435308 73
0ee9c31a 74%install
75rm -rf $RPM_BUILD_ROOT
76install -d \
e226b9b4 77 $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/%{name}/browser/plugins} \
bf425d99 78 $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}}
0ee9c31a 79
22ff9bcb 80cp -a . $RPM_BUILD_ROOT%{_libdir}/%{name}
bf425d99 81sed 's,@LIBDIR@,%{_libdir},' %{SOURCE3} > $RPM_BUILD_ROOT%{_bindir}/%{name}
16b5e263 82ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/firefox-bin
bf425d99 83cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
dec297f1 84cp -a browser/chrome/icons/default/default128.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
84e0e533 85
e226b9b4 86%browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/browser/plugins
0ee9c31a 87
323a3dea
JP
88%if %{with system_ffmpeg}
89rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozavcodec.so
90rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozavutil.so
91ln -s %{_libdir}/libavcodec.so.%{avcodec_soname_ver} $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozavcodec.so
92ln -s %{_libdir}/libavutil.so.%{avutil_soname_ver} $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozavutil.so
93%endif
94
95%if %{with system_gtk}
96rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozgtk.so
97ln -s %{_libdir}/libgtk-3.so.%{gtk_soname_ver} $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozgtk.so
98%endif
99
100%if %{with system_sqlite}
48ac9971 101# use system sqlite
8132f653 102rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozsqlite3.so
323a3dea
JP
103ln -s /%{_lib}/libsqlite3.so.%{sqlite_soname_ver} $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozsqlite3.so
104%endif
48ac9971 105
16b5e263
ER
106# never package these
107# nss
f9b99426 108rm $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{freeblpriv3,nss3,nssckbi,nssutil3,smime3,softokn3,ssl3}.*
16b5e263 109# nspr
8132f653 110rm $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{nspr4,plc4,plds4}.so
fb6523f1
JP
111grep -v 'libnspr4.so\|libplc4.so\|libplds4.so\|libnssutil3.so\|libnss3.so\|libsmime3.so\|libssl3.so' \
112 dependentlibs.list > $RPM_BUILD_ROOT%{_libdir}/%{name}/dependentlibs.list
16b5e263 113
b8a1cad4 114# remove update notifier, we prefer rpm packages for updating
8132f653
JP
115rm $RPM_BUILD_ROOT%{_libdir}/%{name}/updater
116rm $RPM_BUILD_ROOT%{_libdir}/%{name}/updater.ini
117rm $RPM_BUILD_ROOT%{_libdir}/%{name}/update-settings.ini
118rm $RPM_BUILD_ROOT%{_libdir}/%{name}/Throbber-small.gif
b8a1cad4 119
16b5e263 120# remove unecessary stuff
16b5e263
ER
121rm $RPM_BUILD_ROOT%{_libdir}/%{name}/removed-files
122
0ee9c31a 123%clean
124rm -rf $RPM_BUILD_ROOT
125
84e0e533
ER
126%post
127%update_browser_plugins
76503d5c 128%update_desktop_database_post
84e0e533
ER
129
130%postun
76503d5c 131%update_desktop_database_postun
84e0e533
ER
132if [ "$1" = 0 ]; then
133 %update_browser_plugins
134fi
135
0ee9c31a 136%files
137%defattr(644,root,root,755)
16b5e263 138%attr(755,root,root) %{_bindir}/%{name}
2afe0ea7 139%attr(755,root,root) %{_bindir}/firefox-bin
84e0e533
ER
140
141# browser plugins v2
142%{_browserpluginsconfdir}/browsers.d/%{name}.*
143%config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
144
f757977d 145%dir %{_libdir}/%{name}
88e4d241 146%{_libdir}/%{name}/application.ini
e226b9b4
JP
147
148%dir %{_libdir}/%{name}/browser
e226b9b4
JP
149%{_libdir}/%{name}/browser/omni.ja
150
5e781f69 151%{_libdir}/%{name}/omni.ja
b8a1cad4
ER
152%{_libdir}/%{name}/platform.ini
153%attr(755,root,root) %{_libdir}/%{name}/firefox
154%attr(755,root,root) %{_libdir}/%{name}/firefox-bin
1f70f23f 155%attr(755,root,root) %{_libdir}/%{name}/minidump-analyzer
fdcfda00 156%attr(755,root,root) %{_libdir}/%{name}/pingsender
b8a1cad4 157%attr(755,root,root) %{_libdir}/%{name}/plugin-container
fdcfda00 158%attr(755,root,root) %{_libdir}/%{name}/precomplete
b8a1cad4 159
e226b9b4 160%{_libdir}/%{name}/browser/chrome
b8a1cad4 161%{_libdir}/%{name}/defaults
fb6523f1 162%{_libdir}/%{name}/dependentlibs.list
b8a1cad4 163%{_libdir}/%{name}/icons
b8a1cad4 164
8e44e5a6 165%dir %{_libdir}/%{name}/fonts
929e162c 166%{_libdir}/%{name}/fonts/TwemojiMozilla.ttf
8e44e5a6 167
02ff03d0 168%dir %{_libdir}/%{name}/gtk2
247bca6f
JR
169%attr(755,root,root) %{_libdir}/%{name}/gtk2/libmozgtk.so
170
327f328e 171%dir %{_libdir}/%{name}/browser/features
1b6dfaf1 172%{_libdir}/%{name}/browser/features/doh-rollout@mozilla.org.xpi
5bbe6f0c 173%{_libdir}/%{name}/browser/features/formautofill@mozilla.org.xpi
fdcfda00 174%{_libdir}/%{name}/browser/features/screenshots@mozilla.org.xpi
53cf26c7 175%{_libdir}/%{name}/browser/features/webcompat@mozilla.org.xpi
929e162c 176%{_libdir}/%{name}/browser/features/webcompat-reporter@mozilla.org.xpi
b8a1cad4 177
e226b9b4 178%dir %{_libdir}/%{name}/browser/plugins
f757977d 179%attr(755,root,root) %{_libdir}/%{name}/*.so
b8a1cad4
ER
180
181# crashreporter
182%attr(755,root,root) %{_libdir}/%{name}/crashreporter
e226b9b4 183%{_libdir}/%{name}/browser/crashreporter-override.ini
b8a1cad4
ER
184%{_libdir}/%{name}/crashreporter.ini
185
8132f653
JP
186%dir %{_libdir}/%{name}/gmp-clearkey
187%dir %{_libdir}/%{name}/gmp-clearkey/0.1
1392096a 188%{_libdir}/%{name}/gmp-clearkey/0.1/manifest.json
8132f653
JP
189%attr(755,root,root) %{_libdir}/%{name}/gmp-clearkey/0.1/libclearkey.so
190
16b5e263
ER
191%{_pixmapsdir}/%{name}.png
192%{_desktopdir}/%{name}.desktop
This page took 2.690343 seconds and 4 git commands to generate.