]>
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 |
37d333a7 MT |
7 | version = 1.0.1e |
8 | release = 1 | |
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 | 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 | |
ed1f6221 | 43 | # Modify the various perl scripts to reference perl in the right location. |
802ea3af | 44 | perl util/perlpath.pl /usr/bin |
68d15d21 | 45 | |
802ea3af MT |
46 | # Generate a table with the compile settings for my perusal. |
47 | touch Makefile | |
48 | make TABLE PERL=/usr/bin/perl | |
49 | end | |
68d15d21 | 50 | |
64787ed5 MT |
51 | # Set default ssl_arch. |
52 | ssl_arch = linux-%{DISTRO_ARCH} | |
53 | ||
802ea3af | 54 | if "%{DISTRO_ARCH}" == "i686" |
2fe46911 MT |
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 | |
802ea3af | 61 | end |
93c1e71e | 62 | |
89fb3b0e MT |
63 | if "%{DISTRO_ARCH}" == "armv7hl" |
64 | ssl_arch = linux-generic32 | |
65 | end | |
66 | ||
802ea3af | 67 | build |
93c1e71e MT |
68 | ./Configure \ |
69 | --prefix=/usr \ | |
70 | --openssldir=/etc/pki/tls \ | |
64787ed5 | 71 | --enginesdir=%{libdir}/openssl/engines \ |
93c1e71e MT |
72 | shared \ |
73 | zlib-dynamic \ | |
74 | enable-camellia \ | |
9ceab1e7 | 75 | enable-md2 \ |
93c1e71e MT |
76 | enable-seed \ |
77 | enable-tlsext \ | |
78 | enable-rfc3779 \ | |
79 | no-idea \ | |
80 | no-mdc2 \ | |
81 | no-rc5 \ | |
32c2735c | 82 | no-ec no-ec2m no-ecdh no-ecdsa \ |
0595faf5 | 83 | no-srp \ |
802ea3af | 84 | -DSSL_FORBID_ENULL \ |
0595faf5 MT |
85 | %{ssl_arch} \ |
86 | fips | |
802ea3af MT |
87 | |
88 | # Build. | |
32c2735c MT |
89 | make depend |
90 | make all | |
93c1e71e | 91 | |
802ea3af | 92 | # Generate hashes for the included certs. |
32c2735c | 93 | make rehash |
802ea3af | 94 | end |
93c1e71e | 95 | |
802ea3af | 96 | test |
0595faf5 MT |
97 | # Revert ca-dir patch. Otherwise the tests will fail. |
98 | patch -Np1 -R < %{DIR_PATCHES}/openssl-1.0.0-beta4-ca-dir.patch | |
99 | ||
802ea3af MT |
100 | make test |
101 | end | |
93c1e71e | 102 | |
802ea3af MT |
103 | install |
104 | make install build-shared INSTALL_PREFIX=%{BUILDROOT} | |
80032003 | 105 | |
802ea3af MT |
106 | # Install manpages do right place |
107 | mkdir -pv %{BUILDROOT}/usr/share | |
108 | mv -v %{BUILDROOT}/etc/pki/tls/man %{BUILDROOT}/usr/share/ | |
55495f4d | 109 | |
64787ed5 MT |
110 | mkdir -pv %{BUILDROOT}%{libdir}/openssl |
111 | mv -v %{BUILDROOT}%{libdir}/engines %{BUILDROOT}%{libdir}/openssl | |
68d15d21 | 112 | |
802ea3af MT |
113 | mkdir -pv %{BUILDROOT}/etc/pki/CA/private |
114 | chmod -v 700 -R %{BUILDROOT}/etc/pki/CA | |
93c1e71e | 115 | |
802ea3af MT |
116 | mkdir -pv %{BUILDROOT}/etc/pki/tls |
117 | install -m 0644 %{DIR_SOURCE}/openssl.cnf %{BUILDROOT}/etc/pki/tls | |
118 | cp -v -r certs %{BUILDROOT}/etc/pki/tls | |
76e1849a MT |
119 | |
120 | # Rename man pages so that they don't conflict with other system man pages. | |
85ff1622 | 121 | pushd %{BUILDROOT}%{mandir} |
76e1849a MT |
122 | for manpage in man*/*; do |
123 | if [ -L ${manpage} ]; then | |
124 | TARGET=`ls -l ${manpage} | awk '{ print $NF }'` | |
125 | ln -snf ${TARGET}ssl ${manpage}ssl | |
126 | rm -f ${manpage} | |
127 | else | |
128 | mv ${manpage} ${manpage}ssl | |
129 | fi | |
130 | done | |
76e1849a | 131 | popd |
802ea3af MT |
132 | end |
133 | end | |
93c1e71e | 134 | |
802ea3af MT |
135 | packages |
136 | package %{name} | |
93c1e71e | 137 | |
ed1f6221 SS |
138 | package %{name}-libs |
139 | template LIBS | |
140 | ||
141 | requires += ca-certificates | |
0595faf5 | 142 | |
85ff1622 | 143 | files += %{libdir}/openssl |
ed1f6221 SS |
144 | end |
145 | ||
802ea3af MT |
146 | package %{name}-devel |
147 | template DEVEL | |
148 | end | |
1f9bc2f0 MT |
149 | |
150 | package %{name}-debuginfo | |
151 | template DEBUGINFO | |
152 | end | |
802ea3af | 153 | end |