]> git.ipfire.org Git - ipfire-3.x.git/blob - openssl/openssl.nm
git: Update to 2.23.0
[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.1.0g
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 ca-certificates
27 coreutils
28 perl
29 perl(Math::BigInt)
30 perl(Module::Load::Conditional)
31 perl(Test::Harness)
32 perl(Test::More)
33 sed
34 zlib-devel
35 end
36
37 export HASHBANGPERL = %{bindir}/perl
38
39 CFLAGS += -DPURIFY -Wa,--noexecstack
40
41 # Set default ssl_arch.
42 ssl_arch = linux-%{DISTRO_ARCH}
43
44 if "%{DISTRO_ARCH}" == "x86_64"
45 ssl_arch += enable-ec_nistp_64_gcc_128
46 end
47
48 if "%{DISTRO_ARCH}" == "i686"
49 # 386 implies no-sse2
50 ssl_arch = linux-elf no-asm 386
51 end
52
53 if "%{DISTRO_ARCH}" == "aarch64"
54 ssl_arch += enable-ec_nistp_64_gcc_128
55 end
56
57 if "%{DISTRO_ARCH}" == "armv5tel"
58 ssl_arch = linux-armv4
59 end
60
61 if "%{DISTRO_ARCH}" == "armv7hl"
62 ssl_arch = linux-armv4
63 end
64
65 build
66 ./Configure \
67 --prefix=%{prefix} \
68 --openssldir=%{sysconfdir}/pki/tls \
69 shared \
70 zlib \
71 enable-camellia \
72 enable-seed \
73 enable-rfc3779 \
74 enable-ssl3 \
75 enable-ssl3-method \
76 no-rc4 \
77 no-rc5 \
78 %{ssl_arch} \
79 ${CFLAGS} \
80 ${LDFLAGS}
81
82 util/mkdef.pl crypto update
83 make all
84
85 # Clean up the .pc files
86 for i in libcrypto.pc libssl.pc openssl.pc; do
87 sed -i '/^Libs.private:/{s/-L[^ ]* //;s/-Wl[^ ]* //}' $i
88 done
89 end
90
91 test
92 # Revert ca-dir patch. Otherwise the tests will fail.
93 patch -Np1 -R < %{DIR_PATCHES}/openssl-1.1.0-ca-dir.patch
94
95 make test
96 end
97
98 install
99 make install DESTDIR=%{BUILDROOT}
100
101 # Rename man pages so that they don't conflict with other system man pages.
102 pushd %{BUILDROOT}%{mandir}
103 ln -svf config.5 man5/openssl.cnf.5
104 for manpage in man*/*; do
105 if [ -L "${manpage}" ]; then
106 TARGET=$(ls -l "${manpage}" | awk '{ print $NF }')
107 ln -snf "${TARGET}ssl" "${manpage}ssl"
108 rm -f "${manpage}"
109 else
110 mv ${manpage} ${manpage}ssl
111 fi
112 done
113 for conflict in passwd rand; do
114 rename ${conflict} ssl${conflict} man*/${conflict}*
115 ln -svf ssl${conflict}.1ssl %{BUILDROOT}%{mandir}/man1/openssl-${conflict}.1ssl
116 done
117 popd
118
119 # Remove dist config
120 rm -vf %{BUILDROOT}%{sysconfdir}/pki/tls/openssl.cnf.dist
121
122 # Move executable stuff to %{bindir}
123 mv -v %{BUILDROOT}%{sysconfdir}/pki/tls/misc/{CA.pl,tsget} %{BUILDROOT}%{bindir}
124 end
125 end
126
127 packages
128 package %{name}
129 requires += %{name}-libs = %{thisver}
130 end
131
132 package %{name}-libs
133 template LIBS
134
135 requires += ca-certificates
136
137 conflicts += %{name} < %{thisver}
138
139 files += %{libdir}/openssl %{libdir}/engines*
140 end
141
142 package %{name}-devel
143 template DEVEL
144 end
145
146 package %{name}-debuginfo
147 template DEBUGINFO
148 end
149 end