diff --git a/spoof-dpi.service b/spoof-dpi.service index 90a9534..ce19b7f 100644 --- a/spoof-dpi.service +++ b/spoof-dpi.service @@ -3,6 +3,8 @@ Description=Spoof DPI Service After=network.target [Service] +# sometimes need to run: +# spoof-dpi --enable-doh --window-size 0 ExecStart=/usr/bin/spoof-dpi Restart=on-failure diff --git a/spoofdpi.spec b/spoofdpi.spec index da1cbb8..5d46923 100644 --- a/spoofdpi.spec +++ b/spoofdpi.spec @@ -1,10 +1,11 @@ %global oname SpoofDPI %global debug_package %nil +%global gomodulesmode %nil Summary: A simple and fast software designed to bypass Deep Packet Inspection Name: spoofdpi Version: 0.10.2 -Release: 1 +Release: 3 License: BSD Group: Text tools Url: https://github.com/xvzc/SpoofDPI @@ -26,10 +27,16 @@ A simple and fast software designed to bypass Deep Packet Inspection %autosetup -p1 -n %{oname}-%{version} %build -go build -a -v -ldflags="-w -s -X main.VERSION=%{version}" github.com/xvzc/SpoofDPI/cmd/spoof-dpi +mkdir -p src/github.com/xvzc +ln -s ../../../ src/github.com/xvzc/SpoofDPI +export GOPATH=$(pwd):%{gopath} + +pushd cmd/spoof-dpi +%gobuild -o ../../bin/spoof-dpi +popd %install install -d %{buildroot}/%{_bindir}/ -install -m 0755 spoof-dpi %{buildroot}/%{_bindir}/ +install -m 0755 bin/spoof-dpi %{buildroot}/%{_bindir}/ install -d %{buildroot}/%{_userunitdir} install -m 0644 %{S:1} %{buildroot}/%{_userunitdir}