1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
10 maintainer = Michael Tremer <michael.tremer@ipfire.org>
11 groups = System/Libraries
12 url = http://www.openssl.org/
14 summary = A general purpose cryptography library with TLS implementation.
17 The OpenSSL toolkit provides support for secure communications between
18 machines. OpenSSL includes a certificate management tool and shared
19 libraries which provide various cryptographic algorithms and protocols.
22 source_dl = http://openssl.org/source/
30 perl(Module::Load::Conditional)
37 export HASHBANGPERL = %{bindir}/perl
39 CFLAGS += -DPURIFY -Wa,--noexecstack
41 # Set default ssl_arch.
42 ssl_arch = linux-%{DISTRO_ARCH}
44 if "%{DISTRO_ARCH}" == "x86_64"
45 ssl_arch += enable-ec_nistp_64_gcc_128
48 if "%{DISTRO_ARCH}" == "i686"
50 ssl_arch = linux-elf no-asm 386
53 if "%{DISTRO_ARCH}" == "aarch64"
54 ssl_arch += enable-ec_nistp_64_gcc_128
57 if "%{DISTRO_ARCH}" == "armv5tel"
58 ssl_arch = linux-armv4
61 if "%{DISTRO_ARCH}" == "armv7hl"
62 ssl_arch = linux-armv4
68 --openssldir=%{sysconfdir}/pki/tls \
82 util/mkdef.pl crypto update
85 # Clean up the .pc files
86 for i in libcrypto.pc libssl.pc openssl.pc; do
87 sed -i '/^Libs.private:/{s/-L[^ ]* //;s/-Wl[^ ]* //}' $i
92 # Revert ca-dir patch. Otherwise the tests will fail.
93 patch -Np1 -R < %{DIR_PATCHES}/openssl-1.1.0-ca-dir.patch
99 make install DESTDIR=%{BUILDROOT}
101 # Rename man pages so that they don't conflict with other system man pages.
102 pushd %{BUILDROOT}%{mandir}
103 ln -svf config.5 man5/openssl.cnf.5
104 for manpage in man*/*; do
105 if [ -L "${manpage}" ]; then
106 TARGET=$(ls -l "${manpage}" | awk '{ print $NF }')
107 ln -snf "${TARGET}ssl" "${manpage}ssl"
110 mv ${manpage} ${manpage}ssl
113 for conflict in passwd rand; do
114 rename ${conflict} ssl${conflict} man*/${conflict}*
115 ln -svf ssl${conflict}.1ssl %{BUILDROOT}%{mandir}/man1/openssl-${conflict}.1ssl
120 rm -vf %{BUILDROOT}%{sysconfdir}/pki/tls/openssl.cnf.dist
122 # Move executable stuff to %{bindir}
123 mv -v %{BUILDROOT}%{sysconfdir}/pki/tls/misc/{CA.pl,tsget} %{BUILDROOT}%{bindir}
129 requires += %{name}-libs = %{thisver}
135 requires += ca-certificates
137 conflicts += %{name} < %{thisver}
139 files += %{libdir}/openssl %{libdir}/engines*
142 package %{name}-devel
146 package %{name}-debuginfo