2021-11-15 10:39:26 +01:00
|
|
|
#
|
|
|
|
# spec file for package shadowsocks-rust
|
|
|
|
#
|
2023-06-20 08:48:48 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2021-11-15 10:39:26 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2023-06-22 14:00:36 +02:00
|
|
|
|
2021-11-15 10:39:26 +01:00
|
|
|
Name: shadowsocks-rust
|
2023-06-19 09:41:07 +02:00
|
|
|
Version: 1.15.3
|
2021-11-15 10:39:26 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Rust port of Shadowsocks
|
|
|
|
License: MIT
|
|
|
|
Group: Productivity/Networking/Web/Proxy
|
2023-06-22 14:00:36 +02:00
|
|
|
URL: https://github.com/shadowsocks/shadowsocks-rust
|
2021-11-16 04:13:10 +01:00
|
|
|
Source0: https://github.com/shadowsocks/shadowsocks-rust/archive/v%{version}/%{name}-%{version}.tar.gz
|
2021-11-15 10:39:26 +01:00
|
|
|
Source1: vendor.tar.gz
|
|
|
|
Source2: %{name}.json
|
|
|
|
Source3: %{name}-client.service
|
|
|
|
Source4: %{name}-server.service
|
|
|
|
Source5: %{name}-manager.service
|
|
|
|
BuildRequires: cargo
|
2023-06-22 14:00:36 +02:00
|
|
|
BuildRequires: cargo-packaging
|
2021-11-15 10:39:26 +01:00
|
|
|
BuildRequires: systemd-rpm-macros
|
2023-06-22 14:00:36 +02:00
|
|
|
BuildRequires: pkgconfig(openssl)
|
2023-06-20 08:48:48 +02:00
|
|
|
Recommends: shadowsocks-v2ray-plugin
|
2023-06-19 09:41:07 +02:00
|
|
|
# ExcludeArch: ppc ppc64 ppc64le s390 s390x
|
2021-11-15 10:39:26 +01:00
|
|
|
%{?systemd_ordering}
|
|
|
|
|
|
|
|
%description
|
|
|
|
shadowsocks-rust is a rust port of shadowsocks.
|
|
|
|
|
2023-06-19 09:41:07 +02:00
|
|
|
shadowsocks is a lightweight secured SOCKS5 proxy for embedded devices and
|
|
|
|
low-end boxes.
|
2021-11-15 10:39:26 +01:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -a1 -n %{name}-%{version}
|
|
|
|
mkdir .cargo
|
2023-06-19 09:41:07 +02:00
|
|
|
cat >>.cargo/config.toml <<EOF
|
2021-11-15 10:39:26 +01:00
|
|
|
[source.crates-io]
|
|
|
|
registry = 'https://github.com/rust-lang/crates.io-index'
|
|
|
|
replace-with = 'vendored-sources'
|
|
|
|
[source.vendored-sources]
|
|
|
|
directory = './vendor'
|
|
|
|
EOF
|
|
|
|
|
|
|
|
%build
|
|
|
|
%cargo_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%cargo_install
|
|
|
|
install -d %{buildroot}%{_sysconfdir}/shadowsocks/
|
|
|
|
install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/shadowsocks/
|
|
|
|
|
|
|
|
install -d %{buildroot}%{_unitdir}
|
|
|
|
install -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}
|
|
|
|
install -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}
|
|
|
|
install -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}
|
|
|
|
|
|
|
|
install -d %{buildroot}%{_sbindir}
|
|
|
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-client
|
|
|
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-server
|
|
|
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-manager
|
|
|
|
|
|
|
|
%pre
|
|
|
|
%service_add_pre %{name}-client.service
|
|
|
|
%service_add_pre %{name}-server.service
|
|
|
|
%service_add_pre %{name}-manager.service
|
|
|
|
|
|
|
|
%post
|
|
|
|
%service_add_post %{name}-client.service
|
|
|
|
%service_add_post %{name}-server.service
|
|
|
|
%service_add_post %{name}-manager.service
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun %{name}-client.service
|
|
|
|
%service_del_preun %{name}-server.service
|
|
|
|
%service_del_preun %{name}-manager.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun %{name}-client.service
|
|
|
|
%service_del_postun %{name}-server.service
|
|
|
|
%service_del_postun %{name}-manager.service
|
|
|
|
|
|
|
|
%files
|
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
|
|
|
%{_bindir}/ss*
|
|
|
|
%{_sbindir}/rc%{name}-*
|
|
|
|
%{_unitdir}/%{name}-*.service
|
|
|
|
%dir %{_sysconfdir}/shadowsocks
|
|
|
|
%config %{_sysconfdir}/shadowsocks/%{name}.json
|
|
|
|
|
|
|
|
%changelog
|