link libmozgtk/libmozav* to system libs by default
[packages/mozilla-firefox-bin.git] / mozilla-firefox-bin.spec
CommitLineData
323a3dea
JP
1# Conditional build:
2%bcond_without system_ffmpeg # build with internal ffmpeg library
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
86be72bc 14Version: 53.0.3
0f54818d 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
86be72bc 19# Source0-md5: 0339f0a8be0e5af9a206bdfe67689cf8
53cf26c7 20Source1: https://ftp.mozilla.org/pub/firefox/releases/%{version}/linux-x86_64/en-US/%{realname}-%{version}.tar.bz2?/%{realname}-%{version}.x8664.tar.bz2
86be72bc 21# Source1-md5: 6219384d2631020adf1b5bb96f73621d
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)
323a3dea
JP
30%{?with_system_ffmpeg:Requires: ffmpeg-libs >= 3.2}
31%{?with_system_gtk:Requires: gtk+3 >= 3.22}
48ac9971 32Requires: myspell-common
3f1571af 33Requires: nspr >= 1:4.13.1
1392096a 34Requires: nss >= 1:3.29.5
323a3dea 35%{?with_system_sqlite:Requires: sqlite3 >= 3.17.0}
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}
e226b9b4 84cp -a browser/icons/mozicon128.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
84e0e533 85
e226b9b4 86%browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/browser/plugins
0ee9c31a 87
48ac9971 88# use system dict
8132f653 89rm -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
48ac9971
ER
90ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
91
323a3dea
JP
92%if %{with system_ffmpeg}
93rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozavcodec.so
94rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozavutil.so
95ln -s %{_libdir}/libavcodec.so.%{avcodec_soname_ver} $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozavcodec.so
96ln -s %{_libdir}/libavutil.so.%{avutil_soname_ver} $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozavutil.so
97%endif
98
99%if %{with system_gtk}
100rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozgtk.so
101ln -s %{_libdir}/libgtk-3.so.%{gtk_soname_ver} $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozgtk.so
102%endif
103
104%if %{with system_sqlite}
48ac9971 105# use system sqlite
8132f653 106rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozsqlite3.so
323a3dea
JP
107ln -s /%{_lib}/libsqlite3.so.%{sqlite_soname_ver} $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozsqlite3.so
108%endif
48ac9971 109
16b5e263
ER
110# never package these
111# nss
655aa374 112rm $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{freeblpriv3,nss3,nssckbi,nssdbm3,nssutil3,smime3,softokn3,ssl3}.*
16b5e263 113# nspr
8132f653 114rm $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{nspr4,plc4,plds4}.so
fb6523f1
JP
115grep -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
16b5e263 117
b8a1cad4 118# remove update notifier, we prefer rpm packages for updating
8132f653
JP
119rm $RPM_BUILD_ROOT%{_libdir}/%{name}/updater
120rm $RPM_BUILD_ROOT%{_libdir}/%{name}/updater.ini
121rm $RPM_BUILD_ROOT%{_libdir}/%{name}/update-settings.ini
122rm $RPM_BUILD_ROOT%{_libdir}/%{name}/Throbber-small.gif
b8a1cad4 123
16b5e263 124# remove unecessary stuff
16b5e263
ER
125rm $RPM_BUILD_ROOT%{_libdir}/%{name}/removed-files
126
0ee9c31a 127%clean
128rm -rf $RPM_BUILD_ROOT
129
48ac9971
ER
130%pretrans
131if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
132 mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
133fi
134exit 0
135
84e0e533
ER
136%post
137%update_browser_plugins
76503d5c 138%update_desktop_database_post
84e0e533
ER
139
140%postun
76503d5c 141%update_desktop_database_postun
84e0e533
ER
142if [ "$1" = 0 ]; then
143 %update_browser_plugins
144fi
145
0ee9c31a 146%files
147%defattr(644,root,root,755)
16b5e263 148%attr(755,root,root) %{_bindir}/%{name}
2afe0ea7 149%attr(755,root,root) %{_bindir}/firefox-bin
84e0e533
ER
150
151# browser plugins v2
152%{_browserpluginsconfdir}/browsers.d/%{name}.*
153%config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
154
f757977d 155%dir %{_libdir}/%{name}
88e4d241 156%{_libdir}/%{name}/application.ini
1f70f23f
JP
157%{_libdir}/%{name}/chrome.manifest
158%{_libdir}/%{name}/icudt58l.dat
e226b9b4
JP
159
160%dir %{_libdir}/%{name}/browser
161%{_libdir}/%{name}/browser/blocklist.xml
162%{_libdir}/%{name}/browser/chrome.manifest
163%{_libdir}/%{name}/browser/omni.ja
164
5e781f69 165%{_libdir}/%{name}/omni.ja
b8a1cad4
ER
166%{_libdir}/%{name}/platform.ini
167%attr(755,root,root) %{_libdir}/%{name}/firefox
168%attr(755,root,root) %{_libdir}/%{name}/firefox-bin
1f70f23f 169%attr(755,root,root) %{_libdir}/%{name}/minidump-analyzer
96fa404a 170%attr(755,root,root) %{_libdir}/%{name}/precomplete
b8a1cad4
ER
171%attr(755,root,root) %{_libdir}/%{name}/plugin-container
172
e226b9b4
JP
173%{_libdir}/%{name}/browser/chrome
174%{_libdir}/%{name}/browser/icons
b8a1cad4 175%{_libdir}/%{name}/defaults
fb6523f1 176%{_libdir}/%{name}/dependentlibs.list
b8a1cad4 177%{_libdir}/%{name}/dictionaries
b8a1cad4 178%{_libdir}/%{name}/icons
b8a1cad4 179
8e44e5a6
JP
180%dir %{_libdir}/%{name}/fonts
181%{_libdir}/%{name}/fonts/EmojiOneMozilla.ttf
182
02ff03d0 183%dir %{_libdir}/%{name}/gtk2
247bca6f
JR
184%attr(755,root,root) %{_libdir}/%{name}/gtk2/libmozgtk.so
185
e226b9b4 186%dir %{_libdir}/%{name}/browser/extensions
9f7f0cd1 187# the signature of the default theme
327f328e 188%{_libdir}/%{name}/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi
9f7f0cd1 189
327f328e 190%dir %{_libdir}/%{name}/browser/features
8e44e5a6 191%{_libdir}/%{name}/browser/features/aushelper@mozilla.org.xpi
6ece1c9b
JR
192%{_libdir}/%{name}/browser/features/e10srollout@mozilla.org.xpi
193%{_libdir}/%{name}/browser/features/firefox@getpocket.com.xpi
53cf26c7 194%{_libdir}/%{name}/browser/features/webcompat@mozilla.org.xpi
b8a1cad4 195
e226b9b4 196%dir %{_libdir}/%{name}/browser/plugins
f757977d
ER
197%attr(755,root,root) %{_libdir}/%{name}/*.so
198%attr(755,root,root) %{_libdir}/%{name}/*.sh
b8a1cad4
ER
199
200# crashreporter
201%attr(755,root,root) %{_libdir}/%{name}/crashreporter
e226b9b4 202%{_libdir}/%{name}/browser/crashreporter-override.ini
b8a1cad4
ER
203%{_libdir}/%{name}/crashreporter.ini
204
8132f653
JP
205%dir %{_libdir}/%{name}/gmp-clearkey
206%dir %{_libdir}/%{name}/gmp-clearkey/0.1
1392096a 207%{_libdir}/%{name}/gmp-clearkey/0.1/manifest.json
8132f653
JP
208%attr(755,root,root) %{_libdir}/%{name}/gmp-clearkey/0.1/libclearkey.so
209
16b5e263
ER
210%{_pixmapsdir}/%{name}.png
211%{_desktopdir}/%{name}.desktop
This page took 1.456783 seconds and 4 git commands to generate.