Sisyphus repository
Last update: 30 november 2022 | SRPMs: 17938 | Visits: 25425591
en ru br
ALT Linux repos

Group :: Networking/Other
RPM: kcptun

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%define _unpackaged_files_terminate_build 1
%define _stripped_files_terminate_build 1
%set_verify_elf_method strict,lint=relaxed

%global import_path
Name:     kcptun
Version:  20221008
Release:  alt1

Summary:  A Stable & Secure Tunnel based on KCP with N:M multiplexing and FEC
License:  MIT
Group:    Networking/Other

Source:   %name-%version.tar

BuildRequires(pre): rpm-build-golang
BuildRequires: golang
%{?!_without_check:%{?!_disable_check:BuildRequires: banner curl python3 iproute2}}


KCP is a reliable (ARQ) transmission protocol (on top of UDP) with the
focus on low-latency in contrast to TCP which focus on bandwidth.

FEC is a forward error correction (using Reed-Solomon codes), achieving
reliability in the network with packet losses.


export LDFLAGS="-X main.VERSION=%version"
export BUILDDIR="$PWD/.build"
export IMPORT_PATH="%import_path"
export GOPATH="$BUILDDIR:%go_path"


cd .build/src/%import_path
%golang_build client server

export BUILDDIR="$PWD/.build"


mv %buildroot%_bindir/server %buildroot%_bindir/%name-server
mv %buildroot%_bindir/client %buildroot%_bindir/%name-client
mkdir -p %buildroot%_sysconfdir/sysctl.d %buildroot%_sysconfdir/%name %buildroot%_unitdir
install -m0644 .gear/sysctl.conf* %buildroot%_sysconfdir/sysctl.d/88-%name.conf.example
install -m0644 .gear/%name.service %buildroot%_unitdir/%name-client.service
install -m0644 .gear/%name.service %buildroot%_unitdir/%name-server.service
install -m0640 .gear/*.json  %buildroot%_sysconfdir/%name


%post_service %name-client
%post_service %name-server

%preun_service %name-client
%preun_service %name-server

%doc *.md
%attr(750,root,wheel) %dir %_sysconfdir/%name
%attr(640,root,wheel) %config(noreplace) %_sysconfdir/%name/*


Full changelog you can see here

design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin