dc0308d7688909c1dc97b9b123144761205e7449
[packages/mozilla-firefox-bin.git] / mozilla-firefox-bin.spec
1 %define         realname        firefox
2 Summary:        Mozilla Firefox web browser
3 Summary(pl.UTF-8):      Mozilla Firefox - przeglądarka WWW
4 Name:           mozilla-firefox-bin
5 Version:        50.1.0
6 Release:        1
7 License:        MPL/LGPL
8 Group:          X11/Applications/Networking
9 Source0:        https://ftp.mozilla.org/pub/firefox/releases/%{version}/linux-i686/en-US/%{realname}-%{version}.tar.bz2?/%{realname}-%{version}.i686.tar.bz2
10 # Source0-md5:  47fb3edd773a9d107de2076be2b1647f
11 Source1:        https://ftp.mozilla.org/pub/firefox/releases/%{version}/linux-x86_64/en-US/%{realname}-%{version}.tar.bz2?/%{realname}-%{version}.x8664.tar.bz2
12 # Source1-md5:  335635575a221d4eeeb83865be405b51
13 Source2:        %{name}.desktop
14 Source3:        %{name}.sh
15 URL:            https://www.mozilla.org/firefox/
16 BuildRequires:  rpmbuild(macros) >= 1.453
17 BuildRequires:  zip
18 Requires(post,postun):  desktop-file-utils
19 Requires:       browser-plugins >= 2.0
20 Requires:       myspell-common
21 Requires:       nspr >= 1:4.12
22 Requires:       nss >= 1:3.26.2
23 Requires:       sqlite3 >= 3.13.0
24 Provides:       wwwbrowser
25 Obsoletes:      mozilla-firebird
26 Conflicts:      mozilla-firefox
27 ExclusiveArch:  i686 athlon %{x8664}
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %define         _firefoxdir     %{_libdir}/%{name}
31
32 %define         moz_caps        libmozalloc.so libmozsqlite3.so libxpcom.so libxul.so
33 %define         sqlite_caps     libsqlite3.so
34
35 # list of files (regexps) which don't generate Provides
36 %define         _noautoprovfiles        %{_libdir}/%{name}/components
37 # list of script capabilities (regexps) not to be used in Provides
38 %define         _noautoprov             %{moz_caps}
39 %define         _noautoreq              %{_noautoprov} %{sqlite_caps} libnotify.so.1
40
41 # no debuginfo available
42 %define         _enable_debug_packages  0
43
44 %description
45 Mozilla Firefox is an open-source web browser, designed for standards
46 compliance, performance and portability.
47
48 %description -l pl.UTF-8
49 Mozilla Firefox jest open sourcową przeglądarką sieci WWW, stworzoną z
50 myślą o zgodności ze standardami, wydajnością i przenośnością.
51
52 %prep
53 %setup -qcT
54 %ifarch i686 athlon
55 %{__tar} jxf %{SOURCE0} --strip-components=1
56 %endif
57 %ifarch %{x8664}
58 %{__tar} jxf %{SOURCE1} --strip-components=1
59 %endif
60
61 %install
62 rm -rf $RPM_BUILD_ROOT
63 install -d \
64         $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/%{name}/browser/plugins} \
65         $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}}
66
67 cp -a . $RPM_BUILD_ROOT%{_libdir}/%{name}
68 sed 's,@LIBDIR@,%{_libdir},' %{SOURCE3} > $RPM_BUILD_ROOT%{_bindir}/%{name}
69 ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/firefox-bin
70 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
71 cp -a browser/icons/mozicon128.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
72
73 %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/browser/plugins
74
75 # use system dict
76 rm -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
77 ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
78
79 # use system sqlite
80 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozsqlite3.so
81 ln -s /%{_lib}/libsqlite3.so.0 $RPM_BUILD_ROOT%{_libdir}/%{name}/libmozsqlite3.so
82
83 # never package these
84 # nss
85 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{freeblpriv3,nss3,nssckbi,nssdbm3,nssutil3,smime3,softokn3,ssl3}.*
86 # nspr
87 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{nspr4,plc4,plds4}.so
88 grep -v 'libnspr4.so\|libplc4.so\|libplds4.so\|libnssutil3.so\|libnss3.so\|libsmime3.so\|libssl3.so' \
89         dependentlibs.list > $RPM_BUILD_ROOT%{_libdir}/%{name}/dependentlibs.list
90
91 # remove update notifier, we prefer rpm packages for updating
92 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/updater
93 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/updater.ini
94 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/update-settings.ini
95 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/Throbber-small.gif
96
97 # remove unecessary stuff
98 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/removed-files
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %pretrans
104 if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
105         mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
106 fi
107 exit 0
108
109 %post
110 %update_browser_plugins
111 %update_desktop_database_post
112
113 %postun
114 %update_desktop_database_postun
115 if [ "$1" = 0 ]; then
116         %update_browser_plugins
117 fi
118
119 %files
120 %defattr(644,root,root,755)
121 %attr(755,root,root) %{_bindir}/%{name}
122 %attr(755,root,root) %{_bindir}/firefox-bin
123
124 # browser plugins v2
125 %{_browserpluginsconfdir}/browsers.d/%{name}.*
126 %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
127
128 %dir %{_libdir}/%{name}
129 %{_libdir}/%{name}/application.ini
130 %{_libdir}/%{name}/icudt56l.dat
131
132 %dir %{_libdir}/%{name}/browser
133 %{_libdir}/%{name}/browser/blocklist.xml
134 %{_libdir}/%{name}/browser/chrome.manifest
135 %{_libdir}/%{name}/browser/omni.ja
136
137 %dir %{_libdir}/%{name}/browser/components
138 %{_libdir}/%{name}/browser/components/components.manifest
139 %attr(755,root,root) %{_libdir}/%{name}/browser/components/libbrowsercomps.so
140 %{_libdir}/%{name}/omni.ja
141 %{_libdir}/%{name}/platform.ini
142 %attr(755,root,root) %{_libdir}/%{name}/firefox
143 %attr(755,root,root) %{_libdir}/%{name}/firefox-bin
144 %attr(755,root,root) %{_libdir}/%{name}/precomplete
145 %attr(755,root,root) %{_libdir}/%{name}/plugin-container
146
147 %{_libdir}/%{name}/browser/chrome
148 %{_libdir}/%{name}/browser/icons
149 %{_libdir}/%{name}/defaults
150 %{_libdir}/%{name}/dependentlibs.list
151 %{_libdir}/%{name}/dictionaries
152 %{_libdir}/%{name}/icons
153
154 %dir %{_libdir}/%{name}/fonts
155 %{_libdir}/%{name}/fonts/EmojiOneMozilla.ttf
156
157 %dir %{_libdir}/%{name}/gtk2
158 %attr(755,root,root) %{_libdir}/%{name}/gtk2/libmozgtk.so
159
160 %dir %{_libdir}/%{name}/browser/extensions
161 # the signature of the default theme
162 %{_libdir}/%{name}/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi
163
164 %dir %{_libdir}/%{name}/browser/features
165 %{_libdir}/%{name}/browser/features/aushelper@mozilla.org.xpi
166 %{_libdir}/%{name}/browser/features/e10srollout@mozilla.org.xpi
167 %{_libdir}/%{name}/browser/features/firefox@getpocket.com.xpi
168 %{_libdir}/%{name}/browser/features/webcompat@mozilla.org.xpi
169
170 %dir %{_libdir}/%{name}/browser/plugins
171 %attr(755,root,root) %{_libdir}/%{name}/*.so
172 %attr(755,root,root) %{_libdir}/%{name}/*.sh
173
174 # crashreporter
175 %attr(755,root,root) %{_libdir}/%{name}/crashreporter
176 %{_libdir}/%{name}/browser/crashreporter-override.ini
177 %{_libdir}/%{name}/crashreporter.ini
178
179 %dir %{_libdir}/%{name}/gmp-clearkey
180 %dir %{_libdir}/%{name}/gmp-clearkey/0.1
181 %{_libdir}/%{name}/gmp-clearkey/0.1/clearkey.info
182 %attr(755,root,root) %{_libdir}/%{name}/gmp-clearkey/0.1/libclearkey.so
183
184 %{_pixmapsdir}/%{name}.png
185 %{_desktopdir}/%{name}.desktop
This page took 0.095987 seconds and 2 git commands to generate.