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
60 --openssldir=/etc/pki/tls \
61 --enginesdir=%{libdir}/openssl/engines \
72 no-ec no-ecdh no-ecdsa \
77 make depend all build-shared RPM_OPT_FLAGS="%{CFLAGS}" #%{PARALLELISMFLAGS}
79 # Generate hashes for the included certs.
80 make rehash build-shared
88 make install build-shared INSTALL_PREFIX=%{BUILDROOT}
90 mkdir -pv %{BUILDROOT}/%{lib}
91 mv -vf %{BUILDROOT}%{libdir}/lib{crypto,ssl}.so.* %{BUILDROOT}/%{lib}
92 ln -svf ../../%{lib}/libcrypto.so.10 %{BUILDROOT}%{libdir}/libcrypto.so
93 ln -svf ../../%{lib}/libssl.so.10 %{BUILDROOT}%{libdir}/libssl.so
95 # Install manpages do right place
96 mkdir -pv %{BUILDROOT}/usr/share
97 mv -v %{BUILDROOT}/etc/pki/tls/man %{BUILDROOT}/usr/share/
99 mkdir -pv %{BUILDROOT}%{libdir}/openssl
100 mv -v %{BUILDROOT}%{libdir}/engines %{BUILDROOT}%{libdir}/openssl
102 mkdir -pv %{BUILDROOT}/etc/pki/CA/private
103 chmod -v 700 -R %{BUILDROOT}/etc/pki/CA
105 mkdir -pv %{BUILDROOT}/etc/pki/tls
106 install -m 0644 %{DIR_SOURCE}/openssl.cnf %{BUILDROOT}/etc/pki/tls
107 cp -v -r certs %{BUILDROOT}/etc/pki/tls
109 # Rename man pages so that they don't conflict with other system man pages.
110 pushd ${BUILDROOT}/usr/share/man
111 for manpage in man*/*; do
112 if [ -L ${manpage} ]; then
113 TARGET=`ls -l ${manpage} | awk '{ print $NF }'`
114 ln -snf ${TARGET}ssl ${manpage}ssl
117 mv ${manpage} ${manpage}ssl
121 mv -v %{BUILDROOT}/usr/share/man/man1/{,ssl}passwd.1
122 mv -v %{BUILDROOT}/usr/share/man/man1/{,ssl}rand.1
130 package %{name}-devel
134 package %{name}-debuginfo