Blame trojan.spec

f05e346
Name:       trojan
f05e346
Version:    1.16.0
f05e346
Release:    4%{?dist}
f05e346
Summary:    An unidentifiable mechanism that helps you avoid censorship
f05e346
f05e346
#GPLv3+ with opelssl exceptions
f05e346
License:    GPLv3+
f05e346
URL:        https://github.com/trojan-gfw/%{name}
f05e346
Source0:    %{URL}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
f05e346
# signature from release page
f05e346
Source1:    %{URL}/releases/download/v%{version}/%{name}-%{version}.tar.gz.asc
f05e346
# keyid obtained from upstream auther's GitHub profile
f05e346
Source2:    https://pgp.key-server.io/0xA1DDD486533B0112
f05e346
f05e346
# for build
f05e346
BuildRequires:    gcc
f05e346
BuildRequires:    gcc-c++
f05e346
BuildRequires:    make
f05e346
BuildRequires:    cmake >= 3.7.2
f05e346
BuildRequires:    boost-devel >= 1.66.0
f05e346
BuildRequires:    openssl-devel >= 1.1.0
f05e346
BuildRequires:    mariadb-devel
f05e346
%if 0%{?fedora} >= 30
f05e346
BuildRequires:    systemd-rpm-macros
f05e346
%else
f05e346
BuildRequires:    systemd
f05e346
%endif
f05e346
# for test
f05e346
BuildRequires:    python3
f05e346
BuildRequires:    nmap-ncat
f05e346
BuildRequires:    curl
f05e346
BuildRequires:    openssl
f05e346
#for verifying the tarball
f05e346
BuildRequires:    gnupg2
f05e346
f05e346
f05e346
%description
f05e346
An unidentifiable mechanism that helps you avoid censorship.
f05e346
f05e346
Trojan features multiple protocols over TLS to avoid both 
f05e346
active/passive detection and ISP QoS limitations.
f05e346
f05e346
Trojan is not a fixed program or protocol. It's an idea, 
f05e346
an idea that imitating the most common service, 
f05e346
to an extent that it behaves identically, 
f05e346
could help you get across the Great FireWall permanently, 
f05e346
without being identified ever.
f05e346
f05e346
f05e346
%prep
f05e346
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
f05e346
%setup -q
f05e346
# change cipher list in shipped configuration file&example into PROFILE=SYSTEM
f05e346
sed -i '/"cipher"/c\        "cipher": "PROFILE=SYSTEM",' examples/*.json-example
f05e346
sed -i '/"cipher_tls13"/c\        "cipher_tls13": "PROFILE=SYSTEM",' examples/*.json-example
f05e346
f05e346
f05e346
%build
f05e346
mkdir -p %{_target_platform}
f05e346
pushd %{_target_platform}
f05e346
%{cmake} ..
f05e346
%make_build
f05e346
popd
f05e346
f05e346
%install
f05e346
pushd %{_target_platform}
f05e346
%make_install
f05e346
popd
f05e346
f05e346
%check
f05e346
pushd %{_target_platform}
f05e346
make test
f05e346
popd
f05e346
f05e346
%post
f05e346
%systemd_post %{name}.service
f05e346
f05e346
%preun
f05e346
%systemd_preun %{name}.service
f05e346
f05e346
%postun
f05e346
%systemd_postun_with_restart %{name}.service
f05e346
f05e346
f05e346
%files
f05e346
%{_bindir}/%{name}
f05e346
%license LICENSE
f05e346
%dir %{_sysconfdir}/%{name}
f05e346
%dir %{_pkgdocdir}
f05e346
%config(noreplace) %{_sysconfdir}/%{name}/config.json
f05e346
%{_mandir}/man1/%{name}.1.*
f05e346
%{_pkgdocdir}/*
f05e346
%{_unitdir}/%{name}.service
f05e346
%{_unitdir}/%{name}@.service
f05e346
f05e346
f05e346
%changelog
f05e346
* Sun Jun 14 2020 Qiyu Yan <yanqiyu01@gmail.com> - 1.16.0-4
f05e346
- Change due to review suggestions
f05e346
- see: https://bugzilla.redhat.com/show_bug.cgi?id=1846175
f05e346
f05e346
* Sat Jun 13 2020 Qiyu Yan <yanqiyu01@gmail.com> - 1.16.0-3
f05e346
- Do not patch source, instead, change shipped configuration file
f05e346
f05e346
* Sat Jun 13 2020 Qiyu Yan <yanqiyu01@gmail.com> - 1.16.0-2
f05e346
- GuideLine: Package must own all directories that it creates
f05e346
f05e346
* Fri Jun 12 2020 Qiyu Yan <yanqiyu01@gmail.com> - 1.16.0-1
f05e346
- Update to upstream and change due to suggestion by robinlee.sysu@gmail.com
f05e346
f05e346
* Fri Jun 12 2020 Qiyu Yan <yanqiyu01@gmail.com> - 1.15.1-5
f05e346
- Add CentOS 8 support (CentOS 7 will not be supported)
f05e346
f05e346
* Thu Jun 04 2020 Qiyu Yan <yanqiyu01@gmail.com> - 1.15.1-4
f05e346
- rebuilt
f05e346
f05e346
* Mon Jun 01 2020 Qiyu Yan <yanqiyu01@gmail.com> - 1.15.1-2
f05e346
- rebuilt
f05e346
f05e346
* Sun Nov 10 2019 Qiyu Yan <yanqiyu01@gmail.com> - 1.13.0-1
f05e346
- Initial release