3888f7a
%if 0%{?fedora} || 0%{?rhel} >= 7
5913974
%global _docdir_fmt %{name}
3888f7a
%endif
5913974
5913974
Name: mbedtls
502fe3b
Version: 2.4.2
5e7b557
Release: 1%{?dist}
5913974
Summary: Light-weight cryptographic and SSL/TLS library
5913974
Group: System Environment/Libraries
c3fcb73
License: ASL 2.0
5913974
URL: https://tls.mbed.org/
c3fcb73
Source0: https://tls.mbed.org/download/%{name}-%{version}-apache.tgz
5913974
5913974
BuildRequires: cmake
61f14d6
BuildRequires: perl
5913974
BuildRequires: doxygen
5913974
BuildRequires: graphviz
5913974
3888f7a
%if 0%{?rhel} == 5
3888f7a
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
3888f7a
%endif
3888f7a
5913974
# replace polarssl with mbedtls
5913974
5913974
Obsoletes: polarssl < 1.3.10
5913974
Provides:  polarssl = %{version}-%{release}
5913974
5913974
%description
5913974
Mbed TLS is a light-weight open source cryptographic and SSL/TLS
5913974
library written in C. Mbed TLS makes it easy for developers to include
5913974
cryptographic and SSL/TLS capabilities in their (embedded)
5913974
applications with as little hassle as possible.
5913974
FOSS License Exception: https://tls.mbed.org/foss-license-exception
5913974
5913974
%package        utils
5913974
Summary:        Utilities for %{name}
5913974
Group:          Applications/System
5913974
Requires:       %{name}%{?_isa} = %{version}-%{release}
5913974
Obsoletes:      polarssl-utils < 1.3.10
5913974
Provides:       polarssl-utils = %{version}-%{release}
5913974
5913974
%description    utils
5913974
Cryptographic utilities based on %{name}. 
5913974
5913974
%package        devel
5913974
Summary:        Development files for %{name}
5913974
Group:          Development/Libraries
5913974
Requires:       %{name}%{?_isa} = %{version}-%{release}
5913974
Obsoletes:      polarssl-devel < 1.3.10
5913974
Provides:       polarssl-devel = %{version}-%{release}
5913974
5913974
%description    devel
5913974
The %{name}-devel package contains libraries and header files for
5913974
developing applications that use %{name}.
5913974
5913974
%package        static
5913974
Summary:        Static files for %{name}
5913974
Group:          Development/Libraries
5913974
Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
5913974
5913974
%description    static
5913974
The %{name}-static package contains static files for
5913974
developing applications that use %{name}.
5913974
5913974
%package        doc
5913974
Summary:        Documentation files for %{name}
5913974
Group:          Documentation
3888f7a
%if 0%{?fedora} || 0%{?rhel} >= 6
5913974
BuildArch:      noarch
3888f7a
%endif
5913974
5913974
%description    doc
5913974
The %{name}-doc package contains documentation.
5913974
5913974
%prep
5913974
%setup -q
5913974
2b6ac5f
%build
2b6ac5f
%cmake -D CMAKE_BUILD_TYPE:String="Release" -D USE_SHARED_MBEDTLS_LIBRARY:BOOL=1 .
2b6ac5f
3888f7a
%if 0%{?rhel} == 5
2b6ac5f
sed -e 's/libmbedtls.so$/libmbedtls.so.%{version}/' -i tests/CMakeFiles/test_suite_*.dir/build.make
3888f7a
%endif
3888f7a
5913974
make %{?_smp_mflags} all apidoc
5913974
5913974
%install
3888f7a
%if 0%{?fedora} || 0%{?rhel} >= 6
5913974
%make_install
3888f7a
%else
3888f7a
make DESTDIR=$RPM_BUILD_ROOT install
3888f7a
%endif
5913974
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
5913974
mv $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_libexecdir}/mbedtls
5913974
5e7b557
%check
5e7b557
LD_LIBRARY_PATH=$PWD/library ctest --output-on-failure -V
5913974
5913974
%post -p /sbin/ldconfig
5913974
5913974
%postun -p /sbin/ldconfig
5913974
5913974
%files
5913974
%doc ChangeLog
3888f7a
%{!?_licensedir:%global license %%doc}
5913974
%license LICENSE
5913974
%{_libdir}/*.so.*
5913974
5913974
%files utils
5913974
%{_libexecdir}/%{name}/
5913974
5913974
%files devel
c3fcb73
%{_includedir}/mbedtls/
5913974
%{_libdir}/*.so
5913974
5913974
%files static
5913974
%{_libdir}/*.a
5913974
5913974
%files doc
5913974
%doc apidoc/*
5913974
5913974
%changelog
502fe3b
* Sat Mar 11 2017 Morten Stevens <mstevens@fedoraproject.org> - 2.4.2-1
502fe3b
- Update to 2.4.2
502fe3b
61f14d6
* Mon Oct 31 2016 Morten Stevens <mstevens@fedoraproject.org> - 2.4.0-1
61f14d6
- Update to 2.4.0
61f14d6
2b6ac5f
* Thu Jun 30 2016 Morten Stevens <mstevens@fedoraproject.org> - 2.3.0-1
2b6ac5f
- Update to 2.3.0
2b6ac5f
2b6ac5f
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-2
2b6ac5f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
2b6ac5f
dea19d2
* Sat Jan 09 2016 Morten Stevens <mstevens@fedoraproject.org> - 2.2.1-1
dea19d2
- Update to 2.2.1
dea19d2
2b6ac5f
* Sun Dec 27 2015 Morten Stevens <mstevens@fedoraproject.org> - 2.2.0-1
c3fcb73
- Update to 2.2.0
c3fcb73
2b6ac5f
* Mon Oct 12 2015 Morten Stevens <mstevens@fedoraproject.org> - 2.1.2-1
2b6ac5f
- Update to 2.1.2
1694107
- CVE-2015-5291
1694107
2b6ac5f
* Fri Sep 11 2015 Morten Stevens <mstevens@fedoraproject.org> - 2.1.0-1
2b6ac5f
- Update to 2.1.0
2b6ac5f
2b6ac5f
* Wed Jul 22 2015 Morten Stevens <mstevens@fedoraproject.org> - 2.0.0-1
2b6ac5f
- Update to 2.0.0
2b6ac5f
2b6ac5f
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.11-2
2b6ac5f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
2b6ac5f
dea19d2
* Fri Jun 05 2015 Morten Stevens <mstevens@fedoraproject.org> - 1.3.11-1
5e7b557
- Update to 1.3.11
5e7b557
3888f7a
* Mon Jun 01 2015 Robert Scheck <robert@fedoraproject.org> - 1.3.10-2
3888f7a
- Spec file changes to cover Red Hat Enterprise Linux 5 and 6
3888f7a
dea19d2
* Thu May 14 2015 Morten Stevens <mstevens@fedoraproject.org> - 1.3.10-1
5913974
- Initial Fedora Package
5913974
- Added subpackage for documentation files
5913974
- Added subpackage for static files