9f1f5f41fea800ad967dc48fc56a67b29a7d4469
[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:        70.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:  ff36336d5ceab51740dc305cc363a150
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:  3a45ef41eed4c642546dd9e23211294c
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:       nspr >= 1:4.22
33 Requires:       nss >= 1:3.46.1
34 %{?with_system_sqlite:Requires: sqlite3 >= 3.29.0}
35 Suggests:       pulseaudio
36 Provides:       wwwbrowser
37 Obsoletes:      mozilla-firebird
38 Conflicts:      mozilla-firefox
39 ExclusiveArch:  i686 athlon %{x8664}
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %define         _firefoxdir     %{_libdir}/%{name}
43
44 %define         moz_caps        libmozalloc.so libmozavcodec.so libmozavutil.so libclearkey.so liblgpllibs.so libmozgtk.so libmozsandbox.so libmozsqlite3.so libxpcom.so libxul.so
45 %define         sqlite_caps     libsqlite3.so
46
47 # list of files (regexps) which don't generate Provides
48 %define         _noautoprovfiles        %{_libdir}/%{name}/components
49 # list of script capabilities (regexps) not to be used in Provides
50 %define         _noautoprov             %{moz_caps}
51 %define         _noautoreq              %{_noautoprov} %{sqlite_caps} libnotify.so.1
52
53 # no debuginfo available
54 %define         _enable_debug_packages  0
55
56 %description
57 Mozilla Firefox is an open-source web browser, designed for standards
58 compliance, performance and portability.
59
60 %description -l pl.UTF-8
61 Mozilla Firefox jest open sourcową przeglądarką sieci WWW, stworzoną z
62 myślą o zgodności ze standardami, wydajnością i przenośnością.
63
64 %prep
65 %setup -qcT
66 %ifarch i686 athlon
67 %{__tar} jxf %{SOURCE0} --strip-components=1
68 %endif
69 %ifarch %{x8664}
70 %{__tar} jxf %{SOURCE1} --strip-components=1
71 %endif
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75 install -d \
76         $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/%{name}/browser/plugins} \
77         $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}}
78
79 cp -a . $RPM_BUILD_ROOT%{_libdir}/%{name}
80 sed 's,@LIBDIR@,%{_libdir},' %{SOURCE3} > $RPM_BUILD_ROOT%{_bindir}/%{name}
81 ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/firefox-bin
82 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
83 cp -a browser/chrome/icons/default/default128.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
84
85 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/browser/plugins
86
87 %if %{with system_ffmpeg}
88 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozavcodec.so
89 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozavutil.so
90 ln -s %{_libdir}/libavcodec.so.%{avcodec_soname_ver} $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozavcodec.so
91 ln -s %{_libdir}/libavutil.so.%{avutil_soname_ver} $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozavutil.so
92 %endif
93
94 %if %{with system_gtk}
95 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozgtk.so
96 ln -s %{_libdir}/libgtk-3.so.%{gtk_soname_ver} $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozgtk.so
97 %endif
98
99 %if %{with system_sqlite}
100 # use system sqlite
101 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozsqlite3.so
102 ln -s /%{_lib}/libsqlite3.so.%{sqlite_soname_ver} $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozsqlite3.so
103 %endif
104
105 # never package these
106 # nss
107 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{freeblpriv3,nss3,nssckbi,nssdbm3,nssutil3,smime3,softokn3,ssl3}.*
108 # nspr
109 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{nspr4,plc4,plds4}.so
110 grep -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
112
113 # remove update notifier, we prefer rpm packages for updating
114 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/updater
115 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/updater.ini
116 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/update-settings.ini
117 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/Throbber-small.gif
118
119 # remove unecessary stuff
120 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/removed-files
121
122 %clean
123 rm -rf $RPM_BUILD_ROOT
124
125 %post
126 %update_browser_plugins
127 %update_desktop_database_post
128
129 %postun
130 %update_desktop_database_postun
131 if [ "$1" = 0 ]; then
132         %update_browser_plugins
133 fi
134
135 %files
136 %defattr(644,root,root,755)
137 %attr(755,root,root) %{_bindir}/%{name}
138 %attr(755,root,root) %{_bindir}/firefox-bin
139
140 # browser plugins v2
141 %{_browserpluginsconfdir}/browsers.d/%{name}.*
142 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
143
144 %dir %{_libdir}/%{name}
145 %{_libdir}/%{name}/application.ini
146 %{_libdir}/%{name}/chrome.manifest
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
153 %{_libdir}/%{name}/omni.ja
154 %{_libdir}/%{name}/platform.ini
155 %attr(755,root,root) %{_libdir}/%{name}/firefox
156 %attr(755,root,root) %{_libdir}/%{name}/firefox-bin
157 %attr(755,root,root) %{_libdir}/%{name}/minidump-analyzer
158 %attr(755,root,root) %{_libdir}/%{name}/pingsender
159 %attr(755,root,root) %{_libdir}/%{name}/plugin-container
160 %attr(755,root,root) %{_libdir}/%{name}/precomplete
161
162 %{_libdir}/%{name}/browser/chrome
163 %{_libdir}/%{name}/defaults
164 %{_libdir}/%{name}/dependentlibs.list
165 %{_libdir}/%{name}/icons
166
167 %dir %{_libdir}/%{name}/fonts
168 %{_libdir}/%{name}/fonts/TwemojiMozilla.ttf
169
170 %dir %{_libdir}/%{name}/gtk2
171 %attr(755,root,root) %{_libdir}/%{name}/gtk2/libmozgtk.so
172
173 %dir %{_libdir}/%{name}/browser/features
174 %{_libdir}/%{name}/browser/features/formautofill@mozilla.org.xpi
175 %{_libdir}/%{name}/browser/features/screenshots@mozilla.org.xpi
176 %{_libdir}/%{name}/browser/features/webcompat@mozilla.org.xpi
177 %{_libdir}/%{name}/browser/features/webcompat-reporter@mozilla.org.xpi
178
179 %dir %{_libdir}/%{name}/browser/plugins
180 %attr(755,root,root) %{_libdir}/%{name}/*.so
181
182 # crashreporter
183 %attr(755,root,root) %{_libdir}/%{name}/crashreporter
184 %{_libdir}/%{name}/browser/crashreporter-override.ini
185 %{_libdir}/%{name}/crashreporter.ini
186
187 %dir %{_libdir}/%{name}/gmp-clearkey
188 %dir %{_libdir}/%{name}/gmp-clearkey/0.1
189 %{_libdir}/%{name}/gmp-clearkey/0.1/manifest.json
190 %attr(755,root,root) %{_libdir}/%{name}/gmp-clearkey/0.1/libclearkey.so
191
192 %{_pixmapsdir}/%{name}.png
193 %{_desktopdir}/%{name}.desktop
This page took 0.048905 seconds and 2 git commands to generate.