]>
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 |
5416a00f | 7 | version = 1.0.0e |
76e1849a | 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 | |
802ea3af MT |
45 | if "%{DISTRO_ARCH}" == "i686" |
46 | SSL_ARCH = no-asm 386 # 386 implies no-sse2 | |
47 | end | |
93c1e71e | 48 | |
802ea3af | 49 | build |
93c1e71e MT |
50 | ./Configure \ |
51 | --prefix=/usr \ | |
52 | --openssldir=/etc/pki/tls \ | |
53 | --enginesdir=/usr/lib/openssl/engines \ | |
802ea3af | 54 | linux-elf \ |
93c1e71e MT |
55 | shared \ |
56 | zlib-dynamic \ | |
57 | enable-camellia \ | |
9ceab1e7 | 58 | enable-md2 \ |
93c1e71e MT |
59 | enable-seed \ |
60 | enable-tlsext \ | |
61 | enable-rfc3779 \ | |
62 | no-idea \ | |
63 | no-mdc2 \ | |
64 | no-rc5 \ | |
802ea3af MT |
65 | -DSSL_FORBID_ENULL \ |
66 | %{SSL_ARCH} | |
67 | ||
68 | # Build. | |
69 | make depend all build-shared RPM_OPT_FLAGS="%{CFLAGS}" #%{PARALLELISMFLAGS} | |
93c1e71e | 70 | |
802ea3af MT |
71 | # Generate hashes for the included certs. |
72 | make rehash build-shared | |
73 | end | |
93c1e71e | 74 | |
802ea3af MT |
75 | test |
76 | make test | |
77 | end | |
93c1e71e | 78 | |
802ea3af MT |
79 | install |
80 | make install build-shared INSTALL_PREFIX=%{BUILDROOT} | |
80032003 | 81 | |
802ea3af MT |
82 | mkdir -pv %{BUILDROOT}/lib |
83 | mv -vf %{BUILDROOT}/usr/lib/lib{crypto,ssl}.so.* %{BUILDROOT}/lib | |
84 | ln -svf ../../lib/libcrypto.so.10 %{BUILDROOT}/usr/lib/libcrypto.so | |
85 | ln -svf ../../lib/libssl.so.10 %{BUILDROOT}/usr/lib/libssl.so | |
93c1e71e | 86 | |
802ea3af MT |
87 | # Install manpages do right place |
88 | mkdir -pv %{BUILDROOT}/usr/share | |
89 | mv -v %{BUILDROOT}/etc/pki/tls/man %{BUILDROOT}/usr/share/ | |
55495f4d | 90 | |
802ea3af MT |
91 | mkdir -pv %{BUILDROOT}/usr/lib/openssl |
92 | mv -v %{BUILDROOT}/usr/lib/engines %{BUILDROOT}/usr/lib/openssl | |
68d15d21 | 93 | |
802ea3af MT |
94 | mkdir -pv %{BUILDROOT}/etc/pki/CA/private |
95 | chmod -v 700 -R %{BUILDROOT}/etc/pki/CA | |
93c1e71e | 96 | |
802ea3af MT |
97 | mkdir -pv %{BUILDROOT}/etc/pki/tls |
98 | install -m 0644 %{DIR_SOURCE}/openssl.cnf %{BUILDROOT}/etc/pki/tls | |
99 | cp -v -r certs %{BUILDROOT}/etc/pki/tls | |
76e1849a MT |
100 | |
101 | # Rename man pages so that they don't conflict with other system man pages. | |
102 | pushd ${BUILDROOT}/usr/share/man | |
103 | for manpage in man*/*; do | |
104 | if [ -L ${manpage} ]; then | |
105 | TARGET=`ls -l ${manpage} | awk '{ print $NF }'` | |
106 | ln -snf ${TARGET}ssl ${manpage}ssl | |
107 | rm -f ${manpage} | |
108 | else | |
109 | mv ${manpage} ${manpage}ssl | |
110 | fi | |
111 | done | |
112 | ||
113 | mv -v %{BUILDROOT}/usr/share/man/man1/{,ssl}passwd.1 | |
114 | mv -v %{BUILDROOT}/usr/share/man/man1/{,ssl}rand.1 | |
115 | popd | |
802ea3af MT |
116 | end |
117 | end | |
93c1e71e | 118 | |
802ea3af MT |
119 | packages |
120 | package %{name} | |
93c1e71e | 121 | |
802ea3af MT |
122 | package %{name}-devel |
123 | template DEVEL | |
124 | end | |
125 | end |