%global rel_ver 20190809 %define debug_package %{nil} Name: kcptun Version: %{rel_ver} Release: 1%{?dist} Summary: A Stable & Secure Tunnel Based On KCP with N:M Multiplexing Group: Network License: MIT URL: https://github.com/xtaci/kcptun Source0: %{name}-%{rel_ver}.tar.gz Source1: %{name}-client@.service Source2: %{name}-server@.service Source3: %{name}_client.conf.example Source4: %{name}_server.conf.example BuildRequires: git-core BuildRequires: go-srpm-macros BuildRequires: go-compilers-golang-compiler #BuildRequires: golang(github.com/golang/snappy) #BuildRequires: golang(github.com/klauspost/reedsolomon) #BuildRequires: golang(github.com/klauspost/cpuid) #BuildRequires: golang(github.com/pkg/errors) #BuildRequires: golang(github.com/templexxx/xor) #BuildRequires: golang(github.com/templexxx/cpufeat) #BuildRequires: golang(github.com/urfave/cli) #BuildRequires: golang(github.com/xtaci/kcp-go) #BuildRequires: golang(github.com/xtaci/smux) %description A Stable & Secure Tunnel Based On KCP with N:M Multiplexing %prep %setup -q -n %{name}-%{rel_ver} %build export LDFLAGS="-X main.VERSION=%{rel_ver}" %global goipath %{name}-%{rel_ver} %undefine version %gobuildroot mkdir -p _build/src/github.com/xtaci/kcptun ln -s ../../../../../generic _build/src/github.com/xtaci/kcptun/generic env GOPATH=$GO_BUILD_PATH go get -v -u github.com/golang/snappy env GOPATH=$GO_BUILD_PATH go get -v -u github.com/klauspost/reedsolomon env GOPATH=$GO_BUILD_PATH go get -v -u github.com/klauspost/cpuid env GOPATH=$GO_BUILD_PATH go get -v -u github.com/pkg/errors env GOPATH=$GO_BUILD_PATH go get -v -u github.com/templexxx/xor env GOPATH=$GO_BUILD_PATH go get -v -u github.com/templexxx/cpufeat env GOPATH=$GO_BUILD_PATH go get -v -u github.com/urfave/cli env GOPATH=$GO_BUILD_PATH go get -v -u github.com/xtaci/kcp-go env GOPATH=$GO_BUILD_PATH go get -v -u github.com/xtaci/smux env GOPATH=$GO_BUILD_PATH go get -v -u github.com/xtaci/tcpraw env GOPATH=$GO_BUILD_PATH go get -v -u golang.org/x/crypto/blowfish env GOPATH=$GO_BUILD_PATH go get -v -u golang.org/x/crypto/cast5 env GOPATH=$GO_BUILD_PATH go get -v -u golang.org/x/crypto/pbkdf2 env GOPATH=$GO_BUILD_PATH go get -v -u golang.org/x/crypto/salsa20 env GOPATH=$GO_BUILD_PATH go get -v -u golang.org/x/crypto/tea env GOPATH=$GO_BUILD_PATH go get -v -u golang.org/x/crypto/twofish env GOPATH=$GO_BUILD_PATH go get -v -u golang.org/x/crypto/xtea for bin in client server; do %gobuild -o _bin/%{name}-${bin} %{name}-%{rel_ver}/${bin} done %install mkdir -p %{buildroot}%{_bindir} install -m 755 _bin/%{name}-{client,server} %{buildroot}%{_bindir} install -d %{buildroot}%{_unitdir} install -d %{buildroot}%{_sysconfdir}/%{name} install -m 644 %{SOURCE1} %{buildroot}%{_unitdir} install -m 644 %{SOURCE2} %{buildroot}%{_unitdir} install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{name} install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/%{name} %files %license LICENSE.md %doc README.md *.png %{_sysconfdir}/kcptun/kcptun_client.conf.example %{_sysconfdir}/kcptun/kcptun_server.conf.example %{_bindir}/%{name}-client %{_bindir}/%{name}-server %{_unitdir}/%{name}-client@.service %{_unitdir}/%{name}-server@.service %changelog * Thu Aug 22 2019 Tomas Chang - 20190809-1 - Update to 20190809 * Tue Jun 25 2019 Tomas Chang - 20190611-1 - Update to 20190611 * Fri Dec 28 2018 Tomas Chang - 20181226-3 - Update to 20181226 * Sat Dec 08 2018 Tomas Chang - 20181114-2 - Update spec * Fri Dec 07 2018 Tomas Chang - 20181114-1 - Initial build