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