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"
46 SSL_ARCH = no-asm 386 # 386 implies no-sse2
52 --openssldir=/etc/pki/tls \
53 --enginesdir=/usr/lib/openssl/engines \
69 make depend all build-shared RPM_OPT_FLAGS="%{CFLAGS}" #%{PARALLELISMFLAGS}
71 # Generate hashes for the included certs.
72 make rehash build-shared
80 make install build-shared INSTALL_PREFIX=%{BUILDROOT}
82 mkdir -pv %{BUILDROOT}/lib
83 mv -vf %{BUILDROOT}/usr/lib/lib{crypto,ssl}.so.* %{BUILDROOT}/lib
84 ln -svf ../../lib/libcrypto.so.10 %{BUILDROOT}/usr/lib/libcrypto.so
85 ln -svf ../../lib/libssl.so.10 %{BUILDROOT}/usr/lib/libssl.so
87 # Install manpages do right place
88 mkdir -pv %{BUILDROOT}/usr/share
89 mv -v %{BUILDROOT}/etc/pki/tls/man %{BUILDROOT}/usr/share/
91 mkdir -pv %{BUILDROOT}/usr/lib/openssl
92 mv -v %{BUILDROOT}/usr/lib/engines %{BUILDROOT}/usr/lib/openssl
94 mkdir -pv %{BUILDROOT}/etc/pki/CA/private
95 chmod -v 700 -R %{BUILDROOT}/etc/pki/CA
97 mkdir -pv %{BUILDROOT}/etc/pki/tls
98 install -m 0644 %{DIR_SOURCE}/openssl.cnf %{BUILDROOT}/etc/pki/tls
99 cp -v -r certs %{BUILDROOT}/etc/pki/tls
101 # Rename man pages so that they don't conflict with other system man pages.
102 pushd ${BUILDROOT}/usr/share/man
103 for manpage in man*/*; do
104 if [ -L ${manpage} ]; then
105 TARGET=`ls -l ${manpage} | awk '{ print $NF }'`
106 ln -snf ${TARGET}ssl ${manpage}ssl
109 mv ${manpage} ${manpage}ssl
113 mv -v %{BUILDROOT}/usr/share/man/man1/{,ssl}passwd.1
114 mv -v %{BUILDROOT}/usr/share/man/man1/{,ssl}rand.1
122 package %{name}-devel