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