%define major 5 %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d Summary: An SSL library Name: polarssl Version: 1.3.1 Release: %mkrel 1 License: GPLv2+ Group: System/Libraries URL: http://polarssl.org Source0: http://polarssl.org/code/releases/%{name}-%{version}-gpl.tgz Patch0: polarssl-1.3.0-make_check_fixes.diff BuildRequires: cmake BuildRequires: doxygen BuildRequires: pkcs11-helper-devel BuildRequires: zlib-devel BuildRequires: openssl-devel %description PolarSSL is an SSL library written in ANSI C. PolarSSL makes it easy for developers to include cryptographic and SSL/TLS capabilities in their (embedded) products with as little hassle as possible. It is designed to be readable, documented, tested, loosely coupled and portable. This package contains PolarSSL programs. %package -n %{libname} Summary: PolarSSL library Group: System/Libraries %description -n %{libname} PolarSSL is an SSL library written in ANSI C. PolarSSL makes it easy for developers to include cryptographic and SSL/TLS capabilities in their (embedded) products with as little hassle as possible. It is designed to be readable, documented, tested, loosely coupled and portable. This package contains the library itself. %package -n %{develname} Summary: PolarSSL development files Group: Development/C Requires: %{libname} = %{version} Provides: polarssl-devel = %{version} %description -n %{develname} PolarSSL is an SSL library written in ANSI C. PolarSSL makes it easy for developers to include cryptographic and SSL/TLS capabilities in their (embedded) products with as little hassle as possible. It is designed to be readable, documented, tested, loosely coupled and portable. This package contains development files. %prep %setup -q %patch0 -p0 %build %cmake \ -DUSE_SHARED_POLARSSL_LIBRARY:BOOL=ON \ -DUSE_PKCS11_HELPER_LIBRARY:BOOL=ON %make %make apidoc %check %make check %install %makeinstall_std -C build # prevent possible file clashes pushd %{buildroot}%{_bindir} for i in * ; do mv ${i} polarssl-${i}; done popd %files %doc ChangeLog README* %{_bindir}/polarssl-* %files -n %{libname} %{_libdir}/*.so.%{major}* %{_libdir}/*.so.%{version} %files -n %{develname} %doc apidoc/* %{_libdir}/*.so %{_includedir}/polarssl