mirror of
https://abf.rosa.ru/djam/sing-box.git
synced 2025-02-23 14:52:46 +00:00
Imported from SRPM
This commit is contained in:
commit
3cee0001fc
2 changed files with 59 additions and 0 deletions
2
.abf.yml
Normal file
2
.abf.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
sources:
|
||||
sing-box-1.10.3.tar.gz: c91197faf4987ac13c09ef7ff50512ef0ad89e97
|
57
sing-box.spec
Normal file
57
sing-box.spec
Normal file
|
@ -0,0 +1,57 @@
|
|||
%define debug %nil
|
||||
%define debug_package %nil
|
||||
|
||||
Name: sing-box
|
||||
Version: 1.10.3
|
||||
Release: 1
|
||||
Summary: The universal proxy platform
|
||||
URL: https://sing-box.sagernet.org
|
||||
Source0: https://github.com/SagerNet/sing-box/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
License: GPLv3
|
||||
Group: Security
|
||||
BuildRequires: go
|
||||
BuildRequires: git-core
|
||||
BuildRequires: upx
|
||||
BuildRequires: pkgconfig(openssl3.3)
|
||||
BuildRequires: pkgconfig(libevent)
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
|
||||
%description
|
||||
The universal proxy platform.
|
||||
|
||||
see %{_docdir}/%{name} or https://sing-box.sagernet.org
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
export GOSUMDB=off
|
||||
export GOPROXY=https://proxy.golang.org,direct
|
||||
go build -v -trimpath -ldflags "-s -w -X github.com/sagernet/sing-box/constant.Version=%{version} -buildid=" \
|
||||
-tags "with_gvisor,with_dhcp,with_wireguard,with_reality_server,with_clash_api,with_quic,with_utls,with_ech,with_v2ray_api" \
|
||||
-o bin/%{name} \
|
||||
./cmd/sing-box/
|
||||
|
||||
upx bin/%{name}
|
||||
|
||||
%install
|
||||
install -Dm0755 bin/%{name} %{buildroot}%{_bindir}/%{name}
|
||||
|
||||
pushd release/config
|
||||
install -Dm0644 config.json %{buildroot}%{_sysconfdir}/%{name}/config.json
|
||||
install -Dm0644 sing-box.service %{buildroot}%{_unitdir}/sing-box.service
|
||||
install -Dm0644 sing-box@.service %{buildroot}%{_userunitdir}/sing-box@.service
|
||||
popd
|
||||
|
||||
pushd release/completions
|
||||
install -Dm0644 sing-box.bash %{buildroot}%{_datadir}/bash-completion/completions/%{name}
|
||||
popd
|
||||
|
||||
%files
|
||||
%doc README.md LICENSE docs
|
||||
%{_bindir}/%{name}
|
||||
%{_sysconfdir}/%{name}/config.json
|
||||
%{_unitdir}/sing-box.service
|
||||
%{_userunitdir}/sing-box@.service
|
||||
%{_datadir}/bash-completion/completions/%{name}
|
||||
|
Loading…
Add table
Reference in a new issue