Updates for Fedora 37

This commit is contained in:
2022-11-25 10:33:47 +01:00
parent 4e888ee9ee
commit 9754e4d04a
4 changed files with 65 additions and 218 deletions

View File

@@ -1,10 +1,10 @@
# You can get the latest commit using this commands:
# git pull
# git log --oneline | head -n 1 | awk '{print $1}'
%define gitv ffa6674
%define gitv 58fd8a6
%define webd %{_var}/www
%define gopath $(pwd)/go
%define domain echoip.dsteiner.ch
%define domain echoip.daniel-steiner.org
%define protocol https
%define port 443
@@ -36,7 +36,6 @@ A simple service for looking up your IP address. This is the code that powers ht
%setup -q -n %{name}-%{version}.%{gitv}
%build
mkdir go bin
# save system PATH environment:
SAVEPATH=$PATH
# prepare go environment:
@@ -54,11 +53,11 @@ export PATH=$SAVEPATH
%install
# modifying index.html file for required settings:
sed -i -e 's|.. .Host ..|%{protocol}://%{domain}|g' html/index.html
sed -i -e 's/8080/%{port}/g' html/index.html
sed -i -e 's|.. .Host ..|%{protocol}://%{domain}|g' index.html
sed -i -e 's/8080/%{port}/g' index.html
install -d -m 0770 %{buildroot}%{_rundir}/%{name}
install -D -m 0775 %{gopath}/bin/echoip %{buildroot}%{_bindir}/%{name}
install -D -m 0644 html/index.html %{buildroot}%{webd}/%{name}/orig-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
@@ -117,14 +116,13 @@ fi
%dir %attr(-,%{name},%{name}) %{_rundir}/%{name}
%changelog
* Tue May 24 2022 Daniel Steiner <daniel.steiner@greenmail.ch>
- First build on Fedora 35.
- Domain pattern changed and upated to latest git version.
* Fri Nov 25 2022 Daniel Steiner <daniel.steiner@greenmail.ch>
- First build on Fedora 37.
* Fri May 11 2021 Daniel Steiner <daniel.steiner@greenmail.ch>
* Fri May 14 2021 Daniel Steiner <daniel.steiner@greenmail.ch>
- First build on Fedora 34.
* Sat Oct 31 2019 Daniel Steiner <daniel.steiner@greenmail.ch>
* Sat Oct 35 2019 Daniel Steiner <daniel.steiner@greenmail.ch>
- First build on Fedora 33.
* Sun Jan 20 2019 Daniel Steiner <daniel.steiner@greenmail.ch>