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