]>
Commit | Line | Data |
---|---|---|
41388a63 MT |
1 | ############################################################################### |
2 | # IPFire.org - An Open Source Firewall Solution # | |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
4 | ############################################################################### | |
5 | ||
6 | name = compat-openssl | |
7 | version = 1.0.2n | |
8 | release = 1 | |
9 | thisapp = openssl-%{version} | |
10 | ||
11 | maintainer = Michael Tremer <michael.tremer@ipfire.org> | |
12 | groups = System/Libraries | |
13 | url = http://www.openssl.org/ | |
14 | license = OpenSSL | |
15 | summary = A general purpose cryptography library with TLS implementation. | |
16 | ||
17 | description | |
18 | The OpenSSL toolkit provides support for secure communications between | |
19 | machines. OpenSSL includes a certificate management tool and shared | |
20 | libraries which provide various cryptographic algorithms and protocols. | |
21 | end | |
22 | ||
23 | source_dl = http://openssl.org/source/ | |
24 | ||
25 | build | |
26 | requires | |
27 | bc | |
28 | gnutls-devel | |
29 | perl | |
30 | util-linux | |
31 | zlib-devel | |
32 | end | |
33 | ||
34 | CFLAGS += -DPURIFY | |
35 | export RPM_OPT_FLAGS = %{CFLAGS} %{LDFLAGS} | |
36 | ||
37 | prepare_cmds | |
38 | sed -e 's/SHLIB_VERSION_NUMBER "1.0.0"/SHLIB_VERSION_NUMBER "%{version}"/' \ | |
39 | -i crypto/opensslv.h | |
40 | ||
41 | find crypto/ -name Makefile -exec \ | |
42 | sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i {} \; | |
43 | ||
44 | # Generate a table with the compile settings for my perusal. | |
45 | touch Makefile | |
46 | make TABLE PERL=/usr/bin/perl | |
47 | end | |
48 | ||
49 | # Set default ssl_arch. | |
50 | ssl_arch = linux-%{DISTRO_ARCH} | |
51 | ||
52 | if "%{DISTRO_ARCH}" == "i686" | |
53 | # 386 implies no-sse2 | |
54 | ssl_arch = linux-elf no-asm 386 | |
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=/usr \ | |
68 | --openssldir=/etc/pki/tls \ | |
69 | --enginesdir=%{libdir}/openssl/engines \ | |
70 | shared \ | |
71 | zlib-dynamic \ | |
72 | enable-camellia \ | |
73 | enable-md2 \ | |
74 | enable-seed \ | |
75 | enable-tlsext \ | |
76 | enable-rfc3779 \ | |
77 | no-idea \ | |
78 | no-mdc2 \ | |
79 | no-rc5 \ | |
80 | no-ec2m \ | |
81 | no-srp \ | |
82 | -DSSL_FORBID_ENULL \ | |
83 | %{ssl_arch} | |
84 | ||
85 | # Build. | |
86 | make depend | |
87 | make all | |
88 | ||
89 | # Generate hashes for the included certs. | |
90 | make rehash | |
91 | end | |
92 | ||
93 | test | |
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 | ||
97 | make test | |
98 | end | |
99 | ||
100 | install | |
101 | make install INSTALL_PREFIX=%{BUILDROOT} | |
102 | ||
103 | # Remove man pages | |
104 | rm -rfv %{BUILDROOT}%{sysconfdir}/pki/tls/man %{BUILDROOT}/usr/share/man* | |
105 | ||
106 | # Remove configuration files | |
107 | rm -rfv %{BUILDROOT}%{sysconfdir}/pki | |
108 | ||
109 | # Remove engines | |
110 | rm -rfv %{BUILDROOT}%{libdir}/{engines,openssl} | |
111 | ||
112 | # Remove binaries | |
113 | rm -rfv %{BUILDROOT}%{bindir} | |
114 | end | |
115 | end | |
116 | ||
117 | packages | |
118 | package %{name} | |
119 | requires | |
120 | ca-certificates | |
121 | end | |
122 | ||
123 | provides | |
124 | openssl = %{thisver} | |
125 | end | |
126 | ||
127 | obsoletes | |
128 | openssl <= %{thisver} | |
129 | end | |
130 | end | |
131 | ||
132 | package %{name}-devel | |
133 | template DEVEL | |
134 | ||
135 | provides | |
136 | openssl-devel = %{thisver} | |
137 | end | |
138 | ||
139 | obsoletes | |
140 | openssl-devel <= %{thisver} | |
141 | end | |
142 | end | |
143 | ||
144 | package %{name}-debuginfo | |
145 | template DEBUGINFO | |
146 | end | |
147 | end |