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