index.html file redesigned. index.html replaced be new design

This commit is contained in:
2019-01-20 11:32:10 +01:00
parent a1c8ed34df
commit 7d300c4c70

View File

@@ -19,6 +19,7 @@ License: BSD 3-Clause license
URL: https://github.com/mpolden/%{name}
Source0: %name-%{version}.%{gitv}.tgz
Source1: %name.service
Source2: echoip-index.html
BuildRequires: golang
BuildRequires: go-compilers-golang-compiler
@@ -53,13 +54,14 @@ export PATH=$SAVEPATH
%install
# modifying index.html file for required settings:
sed -i -e 's/.. .Host ../%{domain}/g' index.html
sed -i -e 's/http /%{protocol} /g' index.html
sed -i -e 's|.. .Host ..|%{protocol}://%{domain}|g' index.html
sed -i -e 's/8080/%{port}/g' index.html
sed -i -e 's/height="350"/height="600"/g' index.html
install -d -m 0770 %{buildroot}%{_rundir}/%{name}
install -D -m 0775 %{gopath}/bin/echoip %{buildroot}%{_bindir}/%{name}
install -D -m 0644 index.html %{buildroot}%{webd}/%{name}/index.html
install -D -m 0644 index.html %{buildroot}%{webd}/%{name}/orig-index.html
install -D -m 0644 %{SOURCE2} %{buildroot}%{webd}/%{name}/index.html
sed -i -e 's|.. .Host ..|%{protocol}://%{domain}|g' %{buildroot}%{webd}/%{name}/index.html
sed -i -e 's/8080/%{port}/g' %{buildroot}%{webd}/%{name}/index.html
install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
%clean
@@ -108,6 +110,7 @@ fi
%{_bindir}/%{name}
%dir %attr(-,%{name},%{name}) %{webd}/%{name}
%attr(-,%{name},%{name}) %{webd}/%{name}/index.html
%attr(-,%{name},%{name}) %{webd}/%{name}/orig-index.html
%{_unitdir}/%{name}.service
%dir %attr(-,%{name},%{name}) %{_rundir}/%{name}