%global gover 1.14.6 Name: v2ray Version: 4.26.0 Release: 1%{?dist} Summary: The core of the network forwarding toolkit Project V License: MIT URL: https://github.com/%{name}/%{name}-core Source0: https://github.com/%{name}/%{name}-core/archive/v%{version}/%{name}-core-v%{version}.tar.gz Source1: v2ray.xml Source2: https://dl.google.com/go/go%{gover}.linux-amd64.tar.gz # Since we don't have packaged golang 1.13 in the low version EL release. #BuildRequires: golang >= 1.13-0 BuildRequires: git >= 1.8.3.1-13 BuildRequires: gcc BuildRequires: systemd-units Requires: systemd-units ExclusiveArch: x86_64 %description The core of Project V, which is a series of tools for network forwarding. %package firewalld Summary: The firewalld service file. %description firewalld The functional firewalld service file. %global debug_package %{nil} %prep %setup -b 2 -n go %setup -q -n %{name}-core-%{version} mkdir ../gopath cp %{_sourcedir}/%{name}.xml ./ %build export GO111MODULE=on export GOPATH=$(pwd)/../gopath export GOROOT=$(pwd)/../go export PATH=$PATH:$GOROOT/bin go build -o v2ray -compiler gc -gcflags -trimpath=%{gopath} -asmflags -trimpath=%{gopath} -ldflags "-s -w" ./main go build -o v2ctl -compiler gc -gcflags -trimpath=%{gopath} -asmflags -trimpath=%{gopath} -ldflags "-s -w" ./infra/control/main %install install -d %{buildroot}%{_bindir}/%{name} install -d %{buildroot}%{_sysconfdir}/%{name} install -d %{buildroot}%{_usr}/lib/firewalld/services/ install -d %{buildroot}%{_localstatedir}/log/%{name} install -d %{buildroot}%{_unitdir} install -p -m 0755 %{name} %{buildroot}%{_bindir}/%{name}/%{name} install -p -m 0755 v2ctl %{buildroot}%{_bindir}/%{name}/v2ctl install -p -m 0644 $(pwd)/release/config/geoip.dat %{buildroot}%{_bindir}/%{name}/geoip.dat install -p -m 0644 $(pwd)/release/config/geosite.dat %{buildroot}%{_bindir}/%{name}/geosite.dat install -p -m 0644 $(pwd)/release/config/systemd/%{name}.service %{buildroot}%{_unitdir}/%{name}.service install -p -m 0644 $(pwd)/release/config/vpoint_vmess_freedom.json %{buildroot}%{_sysconfdir}/%{name}/config.json install -p -m 0644 $(pwd)/v2ray.xml %{buildroot}%{_usr}/lib/firewalld/services/v2ray.xml %files %defattr(-,root,root,-) %license LICENSE %{_bindir}/%{name}/%{name} %{_bindir}/%{name}/v2ctl %{_bindir}/%{name}/geoip.dat %{_bindir}/%{name}/geosite.dat %attr(-, root, root) %{_unitdir}/%{name}.service %config(noreplace) %{_sysconfdir}/%{name}/config.json %attr(-, root, root) %{_localstatedir}/log/%{name} %files firewalld %config(noreplace) %{_usr}/lib/firewalld/services/v2ray.xml %changelog * Fri Jul 17 2020 rme - 4.26.0-1 - Update to v4.26.0 * Thu Jul 02 2020 rme - 4.25.1-1 - Update to v4.25.1 * Tue Jun 16 2020 rme - 4.24.2-1 - Update to v4.24.2 * Tue Jun 02 2020 rme - 4.23.3-1 - Update to v4.23.3 * Thu Apr 16 2020 rme - 4.23.1-1 - Update to v4.21.3 * Wed Dec 04 2019 rme - 4.21.3-1 - Update to v4.21.3 - Changing dependency golang minimum version to 1.13 according to the upstream requirement * Wed Jul 31 2019 rme - 4.20.0-1 - Update to v4.20.0 * Thu May 23 2019 rme - 4.18.2-1 - Update to v4.18.2 * Sat Mar 02 2019 rme - 4.18.0-1 - Update to v4.18.0 * Fri Dec 14 2018 rme - 4.9.0-1 - Update to v4.9.0 * Sat Nov 24 2018 rme - 4.6.0-1 - Update to v4.6.0 * Mon Nov 12 2018 rme - 4.3-1 - Update to v4.3 * Fri Nov 2 2018 rme - 4.0-1 - Update to v4.0 * Fri Oct 26 2018 rme - 3.49-1 - Update to v3.49 * Thu Oct 11 2018 rme - 3.46-1 - Update to v3.46 * Thu Oct 04 2018 rme - 3.45-1 - Update to v3.45 * Mon Sep 24 2018 rme - 3.43-1 - Update to v3.43 * Sat Sep 15 2018 rme - 3.41-1 - Update to v3.41 * Fri Aug 31 2018 rme - 3.37-1 - Update to v3.37 * Mon Aug 27 2018 rme - 3.36-1 - Rebuild