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 if "%{DISTRO_ARCH}" == "i686"
47 ssl_arch = linux-elf no-asm 386
50 if "%{DISTRO_ARCH}" == "armv5tel"
51 ssl_arch = linux-generic32
57 --openssldir=/etc/pki/tls \
58 --enginesdir=/usr/lib/openssl/engines \
69 no-ec no-ecdh no-ecdsa \
74 make depend all build-shared RPM_OPT_FLAGS="%{CFLAGS}" #%{PARALLELISMFLAGS}
76 # Generate hashes for the included certs.
77 make rehash build-shared
85 make install build-shared INSTALL_PREFIX=%{BUILDROOT}
87 mkdir -pv %{BUILDROOT}/lib
88 mv -vf %{BUILDROOT}/usr/lib/lib{crypto,ssl}.so.* %{BUILDROOT}/lib
89 ln -svf ../../lib/libcrypto.so.10 %{BUILDROOT}/usr/lib/libcrypto.so
90 ln -svf ../../lib/libssl.so.10 %{BUILDROOT}/usr/lib/libssl.so
92 # Install manpages do right place
93 mkdir -pv %{BUILDROOT}/usr/share
94 mv -v %{BUILDROOT}/etc/pki/tls/man %{BUILDROOT}/usr/share/
96 mkdir -pv %{BUILDROOT}/usr/lib/openssl
97 mv -v %{BUILDROOT}/usr/lib/engines %{BUILDROOT}/usr/lib/openssl
99 mkdir -pv %{BUILDROOT}/etc/pki/CA/private
100 chmod -v 700 -R %{BUILDROOT}/etc/pki/CA
102 mkdir -pv %{BUILDROOT}/etc/pki/tls
103 install -m 0644 %{DIR_SOURCE}/openssl.cnf %{BUILDROOT}/etc/pki/tls
104 cp -v -r certs %{BUILDROOT}/etc/pki/tls
106 # Rename man pages so that they don't conflict with other system man pages.
107 pushd ${BUILDROOT}/usr/share/man
108 for manpage in man*/*; do
109 if [ -L ${manpage} ]; then
110 TARGET=`ls -l ${manpage} | awk '{ print $NF }'`
111 ln -snf ${TARGET}ssl ${manpage}ssl
114 mv ${manpage} ${manpage}ssl
118 mv -v %{BUILDROOT}/usr/share/man/man1/{,ssl}passwd.1
119 mv -v %{BUILDROOT}/usr/share/man/man1/{,ssl}rand.1
127 package %{name}-devel
131 package %{name}-debuginfo