summaryrefslogtreecommitdiff
path: root/packaging/openssl.spec
blob: 6fe472853f58da4dfe1a58b9b06005f09258e081 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
%define _unpackaged_files_terminate_build 0
Release: 1

%define openssldir %{_sysconfdir}/ssl

Summary: Secure Sockets Layer and cryptography libraries and tools
Name: openssl
Version: 1.0.2o
Source0: ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz
License: OpenSSL and Apache-2.0 and BSD-3-Clause
Group: Security/Crypto Libraries
Provides: SSL
URL: http://www.openssl.org/

%description
The OpenSSL Project is a collaborative effort to develop a robust,
commercial-grade, fully featured, and Open Source toolkit implementing the
Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1)
protocols as well as a full-strength general purpose cryptography library.
The project is managed by a worldwide community of volunteers that use the
Internet to communicate, plan, and develop the OpenSSL tookit and its related
documentation.

OpenSSL is based on the excellent SSLeay library developed from Eric A.
Young and Tim J. Hudson.  The OpenSSL toolkit is licensed under an
Apache-style licence, which basically means that you are free to get and
use it for commercial and non-commercial purposes.

This package contains the base OpenSSL cryptography and SSL/TLS
libraries and tools.

%package -n libopenssl
Summary: Secure Sockets Layer and crypto libraries
Group: Security/Crypto Libraries
%description -n libopenssl
Secure Sockets Layer and crypto libraries.

%package -n libopenssl-devel
Summary: Secure Sockets Layer and cryptography static libraries and headers
Group: Development/Libraries
Obsoletes: openssl-devel < %{version}
Requires: %{name} = %{version}-%{release}
Requires: libopenssl = %{version}-%{release}
Requires: zlib-devel
Provides: openssl-devel = %{version}-%{release}
%description -n libopenssl-devel
The OpenSSL Project is a collaborative effort to develop a robust,
commercial-grade, fully featured, and Open Source toolkit implementing the
Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1)
protocols as well as a full-strength general purpose cryptography library.
The project is managed by a worldwide community of volunteers that use the
Internet to communicate, plan, and develop the OpenSSL tookit and its related
documentation.

OpenSSL is based on the excellent SSLeay library developed from Eric A.
Young and Tim J. Hudson.  The OpenSSL toolkit is licensed under an
Apache-style licence, which basically means that you are free to get and
use it for commercial and non-commercial purposes.

This package contains the the OpenSSL cryptography and SSL/TLS
static libraries and header files required when developing applications.

%package doc
Summary: OpenSSL miscellaneous files
Group: Documentation
BuildArch: noarch
%description doc
The OpenSSL Project is a collaborative effort to develop a robust,
commercial-grade, fully featured, and Open Source toolkit implementing the
Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1)
protocols as well as a full-strength general purpose cryptography library.
The project is managed by a worldwide community of volunteers that use the
Internet to communicate, plan, and develop the OpenSSL tookit and its related
documentation.

OpenSSL is based on the excellent SSLeay library developed from Eric A.
Young and Tim J. Hudson.  The OpenSSL toolkit is licensed under an
Apache-style licence, which basically means that you are free to get and
use it for commercial and non-commercial purposes.

This package contains the the OpenSSL cryptography and SSL/TLS extra
documentation and POD files from which the man pages were produced.

%package misc
Summary: Include Files and Libraries mandatory for Development
Group:   Development/Libraries
Requires: %{name} = %{version}-%{release}
%description misc
Additional data files and scripts for %{name}.

%prep

%setup -q

%build

RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -s "s/--param=ssp-buffer-size=32//g")
RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -s "s/-mcpu=cortex-a15.cortex-a7//g")
RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -s "s/-march=armv7ve/-march=armv7-a/g")

CONFIG_FLAGS="--prefix=%_prefix --openssldir=%openssldir --libdir=%_lib \
    threads shared no-idea no-rc5 no-camellia no-asm no-ssl2-method enable-md2 \
    $RPM_OPT_FLAGS -std=gnu99 -fPIC -pie"

BINARY_FORMAT=
%ifarch %{arm}
BINARY_FORMAT=armv4
%endif
%ifarch aarch64
BINARY_FORMAT=aarch64
%endif
%ifarch %{ix86}
BINARY_FORMAT=elf
%endif
%ifarch ppc
BINARY_FORMAT=ppc
%endif
%ifarch alpha
BINARY_FORMAT=alpha
%endif
%ifarch x86_64
BINARY_FORMAT=x86_64
%endif

./Configure $CONFIG_FLAGS linux-$BINARY_FORMAT

LD_LIBRARH_PATH=`pwd` make depend
LD_LIBRARY_PATH=`pwd` make %{?_smp_mflags}

%check
LD_LIBRARY_PATH=`pwd` make test

%install
rm -rf $RPM_BUILD_ROOT
make INSTALL_PREFIX="$RPM_BUILD_ROOT" install_sw

%files -n lib%name
%manifest %name.manifest
%license LICENSE
%license LICENSE.Apache-2.0
%license LICENSE.BSD-3-Clause
%_libdir/libcrypto.so.*
%_libdir/libssl.so.*
%_libdir/engines/*.so

%files -n lib%name-devel
%license LICENSE
%_includedir/%name
%exclude %_libdir/libcrypto.a
%exclude %_libdir/libssl.a
%_libdir/libcrypto.so
%_libdir/libssl.so
%_libdir/pkgconfig/libcrypto.pc
%_libdir/pkgconfig/libssl.pc
%_libdir/pkgconfig/openssl.pc

%files doc
%license LICENSE
%doc CHANGES CHANGES.SSLeay NEWS README

%files
%manifest %name.manifest
%license LICENSE
%_bindir/%name
%openssldir/openssl.cnf

%files misc
%manifest %name.manifest
%license LICENSE
%_bindir/c_rehash
%openssldir/misc

%post -n lib%name
ldconfig

%postun -n lib%name
ldconfig