]> git.ipfire.org Git - ipfire-3.x.git/blob - openssl/openssl.nm
Merge remote-tracking branch 'ms/pdns'
[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.1h
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 export RPM_OPT_FLAGS = %{CFLAGS}
35
36 prepare_cmds
37 sed -e 's/SHLIB_VERSION_NUMBER "1.0.0"/SHLIB_VERSION_NUMBER "%{version}"/' \
38 -i crypto/opensslv.h
39
40 find crypto/ -name Makefile -exec \
41 sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i {} \;
42
43 # Modify the various perl scripts to reference perl in the right location.
44 perl util/perlpath.pl /usr/bin
45
46 # Generate a table with the compile settings for my perusal.
47 touch Makefile
48 make TABLE PERL=/usr/bin/perl
49 end
50
51 # Set default ssl_arch.
52 ssl_arch = linux-%{DISTRO_ARCH}
53
54 if "%{DISTRO_ARCH}" == "i686"
55 # 386 implies no-sse2
56 ssl_arch = linux-elf no-asm 386
57 end
58
59 if "%{DISTRO_ARCH}" == "armv5tel"
60 ssl_arch = linux-generic32
61 end
62
63 if "%{DISTRO_ARCH}" == "armv7hl"
64 ssl_arch = linux-generic32
65 end
66
67 build
68 ./Configure \
69 --prefix=/usr \
70 --openssldir=/etc/pki/tls \
71 --enginesdir=%{libdir}/openssl/engines \
72 shared \
73 zlib-dynamic \
74 enable-camellia \
75 enable-md2 \
76 enable-seed \
77 enable-tlsext \
78 enable-rfc3779 \
79 no-idea \
80 no-mdc2 \
81 no-rc5 \
82 no-ec no-ec2m no-ecdh no-ecdsa \
83 no-srp \
84 -DSSL_FORBID_ENULL \
85 %{ssl_arch}
86
87 # Build.
88 make depend
89 make all
90
91 # Generate hashes for the included certs.
92 make rehash
93 end
94
95 test
96 # Revert ca-dir patch. Otherwise the tests will fail.
97 patch -Np1 -R < %{DIR_PATCHES}/openssl-1.0.0-beta4-ca-dir.patch
98
99 make test
100 end
101
102 install
103 make install build-shared INSTALL_PREFIX=%{BUILDROOT}
104
105 # Install manpages do right place
106 mkdir -pv %{BUILDROOT}/usr/share
107 mv -v %{BUILDROOT}/etc/pki/tls/man %{BUILDROOT}/usr/share/
108
109 mkdir -pv %{BUILDROOT}%{libdir}/openssl
110 mv -v %{BUILDROOT}%{libdir}/engines %{BUILDROOT}%{libdir}/openssl
111
112 mkdir -pv %{BUILDROOT}/etc/pki/CA/private
113 chmod -v 700 -R %{BUILDROOT}/etc/pki/CA
114
115 mkdir -pv %{BUILDROOT}/etc/pki/tls
116 install -m 0644 %{DIR_SOURCE}/openssl.cnf %{BUILDROOT}/etc/pki/tls
117 cp -v -r certs %{BUILDROOT}/etc/pki/tls
118
119 # Rename man pages so that they don't conflict with other system man pages.
120 pushd %{BUILDROOT}%{mandir}
121 for manpage in man*/*; do
122 if [ -L ${manpage} ]; then
123 TARGET=`ls -l ${manpage} | awk '{ print $NF }'`
124 ln -snf ${TARGET}ssl ${manpage}ssl
125 rm -f ${manpage}
126 else
127 mv ${manpage} ${manpage}ssl
128 fi
129 done
130 popd
131 end
132 end
133
134 packages
135 package %{name}
136 requires += %{name}-libs = %{thisver}
137 end
138
139 package %{name}-libs
140 template LIBS
141
142 requires += ca-certificates
143
144 conflicts += %{name} < %{thisver}
145
146 files += %{libdir}/openssl
147 end
148
149 package %{name}-devel
150 template DEVEL
151 end
152
153 package %{name}-debuginfo
154 template DEBUGINFO
155 end
156 end