Remove python2 subpackage per RHBZ#1634583.

epel8
Richard Shaw 6 years ago
parent 1ed7a06634
commit e9272eadaa

@ -16,7 +16,6 @@ BuildRequires: doxygen
BuildRequires: boost-devel
BuildRequires: libconfuse-devel
BuildRequires: libusbx-devel
BuildRequires: python2-devel
BuildRequires: python3-devel
BuildRequires: swig
@ -37,19 +36,6 @@ Requires: pkgconfig
Header files and static libraries for libftdi
%package -n python2-libftdi
%{?python_provide:%python_provide python2-libftdi}
# Remove before F30
Provides: %{name}-python = %{version}-%{release}
Provides: %{name}-python%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
Summary: Libftdi library Python binding
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python2-libftdi
Libftdi Python Language bindings.
%package -n python3-libftdi
%{?python_provide:%python_provide python3-libftdi}
Summary: Libftdi library Python 3 binding
@ -88,16 +74,9 @@ sed -i -e 's/GROUP="plugdev"/TAG+="uaccess"/g' packages/99-libftdi.rules
%build
export CMAKE_PREFIX_PATH=/usr
mkdir build-py2
pushd build-py2
%{cmake} -DPython_ADDITIONAL_VERSIONS=%{python2_version} ..
make %{?_smp_mflags}
popd
mkdir build-py3
pushd build-py3
mkdir build-py3 && pushd build-py3
%{cmake} -DPython_ADDITIONAL_VERSIONS=%{python3_version} ..
make %{?_smp_mflags}
%make_build %{?_smp_mflags}
popd
# Fix python sheband lines
@ -105,39 +84,34 @@ find python/examples -type f -exec sed -i '1s=^#!/usr/bin/\(python\|env python\)
%install
# Install python2, since we'll prefer python3 with the second install.
pushd build-py2
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
popd
pushd build-py3
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
%make_install
popd
mkdir -p $RPM_BUILD_ROOT/lib/udev/rules.d/
install -p -m 644 packages/99-libftdi.rules $RPM_BUILD_ROOT/lib/udev/rules.d/69-libftdi.rules
mkdir -p %{buildroot}/lib/udev/rules.d/
install -pm 0644 packages/99-libftdi.rules %{buildroot}/lib/udev/rules.d/69-libftdi.rules
find $RPM_BUILD_ROOT -type f -name "*.la" -delete
find $RPM_BUILD_ROOT -type f -name "*.a" -delete
find %{buildroot} -type f -name "*.la" -delete
find %{buildroot} -type f -name "*.a" -delete
#no man install
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3
install -p -m 644 build-py3/doc/man/man3/*.3 $RPM_BUILD_ROOT%{_mandir}/man3
mkdir -p %{buildroot}%{_mandir}/man3
install -pm 0644 build-py3/doc/man/man3/*.3 %{buildroot}%{_mandir}/man3
# Cleanup examples
rm -f $RPM_BUILD_ROOT/%{_bindir}/simple
rm -f $RPM_BUILD_ROOT/%{_bindir}/bitbang
rm -f $RPM_BUILD_ROOT/%{_bindir}/bitbang2
rm -f $RPM_BUILD_ROOT/%{_bindir}/bitbang_ft2232
rm -f $RPM_BUILD_ROOT/%{_bindir}/bitbang_cbus
rm -f $RPM_BUILD_ROOT/%{_bindir}/find_all
rm -f $RPM_BUILD_ROOT/%{_bindir}/find_all_pp
rm -f $RPM_BUILD_ROOT/%{_bindir}/baud_test
rm -f $RPM_BUILD_ROOT/%{_bindir}/serial_read
rm -f $RPM_BUILD_ROOT/%{_bindir}/serial_test
rm -rf $RPM_BUILD_ROOT/%{_libdir}/cmake*
rm -f %{buildroot}%{_bindir}/simple
rm -f %{buildroot}%{_bindir}/bitbang
rm -f %{buildroot}%{_bindir}/bitbang2
rm -f %{buildroot}%{_bindir}/bitbang_ft2232
rm -f %{buildroot}%{_bindir}/bitbang_cbus
rm -f %{buildroot}%{_bindir}/find_all
rm -f %{buildroot}%{_bindir}/find_all_pp
rm -f %{buildroot}%{_bindir}/baud_test
rm -f %{buildroot}%{_bindir}/serial_read
rm -f %{buildroot}%{_bindir}/serial_test
rm -rf %{buildroot}%{_libdir}/cmake*
rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc/libftdi1/example.conf
rm -rf %{buildroot}%{_datadir}/doc/libftdi1/example.conf
%check
@ -163,9 +137,6 @@ rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc/libftdi1/example.conf
%exclude %{_datadir}/libftdi/examples/*.pyc
%exclude %{_datadir}/libftdi/examples/*.pyo
%files -n python2-libftdi
%{python2_sitearch}/*
%files -n python3-libftdi
%{python3_sitearch}/*

Loading…
Cancel
Save