spoofdpi/spoofdpi.spec
2024-08-09 00:08:13 +03:00

49 lines
1.3 KiB
RPMSpec

%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.6
Release: 2
License: Apache-2.0
Group: Networking/Other
Url: https://github.com/xvzc/SpoofDPI
Source0: https://github.com/xvzc/SpoofDPI/archive/refs/tags/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
Source1: spoof-dpi.service
# use 'go mod vendor' command and archive vendor directory
Source2: vendor.tar.gz
BuildRequires: golang
Provides: SpoofDPI = %{EVRD}
Provides: spoof-dpi = %{EVRD}
%description
A simple and fast software designed to bypass Deep Packet Inspection
%files
%{_bindir}/spoof-dpi
%{_userunitdir}/spoof-dpi.service
%post
%systemd_user_post spoof-dpi.service
%preun
%systemd_user_preun spoof-dpi.service
#----------------------------------------------------------------------------
%prep
%autosetup -p1 -n %{oname}-%{version} -a2
%build
mkdir -p src/github.com/xvzc
ln -s ../../../ src/github.com/xvzc/SpoofDPI
export GOPATH=$(pwd):%{gopath}
%gobuild -o ./bin/spoof-dpi ./cmd/spoof-dpi
%install
install -d %{buildroot}/%{_bindir}/
install -m 0755 bin/spoof-dpi %{buildroot}/%{_bindir}/
install -d %{buildroot}/%{_userunitdir}
install -m 0644 %{SOURCE1} %{buildroot}/%{_userunitdir}