Spec file changes to cover Red Hat Enterprise Linux 5 and 6

epel9
Robert Scheck 10 years ago
parent 59139740dc
commit 3888f7a24e

@ -1,8 +1,10 @@
%if 0%{?fedora} || 0%{?rhel} >= 7
%global _docdir_fmt %{name} %global _docdir_fmt %{name}
%endif
Name: mbedtls Name: mbedtls
Version: 1.3.10 Version: 1.3.10
Release: 1%{?dist} Release: 2%{?dist}
Summary: Light-weight cryptographic and SSL/TLS library Summary: Light-weight cryptographic and SSL/TLS library
Group: System Environment/Libraries Group: System Environment/Libraries
License: GPLv2+ with exceptions License: GPLv2+ with exceptions
@ -13,6 +15,10 @@ BuildRequires: cmake
BuildRequires: doxygen BuildRequires: doxygen
BuildRequires: graphviz BuildRequires: graphviz
%if 0%{?rhel} == 5
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%endif
# replace polarssl with mbedtls # replace polarssl with mbedtls
Obsoletes: polarssl < 1.3.10 Obsoletes: polarssl < 1.3.10
@ -58,7 +64,9 @@ developing applications that use %{name}.
%package doc %package doc
Summary: Documentation files for %{name} Summary: Documentation files for %{name}
Group: Documentation Group: Documentation
%if 0%{?fedora} || 0%{?rhel} >= 6
BuildArch: noarch BuildArch: noarch
%endif
%description doc %description doc
The %{name}-doc package contains documentation. The %{name}-doc package contains documentation.
@ -66,12 +74,20 @@ The %{name}-doc package contains documentation.
%prep %prep
%setup -q %setup -q
%if 0%{?rhel} == 5
sed -e 's/-Wlogical-op//' -i CMakeLists.txt
%endif
%build %build
%cmake -D CMAKE_BUILD_TYPE:String="Release" -D USE_SHARED_MBEDTLS_LIBRARY:BOOL=1 . %cmake -D CMAKE_BUILD_TYPE:String="Release" -D USE_SHARED_MBEDTLS_LIBRARY:BOOL=1 .
make %{?_smp_mflags} all apidoc make %{?_smp_mflags} all apidoc
%install %install
%if 0%{?fedora} || 0%{?rhel} >= 6
%make_install %make_install
%else
make DESTDIR=$RPM_BUILD_ROOT install
%endif
mkdir -p $RPM_BUILD_ROOT%{_libexecdir} mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
mv $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_libexecdir}/mbedtls mv $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_libexecdir}/mbedtls
@ -85,6 +101,7 @@ mv $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_libexecdir}/mbedtls
%files %files
%doc ChangeLog %doc ChangeLog
%{!?_licensedir:%global license %%doc}
%license LICENSE %license LICENSE
%{_libdir}/*.so.* %{_libdir}/*.so.*
@ -102,6 +119,9 @@ mv $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_libexecdir}/mbedtls
%doc apidoc/* %doc apidoc/*
%changelog %changelog
* Mon Jun 01 2015 Robert Scheck <robert@fedoraproject.org> - 1.3.10-2
- Spec file changes to cover Red Hat Enterprise Linux 5 and 6
* Thu May 14 2015 Morten Stevens <mstevens@imt-systems.com> - 1.3.10-1 * Thu May 14 2015 Morten Stevens <mstevens@imt-systems.com> - 1.3.10-1
- Initial Fedora Package - Initial Fedora Package
- Added subpackage for documentation files - Added subpackage for documentation files

Loading…
Cancel
Save