]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blame - openssl/openssl.nm
kernel: update to 4.12.10
[people/arne_f/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
d81720bc 7version = 1.0.2d
7b5c256a 8release = 4
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
26 bc
27 gnutls-devel
28 perl
76e1849a 29 util-linux
802ea3af
MT
30 zlib-devel
31 end
036fcb12 32
0595faf5 33 CFLAGS += -DPURIFY
7b5c256a 34 export RPM_OPT_FLAGS = %{CFLAGS} %{LDFLAGS}
0595faf5 35
802ea3af 36 prepare_cmds
37d333a7
MT
37 sed -e 's/SHLIB_VERSION_NUMBER "1.0.0"/SHLIB_VERSION_NUMBER "%{version}"/' \
38 -i crypto/opensslv.h
39
802ea3af
MT
40 find crypto/ -name Makefile -exec \
41 sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i {} \;
93c1e71e 42
802ea3af
MT
43 # Generate a table with the compile settings for my perusal.
44 touch Makefile
45 make TABLE PERL=/usr/bin/perl
46 end
68d15d21 47
64787ed5
MT
48 # Set default ssl_arch.
49 ssl_arch = linux-%{DISTRO_ARCH}
50
802ea3af 51 if "%{DISTRO_ARCH}" == "i686"
2fe46911
MT
52 # 386 implies no-sse2
53 ssl_arch = linux-elf no-asm 386
54 end
55
56 if "%{DISTRO_ARCH}" == "armv5tel"
8b06d263 57 ssl_arch = linux-armv4
802ea3af 58 end
93c1e71e 59
89fb3b0e 60 if "%{DISTRO_ARCH}" == "armv7hl"
8b06d263 61 ssl_arch = linux-armv4
89fb3b0e
MT
62 end
63
802ea3af 64 build
93c1e71e
MT
65 ./Configure \
66 --prefix=/usr \
67 --openssldir=/etc/pki/tls \
64787ed5 68 --enginesdir=%{libdir}/openssl/engines \
93c1e71e
MT
69 shared \
70 zlib-dynamic \
71 enable-camellia \
9ceab1e7 72 enable-md2 \
93c1e71e
MT
73 enable-seed \
74 enable-tlsext \
75 enable-rfc3779 \
76 no-idea \
77 no-mdc2 \
78 no-rc5 \
d27751e0 79 no-ec2m \
0595faf5 80 no-srp \
802ea3af 81 -DSSL_FORBID_ENULL \
3c4cf2d0 82 %{ssl_arch}
802ea3af
MT
83
84 # Build.
32c2735c
MT
85 make depend
86 make all
93c1e71e 87
802ea3af 88 # Generate hashes for the included certs.
32c2735c 89 make rehash
802ea3af 90 end
93c1e71e 91
802ea3af 92 test
0595faf5
MT
93 # Revert ca-dir patch. Otherwise the tests will fail.
94 patch -Np1 -R < %{DIR_PATCHES}/openssl-1.0.0-beta4-ca-dir.patch
95
802ea3af
MT
96 make test
97 end
93c1e71e 98
802ea3af
MT
99 install
100 make install build-shared INSTALL_PREFIX=%{BUILDROOT}
80032003 101
802ea3af
MT
102 # Install manpages do right place
103 mkdir -pv %{BUILDROOT}/usr/share
104 mv -v %{BUILDROOT}/etc/pki/tls/man %{BUILDROOT}/usr/share/
55495f4d 105
d2f28a24
MT
106 if [ -d "%{BUILDROOT}%{libdir}/engines" ]; then
107 mkdir -pv %{BUILDROOT}%{libdir}/openssl
108 mv -v %{BUILDROOT}%{libdir}/engines %{BUILDROOT}%{libdir}/openssl
109 fi
68d15d21 110
802ea3af
MT
111 mkdir -pv %{BUILDROOT}/etc/pki/CA/private
112 chmod -v 700 -R %{BUILDROOT}/etc/pki/CA
93c1e71e 113
802ea3af
MT
114 mkdir -pv %{BUILDROOT}/etc/pki/tls
115 install -m 0644 %{DIR_SOURCE}/openssl.cnf %{BUILDROOT}/etc/pki/tls
116 cp -v -r certs %{BUILDROOT}/etc/pki/tls
76e1849a
MT
117
118 # Rename man pages so that they don't conflict with other system man pages.
85ff1622 119 pushd %{BUILDROOT}%{mandir}
b7234e01
MT
120 for m in $(find . -type f | xargs grep -L '#include'); do
121 d="${m%/*}"
122 d="${d#./}"
123 m="${m##*/}"
124 [[ ${m} == openssl.1* ]] && continue
125 [[ -n "$(find -L "${d}" -type l)" ]] && exit 1
126 mv ${d}/{,ssl-}${m}
127
128 # fix up references to renamed man pages
129 sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' "${d}/ssl-${m}"
130 ln -s "ssl-${m}" "${d}/openssl-${m}"
131
132 # locate any symlinks that point to this man page ... we assume
133 # that any broken links are due to the above renaming
134 for s in $(find -L "${d}" -type l); do
135 s="${s##*/}"
136 rm -f "${d}/${s}"
137 ln -s "ssl-${m}" "${d}/ssl-${s}"
138 ln -s "ssl-${s}" "${d}/openssl-${s}"
139 done
76e1849a 140 done
b7234e01
MT
141
142 [[ -n "$(find -L "${d}" -type l)" ]] && exit 1 # "broken manpage links found :("
76e1849a 143 popd
802ea3af
MT
144 end
145end
93c1e71e 146
802ea3af
MT
147packages
148 package %{name}
3c4cf2d0
MT
149 requires += %{name}-libs = %{thisver}
150 end
93c1e71e 151
ed1f6221
SS
152 package %{name}-libs
153 template LIBS
154
155 requires += ca-certificates
0595faf5 156
3c4cf2d0
MT
157 conflicts += %{name} < %{thisver}
158
85ff1622 159 files += %{libdir}/openssl
ed1f6221
SS
160 end
161
802ea3af
MT
162 package %{name}-devel
163 template DEVEL
164 end
1f9bc2f0
MT
165
166 package %{name}-debuginfo
167 template DEBUGINFO
168 end
802ea3af 169end