]> git.ipfire.org Git - ipfire-3.x.git/blob - openssl/openssl.nm
Merge remote-tracking branch 'arne_f/automake'
[ipfire-3.x.git] / openssl / openssl.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = openssl
7 version = 1.0.1
8 release = 1
9
10 maintainer = Michael Tremer <michael.tremer@ipfire.org>
11 groups = System/Libraries
12 url = http://www.openssl.org/
13 license = OpenSSL
14 summary = A general purpose cryptography library with TLS implementation.
15
16 description
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.
20 end
21
22 source_dl = http://openssl.org/source/
23
24 build
25 requires
26 bc
27 gnutls-devel
28 perl
29 util-linux
30 zlib-devel
31 end
32
33 CFLAGS += -DPURIFY
34
35 prepare_cmds
36 find crypto/ -name Makefile -exec \
37 sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i {} \;
38
39 # Modify the various perl scripts to reference perl in the right location.
40 perl util/perlpath.pl /usr/bin
41
42 # Generate a table with the compile settings for my perusal.
43 touch Makefile
44 make TABLE PERL=/usr/bin/perl
45 end
46
47 # Set default ssl_arch.
48 ssl_arch = linux-%{DISTRO_ARCH}
49
50 if "%{DISTRO_ARCH}" == "i686"
51 # 386 implies no-sse2
52 ssl_arch = linux-elf no-asm 386
53 end
54
55 if "%{DISTRO_ARCH}" == "armv5tel"
56 ssl_arch = linux-generic32
57 end
58
59 if "%{DISTRO_ARCH}" == "armv7hl"
60 ssl_arch = linux-generic32
61 end
62
63 build
64 ./Configure \
65 --prefix=/usr \
66 --openssldir=/etc/pki/tls \
67 --enginesdir=%{libdir}/openssl/engines \
68 shared \
69 zlib-dynamic \
70 enable-camellia \
71 enable-md2 \
72 enable-seed \
73 enable-tlsext \
74 enable-rfc3779 \
75 no-idea \
76 no-mdc2 \
77 no-rc5 \
78 no-ec no-ecdh no-ecdsa \
79 no-srp \
80 -DSSL_FORBID_ENULL \
81 %{ssl_arch} \
82 fips
83
84 # Build.
85 make depend all build-shared RPM_OPT_FLAGS="%{CFLAGS}" #%{PARALLELISMFLAGS}
86
87 # Generate hashes for the included certs.
88 make rehash build-shared
89 end
90
91 test
92 # Revert ca-dir patch. Otherwise the tests will fail.
93 patch -Np1 -R < %{DIR_PATCHES}/openssl-1.0.0-beta4-ca-dir.patch
94
95 make test
96 end
97
98 install
99 make install build-shared INSTALL_PREFIX=%{BUILDROOT}
100
101 # Install manpages do right place
102 mkdir -pv %{BUILDROOT}/usr/share
103 mv -v %{BUILDROOT}/etc/pki/tls/man %{BUILDROOT}/usr/share/
104
105 mkdir -pv %{BUILDROOT}%{libdir}/openssl
106 mv -v %{BUILDROOT}%{libdir}/engines %{BUILDROOT}%{libdir}/openssl
107
108 mkdir -pv %{BUILDROOT}/etc/pki/CA/private
109 chmod -v 700 -R %{BUILDROOT}/etc/pki/CA
110
111 mkdir -pv %{BUILDROOT}/etc/pki/tls
112 install -m 0644 %{DIR_SOURCE}/openssl.cnf %{BUILDROOT}/etc/pki/tls
113 cp -v -r certs %{BUILDROOT}/etc/pki/tls
114
115 # Rename man pages so that they don't conflict with other system man pages.
116 pushd ${BUILDROOT}/usr/share/man
117 for manpage in man*/*; do
118 if [ -L ${manpage} ]; then
119 TARGET=`ls -l ${manpage} | awk '{ print $NF }'`
120 ln -snf ${TARGET}ssl ${manpage}ssl
121 rm -f ${manpage}
122 else
123 mv ${manpage} ${manpage}ssl
124 fi
125 done
126
127 mv -v %{BUILDROOT}/usr/share/man/man1/{,ssl}passwd.1
128 mv -v %{BUILDROOT}/usr/share/man/man1/{,ssl}rand.1
129 popd
130 end
131 end
132
133 packages
134 package %{name}
135
136 package %{name}-libs
137 template LIBS
138
139 requires += ca-certificates
140
141 provides += libcrypto.so.10(libcrypto.so.10)
142 provides += libssl.so.10(libssl.so.10)
143 end
144
145 package %{name}-devel
146 template DEVEL
147 end
148
149 package %{name}-debuginfo
150 template DEBUGINFO
151 end
152 end