cd6dcadadedcedba25ed7a6200bf06d2704fec73
[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_with     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:        82.0
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:  b524ab3977349532e2c05a35c2470d10
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:  ea09026906a1350ad0914692a5b1b9dd
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 Requires:       glib2 >= 1:2.42
32 %{?with_system_gtk:Requires:    gtk+3 >= 3.22}
33 Requires:       nspr >= 1:4.29
34 Requires:       nss >= 1:3.57
35 %{?with_system_sqlite:Requires: sqlite3 >= 3.31.1}
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 %if %{with system_ffmpeg}
89 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozavcodec.so
90 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozavutil.so
91 ln -s %{_libdir}/libavcodec.so.%{avcodec_soname_ver} $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozavcodec.so
92 ln -s %{_libdir}/libavutil.so.%{avutil_soname_ver} $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozavutil.so
93 %endif
94
95 %if %{with system_gtk}
96 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozgtk.so
97 ln -s %{_libdir}/libgtk-3.so.%{gtk_soname_ver} $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozgtk.so
98 %endif
99
100 %if %{with system_sqlite}
101 # use system sqlite
102 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozsqlite3.so
103 ln -s /%{_lib}/libsqlite3.so.%{sqlite_soname_ver} $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozsqlite3.so
104 %endif
105
106 # never package these
107 # nss
108 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{freeblpriv3,nss3,nssckbi,nssutil3,smime3,softokn3,ssl3}.*
109 # nspr
110 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{nspr4,plc4,plds4}.so
111 grep -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
113
114 # remove update notifier, we prefer rpm packages for updating
115 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/updater
116 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/updater.ini
117 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/update-settings.ini
118 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/Throbber-small.gif
119
120 # remove unecessary stuff
121 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/removed-files
122
123 %clean
124 rm -rf $RPM_BUILD_ROOT
125
126 %post
127 %update_browser_plugins
128 %update_desktop_database_post
129
130 %postun
131 %update_desktop_database_postun
132 if [ "$1" = 0 ]; then
133         %update_browser_plugins
134 fi
135
136 %files
137 %defattr(644,root,root,755)
138 %attr(755,root,root) %{_bindir}/%{name}
139 %attr(755,root,root) %{_bindir}/firefox-bin
140
141 # browser plugins v2
142 %{_browserpluginsconfdir}/browsers.d/%{name}.*
143 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
144
145 %dir %{_libdir}/%{name}
146 %{_libdir}/%{name}/application.ini
147
148 %dir %{_libdir}/%{name}/browser
149 %{_libdir}/%{name}/browser/omni.ja
150
151 %{_libdir}/%{name}/omni.ja
152 %{_libdir}/%{name}/platform.ini
153 %attr(755,root,root) %{_libdir}/%{name}/firefox
154 %attr(755,root,root) %{_libdir}/%{name}/firefox-bin
155 %attr(755,root,root) %{_libdir}/%{name}/minidump-analyzer
156 %attr(755,root,root) %{_libdir}/%{name}/pingsender
157 %attr(755,root,root) %{_libdir}/%{name}/plugin-container
158 %attr(755,root,root) %{_libdir}/%{name}/precomplete
159
160 %{_libdir}/%{name}/browser/chrome
161 %{_libdir}/%{name}/defaults
162 %{_libdir}/%{name}/dependentlibs.list
163 %{_libdir}/%{name}/icons
164
165 %dir %{_libdir}/%{name}/fonts
166 %{_libdir}/%{name}/fonts/TwemojiMozilla.ttf
167
168 %dir %{_libdir}/%{name}/gtk2
169 %attr(755,root,root) %{_libdir}/%{name}/gtk2/libmozgtk.so
170
171 %dir %{_libdir}/%{name}/browser/features
172 %{_libdir}/%{name}/browser/features/doh-rollout@mozilla.org.xpi
173 %{_libdir}/%{name}/browser/features/formautofill@mozilla.org.xpi
174 %{_libdir}/%{name}/browser/features/screenshots@mozilla.org.xpi
175 %{_libdir}/%{name}/browser/features/webcompat@mozilla.org.xpi
176 %{_libdir}/%{name}/browser/features/webcompat-reporter@mozilla.org.xpi
177
178 %dir %{_libdir}/%{name}/browser/plugins
179 %attr(755,root,root) %{_libdir}/%{name}/*.so
180
181 # crashreporter
182 %attr(755,root,root) %{_libdir}/%{name}/crashreporter
183 %{_libdir}/%{name}/browser/crashreporter-override.ini
184 %{_libdir}/%{name}/crashreporter.ini
185
186 %dir %{_libdir}/%{name}/gmp-clearkey
187 %dir %{_libdir}/%{name}/gmp-clearkey/0.1
188 %{_libdir}/%{name}/gmp-clearkey/0.1/manifest.json
189 %attr(755,root,root) %{_libdir}/%{name}/gmp-clearkey/0.1/libclearkey.so
190
191 %{_pixmapsdir}/%{name}.png
192 %{_desktopdir}/%{name}.desktop
This page took 0.130968 seconds and 2 git commands to generate.