diff options
-rw-r--r-- | babeltrace.spec | 28 |
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 |