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/
34 export RPM_OPT_FLAGS = %{CFLAGS}
37 sed -e 's/SHLIB_VERSION_NUMBER "1.0.0"/SHLIB_VERSION_NUMBER "%{version}"/' \
40 find crypto/ -name Makefile -exec \
41 sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i {} \;
43 # Modify the various perl scripts to reference perl in the right location.
44 perl util/perlpath.pl /usr/bin
46 # Generate a table with the compile settings for my perusal.
48 make TABLE PERL=/usr/bin/perl
51 # Set default ssl_arch.
52 ssl_arch = linux-%{DISTRO_ARCH}
54 if "%{DISTRO_ARCH}" == "i686"
56 ssl_arch = linux-elf no-asm 386
59 if "%{DISTRO_ARCH}" == "armv5tel"
60 ssl_arch = linux-generic32
63 if "%{DISTRO_ARCH}" == "armv7hl"
64 ssl_arch = linux-generic32
70 --openssldir=/etc/pki/tls \
71 --enginesdir=%{libdir}/openssl/engines \
91 # Generate hashes for the included certs.
96 # Revert ca-dir patch. Otherwise the tests will fail.
97 patch -Np1 -R < %{DIR_PATCHES}/openssl-1.0.0-beta4-ca-dir.patch
103 make install build-shared INSTALL_PREFIX=%{BUILDROOT}
105 # Install manpages do right place
106 mkdir -pv %{BUILDROOT}/usr/share
107 mv -v %{BUILDROOT}/etc/pki/tls/man %{BUILDROOT}/usr/share/
109 mkdir -pv %{BUILDROOT}%{libdir}/openssl
110 mv -v %{BUILDROOT}%{libdir}/engines %{BUILDROOT}%{libdir}/openssl
112 mkdir -pv %{BUILDROOT}/etc/pki/CA/private
113 chmod -v 700 -R %{BUILDROOT}/etc/pki/CA
115 mkdir -pv %{BUILDROOT}/etc/pki/tls
116 install -m 0644 %{DIR_SOURCE}/openssl.cnf %{BUILDROOT}/etc/pki/tls
117 cp -v -r certs %{BUILDROOT}/etc/pki/tls
119 # Rename man pages so that they don't conflict with other system man pages.
120 pushd %{BUILDROOT}%{mandir}
121 for manpage in man*/*; do
122 if [ -L ${manpage} ]; then
123 TARGET=`ls -l ${manpage} | awk '{ print $NF }'`
124 ln -snf ${TARGET}ssl ${manpage}ssl
127 mv ${manpage} ${manpage}ssl
136 requires += %{name}-libs = %{thisver}
142 requires += ca-certificates
144 conflicts += %{name} < %{thisver}
146 files += %{libdir}/openssl
149 package %{name}-devel
153 package %{name}-debuginfo