-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d1b1aeb
commit ef41c2f
Showing
1 changed file
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
%define base_release 1 | ||
|
||
%define tongsuo_prefix /opt/tongsuo | ||
|
||
%global _privatelibs libcrypto[.]so.* | ||
%global _privatelibs %{_privatelibs}|libssl[.]so.* | ||
%global __provides_exclude ^(%{_privatelibs})$ | ||
%global __requires_exclude ^(%{_privatelibs})$ | ||
|
||
%global DOMAIN github.com | ||
%global ORG Tongsuo-Project | ||
%global PROJECT Tongsuo | ||
%global IMPORTNAME %{DOMAIN}/%{ORG}/%{PROJECT} | ||
|
||
Name: tongsuo | ||
Version: 8.4.0 | ||
Release: %{base_release}%{?dist} | ||
Summary: Tongsuo Cryptographic Library | ||
Group: System Environment/Libraries | ||
License: Apache-2.0 | ||
ExclusiveArch: x86_64 aarch64 | ||
Url: https://%{IMPORTNAME} | ||
Source0: %{name}-%{version}.tar.gz | ||
BuildRoot: %{_tmppath}/%{name}-%{version}-root | ||
BuildRequires: coreutils, perl | ||
BuildRequires: perl-Test-Harness, perl-core | ||
|
||
%description | ||
Tongsuo is a modern cryptographic and secure protocol library. | ||
|
||
%prep | ||
%setup -q -n Tongsuo-%{version} | ||
|
||
%build | ||
sslarch=%{_os}-%{_target_cpu} | ||
|
||
%ifarch %ix86 | ||
sslarch=linux-x86 | ||
%endif | ||
%ifarch x86_64 | ||
sslarch=linux-x86_64 | ||
%endif | ||
%ifarch aarch64 | ||
sslarch=linux-aarch64 | ||
%endif | ||
|
||
./Configure \ | ||
--prefix=%{tongsuo_prefix} -Wl,-rpath,%{tongsuo_prefix}/lib \ | ||
${sslarch} enable-shared no-hw no-hw-padlock no-static-engine \ | ||
enable-dynamic-engine enable-tls1_3 enable-ssl3 enable-ssl3-method \ | ||
enable-weak-ssl-ciphers enable-evp-cipher-api-compat enable-status \ | ||
enable-crypto-mdebug-count enable-dynamic-ciphers enable-optimize-chacha \ | ||
enable-rsa-multi-prime-key-compat enable-session-lookup \ | ||
enable-session-reused-type enable-global-session-cache enable-verify-sni \ | ||
enable-skip-scsv enable-ntls enable-sm2 --strict-warnings --release -fPIC \ | ||
%{optflags} -Wa,--noexecstack -DPURIFY -Wno-unused-result | ||
|
||
make %{?_smp_mflags} | ||
|
||
%check | ||
make test | ||
|
||
%install | ||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT | ||
|
||
make install DESTDIR=$RPM_BUILD_ROOT | ||
|
||
%clean | ||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT | ||
|
||
%files | ||
%defattr(-,root,root,-) | ||
%{tongsuo_prefix} | ||
%exclude %{tongsuo_prefix}/bin/c_rehash | ||
%exclude %{tongsuo_prefix}/ssl/misc/tsget* | ||
%exclude %{tongsuo_prefix}/ssl/misc/*.pl | ||
|
||
%changelog | ||
|