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/
36 find crypto/ -name Makefile -exec \
37 sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i {} \;
39 # Modify the various perl scripts to reference perl in the right location.
40 perl util/perlpath.pl /usr/bin
42 # Generate a table with the compile settings for my perusal.
44 make TABLE PERL=/usr/bin/perl
47 # Set default ssl_arch.
48 ssl_arch = linux-%{DISTRO_ARCH}
50 if "%{DISTRO_ARCH}" == "i686"
52 ssl_arch = linux-elf no-asm 386
55 if "%{DISTRO_ARCH}" == "armv5tel"
56 ssl_arch = linux-generic32
59 if "%{DISTRO_ARCH}" == "armv7hl"
60 ssl_arch = linux-generic32
66 --openssldir=/etc/pki/tls \
67 --enginesdir=%{libdir}/openssl/engines \
78 no-ec no-ecdh no-ecdsa \
85 make depend all build-shared RPM_OPT_FLAGS="%{CFLAGS}" #%{PARALLELISMFLAGS}
87 # Generate hashes for the included certs.
88 make rehash build-shared
92 # Revert ca-dir patch. Otherwise the tests will fail.
93 patch -Np1 -R < %{DIR_PATCHES}/openssl-1.0.0-beta4-ca-dir.patch
99 make install build-shared INSTALL_PREFIX=%{BUILDROOT}
101 # Install manpages do right place
102 mkdir -pv %{BUILDROOT}/usr/share
103 mv -v %{BUILDROOT}/etc/pki/tls/man %{BUILDROOT}/usr/share/
105 mkdir -pv %{BUILDROOT}%{libdir}/openssl
106 mv -v %{BUILDROOT}%{libdir}/engines %{BUILDROOT}%{libdir}/openssl
108 mkdir -pv %{BUILDROOT}/etc/pki/CA/private
109 chmod -v 700 -R %{BUILDROOT}/etc/pki/CA
111 mkdir -pv %{BUILDROOT}/etc/pki/tls
112 install -m 0644 %{DIR_SOURCE}/openssl.cnf %{BUILDROOT}/etc/pki/tls
113 cp -v -r certs %{BUILDROOT}/etc/pki/tls
115 # Rename man pages so that they don't conflict with other system man pages.
116 pushd ${BUILDROOT}/usr/share/man
117 for manpage in man*/*; do
118 if [ -L ${manpage} ]; then
119 TARGET=`ls -l ${manpage} | awk '{ print $NF }'`
120 ln -snf ${TARGET}ssl ${manpage}ssl
123 mv ${manpage} ${manpage}ssl
127 mv -v %{BUILDROOT}/usr/share/man/man1/{,ssl}passwd.1
128 mv -v %{BUILDROOT}/usr/share/man/man1/{,ssl}rand.1
139 requires += ca-certificates
141 provides += libcrypto.so.10(libcrypto.so.10)
142 provides += libssl.so.10(libssl.so.10)
145 package %{name}-devel
149 package %{name}-debuginfo