]> git.ipfire.org Git - ipfire-3.x.git/blame - openssl/openssl.nm
openssl: Update to 1.1.0g
[ipfire-3.x.git] / openssl / openssl.nm
CommitLineData
93c1e71e 1###############################################################################
802ea3af
MT
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
93c1e71e
MT
4###############################################################################
5
802ea3af 6name = openssl
41388a63
MT
7version = 1.1.0g
8release = 1
93c1e71e 9
802ea3af
MT
10maintainer = Michael Tremer <michael.tremer@ipfire.org>
11groups = System/Libraries
12url = http://www.openssl.org/
13license = OpenSSL
14summary = A general purpose cryptography library with TLS implementation.
93c1e71e 15
802ea3af
MT
16description
17 The OpenSSL toolkit provides support for secure communications between
18 machines. OpenSSL includes a certificate management tool and shared
93c1e71e 19 libraries which provide various cryptographic algorithms and protocols.
802ea3af 20end
93c1e71e 21
5416a00f 22source_dl = http://openssl.org/source/
93c1e71e 23
802ea3af
MT
24build
25 requires
41388a63
MT
26 ca-certificates
27 coreutils
802ea3af 28 perl
41388a63
MT
29 perl(Math::BigInt)
30 perl(Module::Load::Conditional)
31 perl(Test::Harness)
32 perl(Test::More)
33 sed
802ea3af
MT
34 zlib-devel
35 end
036fcb12 36
41388a63 37 export HASHBANGPERL = %{bindir}/perl
0595faf5 38
41388a63 39 CFLAGS += -DPURIFY -Wa,--noexecstack
68d15d21 40
64787ed5
MT
41 # Set default ssl_arch.
42 ssl_arch = linux-%{DISTRO_ARCH}
43
41388a63
MT
44 if "%{DISTRO_ARCH}" == "x86_64"
45 ssl_arch += enable-ec_nistp_64_gcc_128
46 end
47
802ea3af 48 if "%{DISTRO_ARCH}" == "i686"
2fe46911
MT
49 # 386 implies no-sse2
50 ssl_arch = linux-elf no-asm 386
51 end
52
41388a63
MT
53 if "%{DISTRO_ARCH}" == "aarch64"
54 ssl_arch += enable-ec_nistp_64_gcc_128
55 end
56
2fe46911 57 if "%{DISTRO_ARCH}" == "armv5tel"
8b06d263 58 ssl_arch = linux-armv4
802ea3af 59 end
93c1e71e 60
89fb3b0e 61 if "%{DISTRO_ARCH}" == "armv7hl"
8b06d263 62 ssl_arch = linux-armv4
89fb3b0e
MT
63 end
64
802ea3af 65 build
93c1e71e 66 ./Configure \
41388a63
MT
67 --prefix=%{prefix} \
68 --openssldir=%{sysconfdir}/pki/tls \
93c1e71e 69 shared \
41388a63 70 zlib \
93c1e71e
MT
71 enable-camellia \
72 enable-seed \
93c1e71e 73 enable-rfc3779 \
41388a63
MT
74 enable-ssl3 \
75 enable-ssl3-method \
76 no-rc4 \
93c1e71e 77 no-rc5 \
41388a63
MT
78 %{ssl_arch} \
79 ${CFLAGS} \
80 ${LDFLAGS}
802ea3af 81
41388a63 82 util/mkdef.pl crypto update
32c2735c 83 make all
93c1e71e 84
41388a63
MT
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
802ea3af 89 end
93c1e71e 90
802ea3af 91 test
0595faf5 92 # Revert ca-dir patch. Otherwise the tests will fail.
41388a63 93 patch -Np1 -R < %{DIR_PATCHES}/openssl-1.1.0-ca-dir.patch
0595faf5 94
802ea3af
MT
95 make test
96 end
93c1e71e 97
802ea3af 98 install
41388a63 99 make install DESTDIR=%{BUILDROOT}
76e1849a
MT
100
101 # Rename man pages so that they don't conflict with other system man pages.
85ff1622 102 pushd %{BUILDROOT}%{mandir}
41388a63
MT
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
76e1849a 116 done
76e1849a 117 popd
41388a63
MT
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}
802ea3af
MT
124 end
125end
93c1e71e 126
802ea3af
MT
127packages
128 package %{name}
3c4cf2d0
MT
129 requires += %{name}-libs = %{thisver}
130 end
93c1e71e 131
ed1f6221
SS
132 package %{name}-libs
133 template LIBS
134
135 requires += ca-certificates
0595faf5 136
3c4cf2d0
MT
137 conflicts += %{name} < %{thisver}
138
41388a63 139 files += %{libdir}/openssl %{libdir}/engines*
ed1f6221
SS
140 end
141
802ea3af
MT
142 package %{name}-devel
143 template DEVEL
144 end
1f9bc2f0
MT
145
146 package %{name}-debuginfo
147 template DEBUGINFO
148 end
802ea3af 149end