]>
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 |
3c4cf2d0 MT |
7 | version = 1.0.1h |
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 \ |
3c4cf2d0 | 85 | %{ssl_arch} |
802ea3af MT |
86 | |
87 | # Build. | |
32c2735c MT |
88 | make depend |
89 | make all | |
93c1e71e | 90 | |
802ea3af | 91 | # Generate hashes for the included certs. |
32c2735c | 92 | make rehash |
802ea3af | 93 | end |
93c1e71e | 94 | |
802ea3af | 95 | test |
0595faf5 MT |
96 | # Revert ca-dir patch. Otherwise the tests will fail. |
97 | patch -Np1 -R < %{DIR_PATCHES}/openssl-1.0.0-beta4-ca-dir.patch | |
98 | ||
802ea3af MT |
99 | make test |
100 | end | |
93c1e71e | 101 | |
802ea3af MT |
102 | install |
103 | make install build-shared INSTALL_PREFIX=%{BUILDROOT} | |
80032003 | 104 | |
802ea3af MT |
105 | # Install manpages do right place |
106 | mkdir -pv %{BUILDROOT}/usr/share | |
107 | mv -v %{BUILDROOT}/etc/pki/tls/man %{BUILDROOT}/usr/share/ | |
55495f4d | 108 | |
64787ed5 MT |
109 | mkdir -pv %{BUILDROOT}%{libdir}/openssl |
110 | mv -v %{BUILDROOT}%{libdir}/engines %{BUILDROOT}%{libdir}/openssl | |
68d15d21 | 111 | |
802ea3af MT |
112 | mkdir -pv %{BUILDROOT}/etc/pki/CA/private |
113 | chmod -v 700 -R %{BUILDROOT}/etc/pki/CA | |
93c1e71e | 114 | |
802ea3af MT |
115 | mkdir -pv %{BUILDROOT}/etc/pki/tls |
116 | install -m 0644 %{DIR_SOURCE}/openssl.cnf %{BUILDROOT}/etc/pki/tls | |
117 | cp -v -r certs %{BUILDROOT}/etc/pki/tls | |
76e1849a MT |
118 | |
119 | # Rename man pages so that they don't conflict with other system man pages. | |
85ff1622 | 120 | pushd %{BUILDROOT}%{mandir} |
76e1849a MT |
121 | for manpage in man*/*; do |
122 | if [ -L ${manpage} ]; then | |
123 | TARGET=`ls -l ${manpage} | awk '{ print $NF }'` | |
124 | ln -snf ${TARGET}ssl ${manpage}ssl | |
125 | rm -f ${manpage} | |
126 | else | |
127 | mv ${manpage} ${manpage}ssl | |
128 | fi | |
129 | done | |
76e1849a | 130 | popd |
802ea3af MT |
131 | end |
132 | end | |
93c1e71e | 133 | |
802ea3af MT |
134 | packages |
135 | package %{name} | |
3c4cf2d0 MT |
136 | requires += %{name}-libs = %{thisver} |
137 | end | |
93c1e71e | 138 | |
ed1f6221 SS |
139 | package %{name}-libs |
140 | template LIBS | |
141 | ||
142 | requires += ca-certificates | |
0595faf5 | 143 | |
3c4cf2d0 MT |
144 | conflicts += %{name} < %{thisver} |
145 | ||
85ff1622 | 146 | files += %{libdir}/openssl |
ed1f6221 SS |
147 | end |
148 | ||
802ea3af MT |
149 | package %{name}-devel |
150 | template DEVEL | |
151 | end | |
1f9bc2f0 MT |
152 | |
153 | package %{name}-debuginfo | |
154 | template DEBUGINFO | |
155 | end | |
802ea3af | 156 | end |