Drop old python3 conditionals, SPEC cleanups

This commit is contained in:
Peter Robinson 2014-05-29 16:28:59 +01:00
parent 0063eaa5a9
commit cf0572176d

View File

@ -1,29 +1,22 @@
%if 0%{?fedora} > 17
%global python3 1
%endif
Summary: D-Bus Python Bindings Summary: D-Bus Python Bindings
Name: dbus-python Name: dbus-python
Version: 1.2.0 Version: 1.2.0
Release: 2%{?dist} Release: 3%{?dist}
License: MIT License: MIT
URL: http://www.freedesktop.org/software/dbus-python URL: http://www.freedesktop.org/software/dbus-python
Source0: http://dbus.freedesktop.org/releases/dbus-python/%{name}-%{version}.tar.gz Source0: http://dbus.freedesktop.org/releases/dbus-python/%{name}-%{version}.tar.gz
Source1: http://dbus.freedesktop.org/releases/dbus-python/%{name}-%{version}.tar.gz.asc Source1: http://dbus.freedesktop.org/releases/dbus-python/%{name}-%{version}.tar.gz.asc
# autoreconf and friends
BuildRequires: autoconf automake libtool
BuildRequires: dbus-devel BuildRequires: dbus-devel
BuildRequires: dbus-glib-devel BuildRequires: dbus-glib-devel
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: python-docutils BuildRequires: python-docutils
%if 0%{?python3}
BuildRequires: python3-devel BuildRequires: python3-devel
%endif
# for %%check # for %%check
BuildRequires: dbus-x11 pygobject3 BuildRequires: dbus-x11 pygobject3
# autoreconf and friends
BuildRequires: autoconf automake libtool
Provides: python-dbus = %{version}-%{release} Provides: python-dbus = %{version}-%{release}
Provides: python-dbus%{?_isa} = %{version}-%{release} Provides: python-dbus%{?_isa} = %{version}-%{release}
@ -47,66 +40,59 @@ Summary: D-Bus bindings for python3
%prep %prep
%setup -q %setup -q
# For new arches (aarch64/ppc64le)
# refresh autofoo, fix/improve aarch64 support in particular, autoreconf -vif
# which gets missed due to builddir hackery below -- rex
autoreconf -fi
%build %build
%global _configure ../configure %global _configure ../configure
mkdir python2-build; pushd python2-build mkdir python2-build; pushd python2-build
%configure PYTHON=%{__python} %configure PYTHON=python
make %{?_smp_mflags} make %{?_smp_mflags}
popd popd
%if 0%{?python3}
mkdir python3-build; pushd python3-build mkdir python3-build; pushd python3-build
%configure PYTHON=%{__python3} %configure PYTHON=python3
make %{?_smp_mflags} make %{?_smp_mflags}
popd popd
%endif
%install %install
%if 0%{?python3}
make install DESTDIR=$RPM_BUILD_ROOT -C python3-build make install DESTDIR=$RPM_BUILD_ROOT -C python3-build
%endif
make install DESTDIR=$RPM_BUILD_ROOT -C python2-build make install DESTDIR=$RPM_BUILD_ROOT -C python2-build
# unpackaged files # unpackaged files
rm -fv $RPM_BUILD_ROOT%{python_sitearch}/*.la find %{buildroot} -type f -name "*.la" -delete
rm -fv $RPM_BUILD_ROOT%{python3_sitearch}/*.la
rm -rfv $RPM_BUILD_ROOT%{_datadir}/doc/dbus-python/ rm -rfv $RPM_BUILD_ROOT%{_datadir}/doc/dbus-python/
%check %check
make check -k -C python2-build make check -k -C python2-build
%if 0%{?python3}
make check -k -C python3-build make check -k -C python3-build
%endif
%files %files
%doc COPYING ChangeLog README NEWS %doc COPYING NEWS
%{python_sitearch}/*.so %{python_sitearch}/*.so
%{python_sitelib}/dbus/ %{python_sitelib}/dbus/
%files devel %files devel
%doc doc/API_CHANGES.txt doc/HACKING.txt doc/tutorial.txt %doc README ChangeLog doc/API_CHANGES.txt doc/HACKING.txt doc/tutorial.txt
%{_includedir}/dbus-1.0/dbus/dbus-python.h %{_includedir}/dbus-1.0/dbus/dbus-python.h
%{_libdir}/pkgconfig/dbus-python.pc %{_libdir}/pkgconfig/dbus-python.pc
%if 0%{?python3}
%files -n python3-dbus %files -n python3-dbus
%doc COPYING
%{python3_sitearch}/*.so %{python3_sitearch}/*.so
%{python3_sitelib}/dbus/ %{python3_sitelib}/dbus/
%endif
%changelog %changelog
* Thu May 29 2014 Peter Robinson <pbrobinson@fedoraproject.org> 1.2.0-3
- Drop old python3 conditionals, SPEC cleanups
* Mon May 12 2014 Rex Dieter <rdieter@fedoraproject.org> 1.2.0-2 * Mon May 12 2014 Rex Dieter <rdieter@fedoraproject.org> 1.2.0-2
- rebuild (f21-python) - rebuild (f21-python)