|
|
@ -1,3 +1,5 @@ |
|
|
|
|
|
|
|
%global _hardened_build 1 |
|
|
|
|
|
|
|
|
|
|
|
Name : blocky |
|
|
|
Name : blocky |
|
|
|
Version : 0.23 |
|
|
|
Version : 0.23 |
|
|
|
Release : 1%{dist} |
|
|
|
Release : 1%{dist} |
|
|
@ -17,33 +19,33 @@ Fast and lightweight DNS proxy as ad-blocker for local network with many feature |
|
|
|
%prep |
|
|
|
%prep |
|
|
|
%setup -T -q -c %{name}-%{version} |
|
|
|
%setup -T -q -c %{name}-%{version} |
|
|
|
export GOPATH=`pwd` |
|
|
|
export GOPATH=`pwd` |
|
|
|
mkdir -p src/github.com/0xERROR/ |
|
|
|
mkdir -p src/github.com/0xERR0R/ |
|
|
|
cd src/github.com/0xERROR/ |
|
|
|
cd src/github.com/0xERR0R/ |
|
|
|
git clone https://github.com/0xERROR/blocky |
|
|
|
git clone https://github.com/0xERR0R/blocky |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build |
|
|
|
%build |
|
|
|
export GOPATH=`pwd` |
|
|
|
export GOPATH=`pwd` |
|
|
|
cd src/github.com/0xERROR/blocky |
|
|
|
cd src/github.com/0xERR0R/blocky |
|
|
|
git checkout tags/v%{version} |
|
|
|
git checkout tags/v%{version} |
|
|
|
GO111MODULE=on go build -v -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}" -X 'github.com/0xERR0R/blocky/util.Version="%{version}'.'%{release}"' -X 'github.com/0xERR0R/blocky/util.BuildTime="$(date "+%Y%m%d-%H%M%S")"' -X 'github.com/0xERR0R/blocky/util.Architecture="%{_arch}"'" |
|
|
|
GO111MODULE=on go build -v -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}" -X 'github.com/0xERR0R/blocky/util.Version="%{version}"."%{release}"' -X 'github.com/0xERR0R/blocky/util.BuildTime="$(date "+%Y%m%d-%H%M%S")"' -X 'github.com/0xERR0R/blocky/util.Architecture="%{_arch}"'" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install |
|
|
|
%install |
|
|
|
install -p -D -m 0644 %{SOURCE0} %{buildroot}%{_unitdir}/blocky.service |
|
|
|
install -p -D -m 0644 %{SOURCE0} %{buildroot}%{_unitdir}/blocky.service |
|
|
|
install -p -D -m 0555 src/github.com/0xERROR/blocky/blocky %{buildroot}%{_bindir}/blocky |
|
|
|
install -p -D -m 0655 src/github.com/0xERR0R/blocky/blocky %{buildroot}%{_bindir}/blocky |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%post |
|
|
|
%post |
|
|
|
%systemd_post gitea.service |
|
|
|
%systemd_post blocky.service |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%preun |
|
|
|
%preun |
|
|
|
%systemd_preun gitea.service |
|
|
|
%systemd_preun blocky.service |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%postun |
|
|
|
%postun |
|
|
|
%systemd_postun gitea.service |
|
|
|
%systemd_postun blocky.service |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files |
|
|
|
%files |
|
|
|