1 %global OPENSSL_ASM_ENABLED %{?openssl_asm:%openssl_asm}%{!?openssl_asm:ON}
2 %define openssldir %{_sysconfdir}/ssl
4 Summary: Secure Sockets Layer and cryptography libraries and tools
8 License: OpenSSL and Apache-2.0
9 Group: Security/Crypto Libraries
10 Url: https://www.openssl.org/
11 Source0: ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz
12 Source1: %{name}.manifest
16 The OpenSSL Project is a collaborative effort to develop a robust,
17 commercial-grade, full-featured, and open source toolkit implementing
18 the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS
19 v1) protocols with full-strength cryptography. The project is managed
20 by a worldwide community of volunteers that use the Internet to
21 communicate, plan, and develop the OpenSSL toolkit and its related
24 %package -n libopenssl11
25 Summary: Secure Sockets Layer and cryptography libraries
26 Group: Security/Crypto Libraries
28 %description -n libopenssl11
29 The OpenSSL Project is a collaborative effort to develop a robust,
30 commercial-grade, full-featured, and open source toolkit implementing
31 the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS
32 v1) protocols with full-strength cryptography. The project is managed
33 by a worldwide community of volunteers that use the Internet to
34 communicate, plan, and develop the OpenSSL toolkit and its related
37 %package -n lib%{name}-devel
38 Summary: Secure Sockets Layer and cryptography libraries mandatory for Development
39 Group: Development/Libraries
40 Requires: libopenssl11 = %{version}-%{release}
42 Conflicts: libopenssl3-devel
44 %description -n lib%{name}-devel
45 The OpenSSL Project is a collaborative effort to develop a robust,
46 commercial-grade, full-featured, and open source toolkit implementing
47 the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS
48 v1) protocols with full-strength cryptography. The project is managed
49 by a worldwide community of volunteers that use the Internet to
50 communicate, plan, and develop the OpenSSL toolkit and its related
71 sslarch=linux64-riscv64
74 RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -s "s/--param=ssp-buffer-size=32//g")
75 RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -s "s/-mcpu=cortex-a15.cortex-a7//g")
76 RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -s "s/-march=armv7ve/-march=armv7-a/g")
77 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -std=gnu99 -fPIC -pie"
79 OPENSSL_CONFIG_ARGS+=" --prefix=%{_prefix} --openssldir=%{openssldir} --libdir=%{_lib} "
80 OPENSSL_CONFIG_ARGS+=" threads shared no-idea no-rc5 no-camellia no-ssl2 enable-md2 enable-weak-ssl-ciphers no-afalgeng "
81 %if %{OPENSSL_ASM_ENABLED} == OFF
82 OPENSSL_CONFIG_ARGS+=" no-asm "
85 ./Configure ${OPENSSL_CONFIG_ARGS} ${sslarch} $RPM_OPT_FLAGS
86 make %{?_smp_mflags} all
92 rm -rf $RPM_BUILD_ROOT
93 make DESTDIR=$RPM_BUILD_ROOT install_sw install_ssldirs
94 mv $RPM_BUILD_ROOT%{openssldir}/openssl.cnf $RPM_BUILD_ROOT%{openssldir}/openssl1.1.cnf
97 %manifest %{name}.manifest
99 %exclude %{openssldir}
101 %files -n libopenssl11
102 %manifest %{name}.manifest
104 %license LICENSE.Apache-2.0
106 %{_libdir}/engines-1.1/*.so
107 %{openssldir}/%{name}.cnf
108 %exclude %{openssldir}/ct_log_list.cnf
109 %exclude %{openssldir}/*.dist
110 %post -n libopenssl11 -p /sbin/ldconfig
111 %postun -n libopenssl11 -p /sbin/ldconfig
113 %files -n lib%{name}-devel
114 %manifest %{name}.manifest
116 %license LICENSE.Apache-2.0
117 %{_includedir}/openssl
119 %exclude %{_libdir}/*.a
120 %{_libdir}/pkgconfig/*.pc