diff --git a/0001-use-relative-path-for-tongsuo-symlink.patch b/0001-use-relative-path-for-tongsuo-symlink.patch new file mode 100644 index 0000000000000000000000000000000000000000..32c1ead22518d5b330701f5455e75f4efcdab678 --- /dev/null +++ b/0001-use-relative-path-for-tongsuo-symlink.patch @@ -0,0 +1,26 @@ +From ab8765bc8e6e0bcde760e30abdf60643f8120de5 Mon Sep 17 00:00:00 2001 +From: Tianjia Zhang +Date: Sat, 26 Aug 2023 23:18:16 +0800 +Subject: [PATCH] use relative path for tongsuo symlink + +Signed-off-by: Tianjia Zhang +--- + Configurations/unix-Makefile.tmpl | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl +index 4d49df16ba65..e6570ca82a9d 100644 +--- a/Configurations/unix-Makefile.tmpl ++++ b/Configurations/unix-Makefile.tmpl +@@ -846,7 +846,7 @@ install_programs: install_runtime_libs build_programs + chmod 755 $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new; \ + mv -f $(DESTDIR)$(INSTALLTOP)/bin/$$fn.new \ + $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \ +- ln -sf $(DESTDIR)$(INSTALLTOP)/bin/$$fn $(DESTDIR)$(INSTALLTOP)/bin/tongsuo; \ ++ ln -sf $$fn $(DESTDIR)$(INSTALLTOP)/bin/tongsuo; \ + done + @set -e; for x in dummy $(BIN_SCRIPTS); do \ + if [ "$$x" = "dummy" ]; then continue; fi; \ +-- +2.24.3 (Apple Git-128) + diff --git a/8.4.0-pre2.tar.gz b/8.4.0-pre2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6a94a5c0452e30b990da3e0c85b51484892a918e Binary files /dev/null and b/8.4.0-pre2.tar.gz differ diff --git a/tongsuo3.spec b/tongsuo3.spec new file mode 100644 index 0000000000000000000000000000000000000000..421feb522d5f87520b963f7d8773f18fd83e30c4 --- /dev/null +++ b/tongsuo3.spec @@ -0,0 +1,95 @@ +%define anolis_release 1 + +%global debug_package %{nil} + +%define install_prefix /opt/tongsuo3 + +%global _privatelibs libcrypto[.]so.* +%global _privatelibs %{_privatelibs}|libssl[.]so.* +%global __provides_exclude ^(%{_privatelibs})$ +%global __requires_exclude ^(%{_privatelibs})$ + +%global DOMAIN github.com +%global ORG Tongsuo +%global PROJECT Tongsuo +%global IMPORTNAME %{DOMAIN}/%{ORG}/%{PROJECT} + +Name: tongsuo3 +Version: 8.4.0~pre2 +Release: %{anolis_release}%{?dist} +Summary: A Modern Cryptographic Primitives and Protocols Library +Group: System Environment/Libraries +License: Apache-2.0 +Url: https://www.yuque.com/tsdoc +Source0: https://github.com/Tongsuo-Project/Tongsuo/archive/refs/tags/8.4.0-pre2.tar.gz + +Patch1: 0001-use-relative-path-for-tongsuo-symlink.patch + +# For build +BuildRequires: perl(Config) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Path) +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(FindBin) +BuildRequires: perl(lib) +BuildRequires: perl(Module::Load::Conditional) perl(File::Temp) +BuildRequires: perl(Time::HiRes) perl(IPC::Cmd) perl(Pod::Html) perl(Digest::SHA) +BuildRequires: perl(FindBin) perl(lib) perl(File::Compare) perl(File::Copy) perl(bigint) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: /usr/bin/pod2html +# For tests +BuildRequires: perl(TAP::Harness) +BuildRequires: perl(Test::More) +Obsoletes: tongsuo3 < %{version} +Provides: tongsuo3 = %{version} + +%description +A Modern Cryptographic Primitives and Protocols Library. + +%prep +%autosetup -n Tongsuo-8.4.0-pre2 -p1 + +%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=%{install_prefix} -Wl,-rpath,%{install_prefix}/lib \ + ${sslarch} enable-shared 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-rsa-multi-prime-key-compat enable-session-lookup \ + enable-session-reused-type enable-verify-sni \ + enable-skip-scsv enable-ntls enable-sm2 \ + %{build_cflags} %{build_ldflags} + +%make_build + +%check +%make_build test + +%install +%make_install + +rm -f %{buildroot}%{install_prefix}{/bin/c_rehash,/ssl/misc/tsget*,/ssl/misc/*.pl} + +export QA_RPATHS=$(( 0x0002 )) + +%files +%license LICENSE.txt +%{install_prefix} +%dir %{install_prefix} + +%changelog +* Sat Aug 26 2023 Tianjia Zhang - 8.4.0~pre2-1 +- Import package for anolis 23