]>
Commit | Line | Data |
---|---|---|
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 | 6 | name = openssl |
a7ff9508 | 7 | version = 1.0.1b |
32c2735c | 8 | release = 2 |
93c1e71e | 9 | |
802ea3af MT |
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. | |
93c1e71e | 15 | |
802ea3af MT |
16 | description |
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 | 20 | end |
93c1e71e | 21 | |
5416a00f | 22 | source_dl = http://openssl.org/source/ |
93c1e71e | 23 | |
802ea3af MT |
24 | build |
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 |
85ff1622 | 34 | export RPM_OPT_FLAGS = %{CFLAGS} |
0595faf5 | 35 | |
802ea3af MT |
36 | prepare_cmds |
37 | find crypto/ -name Makefile -exec \ | |
38 | sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i {} \; | |
93c1e71e | 39 | |
ed1f6221 | 40 | # Modify the various perl scripts to reference perl in the right location. |
802ea3af | 41 | perl util/perlpath.pl /usr/bin |
68d15d21 | 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" | |
57 | ssl_arch = linux-generic32 | |
802ea3af | 58 | end |
93c1e71e | 59 | |
89fb3b0e MT |
60 | if "%{DISTRO_ARCH}" == "armv7hl" |
61 | ssl_arch = linux-generic32 | |
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 \ | |
32c2735c | 79 | no-ec no-ec2m no-ecdh no-ecdsa \ |
0595faf5 | 80 | no-srp \ |
802ea3af | 81 | -DSSL_FORBID_ENULL \ |
0595faf5 MT |
82 | %{ssl_arch} \ |
83 | fips | |
802ea3af MT |
84 | |
85 | # Build. | |
32c2735c MT |
86 | make depend |
87 | make all | |
93c1e71e | 88 | |
802ea3af | 89 | # Generate hashes for the included certs. |
32c2735c | 90 | make rehash |
802ea3af | 91 | end |
93c1e71e | 92 | |
802ea3af | 93 | test |
0595faf5 MT |
94 | # Revert ca-dir patch. Otherwise the tests will fail. |
95 | patch -Np1 -R < %{DIR_PATCHES}/openssl-1.0.0-beta4-ca-dir.patch | |
96 | ||
802ea3af MT |
97 | make test |
98 | end | |
93c1e71e | 99 | |
802ea3af MT |
100 | install |
101 | make install build-shared INSTALL_PREFIX=%{BUILDROOT} | |
80032003 | 102 | |
802ea3af MT |
103 | # Install manpages do right place |
104 | mkdir -pv %{BUILDROOT}/usr/share | |
105 | mv -v %{BUILDROOT}/etc/pki/tls/man %{BUILDROOT}/usr/share/ | |
55495f4d | 106 | |
64787ed5 MT |
107 | mkdir -pv %{BUILDROOT}%{libdir}/openssl |
108 | mv -v %{BUILDROOT}%{libdir}/engines %{BUILDROOT}%{libdir}/openssl | |
68d15d21 | 109 | |
802ea3af MT |
110 | mkdir -pv %{BUILDROOT}/etc/pki/CA/private |
111 | chmod -v 700 -R %{BUILDROOT}/etc/pki/CA | |
93c1e71e | 112 | |
802ea3af MT |
113 | mkdir -pv %{BUILDROOT}/etc/pki/tls |
114 | install -m 0644 %{DIR_SOURCE}/openssl.cnf %{BUILDROOT}/etc/pki/tls | |
115 | cp -v -r certs %{BUILDROOT}/etc/pki/tls | |
76e1849a MT |
116 | |
117 | # Rename man pages so that they don't conflict with other system man pages. | |
85ff1622 | 118 | pushd %{BUILDROOT}%{mandir} |
76e1849a MT |
119 | for manpage in man*/*; do |
120 | if [ -L ${manpage} ]; then | |
121 | TARGET=`ls -l ${manpage} | awk '{ print $NF }'` | |
122 | ln -snf ${TARGET}ssl ${manpage}ssl | |
123 | rm -f ${manpage} | |
124 | else | |
125 | mv ${manpage} ${manpage}ssl | |
126 | fi | |
127 | done | |
76e1849a | 128 | popd |
802ea3af MT |
129 | end |
130 | end | |
93c1e71e | 131 | |
802ea3af MT |
132 | packages |
133 | package %{name} | |
93c1e71e | 134 | |
ed1f6221 SS |
135 | package %{name}-libs |
136 | template LIBS | |
137 | ||
138 | requires += ca-certificates | |
0595faf5 | 139 | |
85ff1622 | 140 | files += %{libdir}/openssl |
ed1f6221 SS |
141 | end |
142 | ||
802ea3af MT |
143 | package %{name}-devel |
144 | template DEVEL | |
145 | end | |
1f9bc2f0 MT |
146 | |
147 | package %{name}-debuginfo | |
148 | template DEBUGINFO | |
149 | end | |
802ea3af | 150 | end |