mstevens pushed to mbedtls (f21). "Spec file changes to cover Red Hat Enterprise Linux 5 and 6"

notifications at fedoraproject.org notifications at fedoraproject.org
Fri Jun 5 12:01:46 UTC 2015


From 3888f7a24e7a07065c19328760cee71bf8eb4fa9 Mon Sep 17 00:00:00 2001
From: Robert Scheck <robert at fedoraproject.org>
Date: Mon, 1 Jun 2015 17:05:02 +0200
Subject: Spec file changes to cover Red Hat Enterprise Linux 5 and 6


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


	http://pkgs.fedoraproject.org/cgit/mbedtls.git/commit/?h=f21&id=3888f7a24e7a07065c19328760cee71bf8eb4fa9


More information about the scm-commits mailing list