############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = openssl version = 1.1.0g release = 1 maintainer = Michael Tremer groups = System/Libraries url = http://www.openssl.org/ license = OpenSSL summary = A general purpose cryptography library with TLS implementation. description The OpenSSL toolkit provides support for secure communications between machines. OpenSSL includes a certificate management tool and shared libraries which provide various cryptographic algorithms and protocols. end source_dl = http://openssl.org/source/ build requires ca-certificates coreutils perl perl(Math::BigInt) perl(Module::Load::Conditional) perl(Test::Harness) perl(Test::More) sed zlib-devel end export HASHBANGPERL = %{bindir}/perl CFLAGS += -DPURIFY -Wa,--noexecstack # Set default ssl_arch. ssl_arch = linux-%{DISTRO_ARCH} if "%{DISTRO_ARCH}" == "x86_64" ssl_arch += enable-ec_nistp_64_gcc_128 end if "%{DISTRO_ARCH}" == "i686" # 386 implies no-sse2 ssl_arch = linux-elf no-asm 386 end if "%{DISTRO_ARCH}" == "aarch64" ssl_arch += enable-ec_nistp_64_gcc_128 end if "%{DISTRO_ARCH}" == "armv5tel" ssl_arch = linux-armv4 end if "%{DISTRO_ARCH}" == "armv7hl" ssl_arch = linux-armv4 end build ./Configure \ --prefix=%{prefix} \ --openssldir=%{sysconfdir}/pki/tls \ shared \ zlib \ enable-camellia \ enable-seed \ enable-rfc3779 \ enable-ssl3 \ enable-ssl3-method \ no-rc4 \ no-rc5 \ %{ssl_arch} \ ${CFLAGS} \ ${LDFLAGS} util/mkdef.pl crypto update make all # Clean up the .pc files for i in libcrypto.pc libssl.pc openssl.pc; do sed -i '/^Libs.private:/{s/-L[^ ]* //;s/-Wl[^ ]* //}' $i done end test # Revert ca-dir patch. Otherwise the tests will fail. patch -Np1 -R < %{DIR_PATCHES}/openssl-1.1.0-ca-dir.patch make test end install make install DESTDIR=%{BUILDROOT} # Rename man pages so that they don't conflict with other system man pages. pushd %{BUILDROOT}%{mandir} ln -svf config.5 man5/openssl.cnf.5 for manpage in man*/*; do if [ -L "${manpage}" ]; then TARGET=$(ls -l "${manpage}" | awk '{ print $NF }') ln -snf "${TARGET}ssl" "${manpage}ssl" rm -f "${manpage}" else mv ${manpage} ${manpage}ssl fi done for conflict in passwd rand; do rename ${conflict} ssl${conflict} man*/${conflict}* ln -svf ssl${conflict}.1ssl %{BUILDROOT}%{mandir}/man1/openssl-${conflict}.1ssl done popd # Remove dist config rm -vf %{BUILDROOT}%{sysconfdir}/pki/tls/openssl.cnf.dist # Move executable stuff to %{bindir} mv -v %{BUILDROOT}%{sysconfdir}/pki/tls/misc/{CA.pl,tsget} %{BUILDROOT}%{bindir} end end packages package %{name} requires += %{name}-libs = %{thisver} end package %{name}-libs template LIBS requires += ca-certificates conflicts += %{name} < %{thisver} files += %{libdir}/openssl %{libdir}/engines* end package %{name}-devel template DEVEL end package %{name}-debuginfo template DEBUGINFO end end