Browse Source

change build and add config to install

Signed-off-by: Toshaan Bharvani <toshaan@powerel.org>
master
Toshaan Bharvani 6 months ago
parent
commit
59b9fd49df
  1. 4
      SPECS/blocky.spec

4
SPECS/blocky.spec

@ -7,6 +7,7 @@ License : Apache 2.0
URL : https://0xerr0r.github.io/blocky/ URL : https://0xerr0r.github.io/blocky/
Summary : DNS Proxy with Ad blocker Summary : DNS Proxy with Ad blocker
Source0 : blocky.service Source0 : blocky.service
Source1 : config.yaml
BuildRequires: golang BuildRequires: golang
BuildRequires: git BuildRequires: git
Requires : git Requires : git
@ -28,11 +29,12 @@ git clone https://github.com/0xERR0R/blocky
export GOPATH=`pwd` export GOPATH=`pwd`
cd src/github.com/0xERR0R/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 %{SOURCE1} %{buildroot}%{_sysconfdir}/blocky/config.yaml
install -p -D -m 0655 src/github.com/0xERR0R/blocky/blocky %{buildroot}%{_bindir}/blocky install -p -D -m 0655 src/github.com/0xERR0R/blocky/blocky %{buildroot}%{_bindir}/blocky





Loading…
Cancel
Save