Generate distribution.ini using /etc/os-release values
Fix RHEL-61139 Related: RHEL-61819
This commit is contained in:
parent
eb13e477a2
commit
8caf98ec1e
@ -1,9 +0,0 @@
|
||||
[Global]
|
||||
id=redhat
|
||||
version=1.0
|
||||
about=Mozilla Firefox for Red Hat Enterprise Linux
|
||||
|
||||
[Preferences]
|
||||
app.distributor=redhat
|
||||
app.distributor.channel=redhat
|
||||
app.partner.redhat=redhat
|
9
distribution.ini.in
Normal file
9
distribution.ini.in
Normal file
@ -0,0 +1,9 @@
|
||||
[Global]
|
||||
id=__ID__
|
||||
version=1.0
|
||||
about=Mozilla Firefox for __NAME__
|
||||
|
||||
[Preferences]
|
||||
app.distributor=__ID__
|
||||
app.distributor.channel=__ID__
|
||||
app.partner.__ID__=__ID__
|
15
firefox.spec
15
firefox.spec
@ -179,7 +179,7 @@ Source21: firefox.sh.in
|
||||
Source23: firefox.1
|
||||
Source24: mozilla-api-key
|
||||
Source25: firefox-symbolic.svg
|
||||
Source26: distribution.ini
|
||||
Source26: distribution.ini.in
|
||||
Source27: google-api-key
|
||||
Source30: firefox-x11.sh.in
|
||||
Source31: firefox-x11.desktop
|
||||
@ -1718,14 +1718,11 @@ ln -s %{_datadir}/myspell %{buildroot}%{mozappdir}/dictionaries
|
||||
|
||||
# Add distribution.ini
|
||||
%{__mkdir_p} %{buildroot}%{mozappdir}/distribution
|
||||
%{__cp} %{SOURCE26} %{buildroot}%{mozappdir}/distribution
|
||||
|
||||
# CentOS
|
||||
%if 0%{?centos}
|
||||
%{__sed} -i -e 's/redhat/centos/g' %{buildroot}%{mozappdir}/distribution/distribution.ini
|
||||
(source /etc/os-release; %{__sed} -i -e 's/Red Hat Enterprise Linux/$NAME/' %{buildroot}%{mozappdir}/distribution/distribution.ini)
|
||||
cat %{buildroot}%{mozappdir}/distribution/distribution.ini
|
||||
%endif
|
||||
%{__sed} -e "s/__NAME__/%(source /etc/os-release; echo ${NAME})/g" \
|
||||
-e "s/__ID__/%(source /etc/os-release; echo ${ID})/g" \
|
||||
-e "s/rhel/redhat/g" \
|
||||
-e "s/Fedora.*/Fedora/g" \
|
||||
%{SOURCE26} > %{buildroot}%{mozappdir}/distribution/distribution.ini
|
||||
|
||||
# Install appdata file
|
||||
mkdir -p %{buildroot}%{_datadir}/metainfo
|
||||
|
Loading…
Reference in New Issue
Block a user