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 find crypto/ -name Makefile -exec \
35 sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i {} \;
37 # Modify the various perl scripts to reference perl in the right location.
38 perl util/perlpath.pl /usr/bin
40 # Generate a table with the compile settings for my perusal.
42 make TABLE PERL=/usr/bin/perl
45 # Set default ssl_arch.
46 ssl_arch = linux-%{DISTRO_ARCH}
48 if "%{DISTRO_ARCH}" == "i686"
50 ssl_arch = linux-elf no-asm 386
53 if "%{DISTRO_ARCH}" == "armv5tel"
54 ssl_arch = linux-generic32
57 if "%{DISTRO_ARCH}" == "armv7hl"
58 ssl_arch = linux-generic32
64 --openssldir=/etc/pki/tls \
65 --enginesdir=%{libdir}/openssl/engines \
76 no-ec no-ecdh no-ecdsa \
81 make depend all build-shared RPM_OPT_FLAGS="%{CFLAGS}" #%{PARALLELISMFLAGS}
83 # Generate hashes for the included certs.
84 make rehash build-shared
92 make install build-shared INSTALL_PREFIX=%{BUILDROOT}
94 mkdir -pv %{BUILDROOT}/%{lib}
95 mv -vf %{BUILDROOT}%{libdir}/lib{crypto,ssl}.so.* %{BUILDROOT}/%{lib}
96 ln -svf ../../%{lib}/libcrypto.so.10 %{BUILDROOT}%{libdir}/libcrypto.so
97 ln -svf ../../%{lib}/libssl.so.10 %{BUILDROOT}%{libdir}/libssl.so
99 # Install manpages do right place
100 mkdir -pv %{BUILDROOT}/usr/share
101 mv -v %{BUILDROOT}/etc/pki/tls/man %{BUILDROOT}/usr/share/
103 mkdir -pv %{BUILDROOT}%{libdir}/openssl
104 mv -v %{BUILDROOT}%{libdir}/engines %{BUILDROOT}%{libdir}/openssl
106 mkdir -pv %{BUILDROOT}/etc/pki/CA/private
107 chmod -v 700 -R %{BUILDROOT}/etc/pki/CA
109 mkdir -pv %{BUILDROOT}/etc/pki/tls
110 install -m 0644 %{DIR_SOURCE}/openssl.cnf %{BUILDROOT}/etc/pki/tls
111 cp -v -r certs %{BUILDROOT}/etc/pki/tls
113 # Rename man pages so that they don't conflict with other system man pages.
114 pushd ${BUILDROOT}/usr/share/man
115 for manpage in man*/*; do
116 if [ -L ${manpage} ]; then
117 TARGET=`ls -l ${manpage} | awk '{ print $NF }'`
118 ln -snf ${TARGET}ssl ${manpage}ssl
121 mv ${manpage} ${manpage}ssl
125 mv -v %{BUILDROOT}/usr/share/man/man1/{,ssl}passwd.1
126 mv -v %{BUILDROOT}/usr/share/man/man1/{,ssl}rand.1
137 requires += ca-certificates
140 package %{name}-devel
144 package %{name}-debuginfo