]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - openssl/openssl.nm
kernel: Update to Linux 3.2.
[people/ms/ipfire-3.x.git] / openssl / openssl.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = openssl
7 version = 1.0.0g
8 release = 3
9
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.
15
16 description
17 The OpenSSL toolkit provides support for secure communications between
18 machines. OpenSSL includes a certificate management tool and shared
19 libraries which provide various cryptographic algorithms and protocols.
20 end
21
22 source_dl = http://openssl.org/source/
23
24 build
25 requires
26 bc
27 gnutls-devel
28 perl
29 util-linux
30 zlib-devel
31 end
32
33 prepare_cmds
34 find crypto/ -name Makefile -exec \
35 sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i {} \;
36
37 # Modify the various perl scripts to reference perl in the right location.
38 perl util/perlpath.pl /usr/bin
39
40 # Generate a table with the compile settings for my perusal.
41 touch Makefile
42 make TABLE PERL=/usr/bin/perl
43 end
44
45 # Set default ssl_arch.
46 ssl_arch = linux-%{DISTRO_ARCH}
47
48 if "%{DISTRO_ARCH}" == "i686"
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
55 end
56
57 if "%{DISTRO_ARCH}" == "armv7hl"
58 ssl_arch = linux-generic32
59 end
60
61 build
62 ./Configure \
63 --prefix=/usr \
64 --openssldir=/etc/pki/tls \
65 --enginesdir=%{libdir}/openssl/engines \
66 shared \
67 zlib-dynamic \
68 enable-camellia \
69 enable-md2 \
70 enable-seed \
71 enable-tlsext \
72 enable-rfc3779 \
73 no-idea \
74 no-mdc2 \
75 no-rc5 \
76 no-ec no-ecdh no-ecdsa \
77 -DSSL_FORBID_ENULL \
78 %{ssl_arch}
79
80 # Build.
81 make depend all build-shared RPM_OPT_FLAGS="%{CFLAGS}" #%{PARALLELISMFLAGS}
82
83 # Generate hashes for the included certs.
84 make rehash build-shared
85 end
86
87 test
88 make test
89 end
90
91 install
92 make install build-shared INSTALL_PREFIX=%{BUILDROOT}
93
94 mkdir -pv %{BUILDROOT}/%{lib}
95 mv -vf %{BUILDROOT}%{libdir}/lib{crypto,ssl}.so.* %{BUILDROOT}/%{lib}
96 ln -svf ../../%{lib}/libcrypto.so.10 %{BUILDROOT}%{libdir}/libcrypto.so
97 ln -svf ../../%{lib}/libssl.so.10 %{BUILDROOT}%{libdir}/libssl.so
98
99 # Install manpages do right place
100 mkdir -pv %{BUILDROOT}/usr/share
101 mv -v %{BUILDROOT}/etc/pki/tls/man %{BUILDROOT}/usr/share/
102
103 mkdir -pv %{BUILDROOT}%{libdir}/openssl
104 mv -v %{BUILDROOT}%{libdir}/engines %{BUILDROOT}%{libdir}/openssl
105
106 mkdir -pv %{BUILDROOT}/etc/pki/CA/private
107 chmod -v 700 -R %{BUILDROOT}/etc/pki/CA
108
109 mkdir -pv %{BUILDROOT}/etc/pki/tls
110 install -m 0644 %{DIR_SOURCE}/openssl.cnf %{BUILDROOT}/etc/pki/tls
111 cp -v -r certs %{BUILDROOT}/etc/pki/tls
112
113 # Rename man pages so that they don't conflict with other system man pages.
114 pushd ${BUILDROOT}/usr/share/man
115 for manpage in man*/*; do
116 if [ -L ${manpage} ]; then
117 TARGET=`ls -l ${manpage} | awk '{ print $NF }'`
118 ln -snf ${TARGET}ssl ${manpage}ssl
119 rm -f ${manpage}
120 else
121 mv ${manpage} ${manpage}ssl
122 fi
123 done
124
125 mv -v %{BUILDROOT}/usr/share/man/man1/{,ssl}passwd.1
126 mv -v %{BUILDROOT}/usr/share/man/man1/{,ssl}rand.1
127 popd
128 end
129 end
130
131 packages
132 package %{name}
133
134 package %{name}-libs
135 template LIBS
136
137 requires += ca-certificates
138 end
139
140 package %{name}-devel
141 template DEVEL
142 end
143
144 package %{name}-debuginfo
145 template DEBUGINFO
146 end
147 end