summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Dreyer <ktdreyer@ktdreyer.com>2015-08-06 10:15:36 -0600
committerKen Dreyer <ktdreyer@ktdreyer.com>2015-08-06 10:15:38 -0600
commite5f05b9c42e41ce72cc439aa8a7e95d33737a5c2 (patch)
treebc1164282244c5fea2e09dbd16949043f902e378
parented78fb4d51e013db937f858aec9bf4b1b0a9aa43 (diff)
downloadbabeltrace-e5f05b9c42e41ce72cc439aa8a7e95d33737a5c2.tar.gz
babeltrace-e5f05b9c42e41ce72cc439aa8a7e95d33737a5c2.tar.xz
babeltrace-e5f05b9c42e41ce72cc439aa8a7e95d33737a5c2.zip
support EL7 (rhbz#1235466)epel7
- Add with_python3 macro - Define _pkgdocdir to support EL7
-rw-r--r--babeltrace.spec28
1 files changed, 25 insertions, 3 deletions
diff --git a/babeltrace.spec b/babeltrace.spec
index 66d7ce9..4187cc3 100644
--- a/babeltrace.spec
+++ b/babeltrace.spec
@@ -1,6 +1,10 @@
+%if 0%{?fedora}
+%global with_python3 1
+%endif
+
Name: babeltrace
Version: 1.2.4
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Trace Viewer and Converter, mainly for the Common Trace Format
License: MIT and GPLv2
URL: http://www.efficios.com/babeltrace
@@ -13,12 +17,17 @@ BuildRequires: glib2-devel >= 2.22.0
BuildRequires: libuuid-devel
BuildRequires: libtool >= 2.2, autoconf, automake
BuildRequires: popt-devel >= 1.13
-BuildRequires: python3-devel
BuildRequires: swig >= 2.0
+%if 0%{?with_python3}
+BuildRequires: python3-devel
# For check
BuildRequires: perl-Test-Harness
+%endif
Requires: lib%{name}%{?_isa} = %{version}-%{release}
+# Define newer macro that is missing in RHEL 7:
+%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
+
%description
This project provides trace read and write libraries, as well as a trace
converter. A plugin can be created for any trace format to allow its conversion
@@ -49,6 +58,7 @@ converter. A plugin can be created for any trace format to allow its conversion
to/from another trace format.
+%if 0%{?with_python3}
%package -n python3-%{name}
Summary: Common Trace Format Babel Tower
Group: Development/Libraries
@@ -58,6 +68,7 @@ Requires: lib%{name}%{?_isa} = %{version}-%{release}
This project provides trace read and write libraries, as well as a trace
converter. A plugin can be created for any trace format to allow its conversion
to/from another trace format.
+%endif
%prep
@@ -67,8 +78,13 @@ to/from another trace format.
#Re-run libtoolize and autoreconf to remove rpath
libtoolize --force --copy
autoreconf -v --install --force
+%if 0%{?with_python3}
export PYTHON=%{__python3}
-%configure --disable-static --enable-python-bindings
+%endif
+%configure --disable-static --docdir=%{_pkgdocdir} \
+%if 0%{?_with_python3}
+--enable-python-bindings
+%endif
make %{?_smp_mflags} V=1
@@ -107,13 +123,19 @@ rm -f %{buildroot}/%{_pkgdocdir}/std-ext-lib.txt
%{_libdir}/pkgconfig/babeltrace.pc
%{_libdir}/pkgconfig/babeltrace-ctf.pc
+%if 0%{?_with_python3}
%files -n python3-%{name}
%{python3_sitelib}/babeltrace.py
%{python3_sitelib}/__pycache__/*
%{python3_sitearch}/
+%endif
%changelog
+* Thu Aug 06 2015 Ken Dreyer <ktdreyer@ktdreyer.com> - 1.2.4-3
+- Add with_python3 macro to support EL7 (rhbz#1235466)
+- Define _pkgdocdir to support EL7 (rhbz#1235466)
+
* Tue Jul 28 2015 Michael Jeanson <mjeanson@gmail.com> - 1.2.4-2
- Added python3 bindings module