%define srcname openssl Summary: OpenSSL 3.2.0 for CentOS Name: openssl3 Version: %{?version}%{!?version:3.2.0} Release: 2%{?dist} Obsoletes: %{name} <= %{version} Provides: %{name} = %{version} URL: https://www.openssl.org/ License: GPLv2+ Source: https://www.openssl.org/source/%{srcname}-%{version}.tar.gz BuildRequires: make gcc perl perl-WWW-Curl perl-IPC-Cmd BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %global openssldir /usr/openssl3 %description https://github.com/philyuchkoff/openssl-RPM-Builder OpenSSL RPM for version 3.2.0 on CentOS %package devel Summary: Development files for programs which will use the openssl library Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel OpenSSL RPM for version 3.2.0 on CentOS (development package) %prep %setup -q -n %{srcname}-%{version} %build ./config --prefix=%{openssldir} --openssldir=%{openssldir} make %install [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} %make_install mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_libdir} ln -sf %{openssldir}/lib64/libssl.so.3 %{buildroot}%{_libdir} ln -sf %{openssldir}/lib64/libcrypto.so.3 %{buildroot}%{_libdir} ln -sf %{openssldir}/bin/openssl %{buildroot}%{_bindir}/openssl3 %clean [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} %files %{openssldir} %defattr(-,root,root) /usr/bin/openssl3 /usr/lib64/libcrypto.so.3 /usr/lib64/libssl.so.3 %files devel %{openssldir}/include/* %defattr(-,root,root) %post -p /sbin/ldconfig %postun -p /sbin/ldconfig