mirror of
https://abf.rosa.ru/djam/spoofdpi.git
synced 2025-02-23 09:42:56 +00:00
63 lines
1.5 KiB
RPMSpec
63 lines
1.5 KiB
RPMSpec
%define debug %nil
|
|
%define debug_package %nil
|
|
|
|
# use bundled golang modules (from Source1)
|
|
%global gomodulesmode GO111MODULE=off
|
|
%global goipath github.com/xvzc/SpoofDPI
|
|
%define oname SpoofDPI
|
|
|
|
Summary: A simple and fast software designed to bypass Deep Packet Inspection
|
|
Name: spoofdpi
|
|
Version: 0.12.0
|
|
Release: 1
|
|
License: ASL 2.0
|
|
Group: Networking/Other
|
|
URL: https://github.com/xvzc/SpoofDPI
|
|
Source0: %{url}/archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
|
|
Source1: spoofdpi.service
|
|
# created by ./upd.sh
|
|
#Source2: spoofdpi-%{version}-go-mod-vendor.tar.xz
|
|
BuildRequires: go
|
|
BuildRequires: git-core
|
|
BuildRequires: upx
|
|
Provides: %{oname} = %{EVRD}
|
|
Provides: youtube-kostylen = %{EVRD}
|
|
|
|
|
|
%description
|
|
A simple and fast software designed to bypass Deep Packet Inspection
|
|
|
|
%files
|
|
%doc *.md LICENSE* _docs
|
|
%{_bindir}/%{name}
|
|
%{_userunitdir}/%{name}.service
|
|
|
|
%post
|
|
# migrate from incorrect systemd unit
|
|
if test -L /etc/systemd/user/multi-user.target.wants/%{name}.service; then
|
|
systemctl --global disable %{name}.service && \
|
|
systemctl --global preset %{name}.service || :
|
|
fi
|
|
%systemd_user_post %{name}.service
|
|
|
|
%preun
|
|
%systemd_user_preun %{name}.service
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%prep
|
|
#goprep
|
|
%setup -qn %{oname}-%{version}
|
|
|
|
#tar -C .. -xf %{SOURCE2}
|
|
|
|
%build
|
|
export GOPROXY=direct
|
|
|
|
go build -ldflags '-s -w' -o ./bin/%{name} ./cmd/%{name}
|
|
|
|
upx bin/*
|
|
|
|
%install
|
|
install -Dm0755 ./bin/%{name} %{buildroot}/%{_bindir}/%{name}
|
|
install -Dm0644 %{SOURCE1} %{buildroot}/%{_userunitdir}/%{name}.service
|