fix shebangs for python3 [release 3.20.9-3mamba;Sat Nov 07 2020]

This commit is contained in:
Silvan Calarco 2024-01-05 23:42:58 +01:00
parent 110763678e
commit 24ad627a29

View File

@ -3,7 +3,7 @@
%define cups_ver %(cups-config --api-version) %define cups_ver %(cups-config --api-version)
Name: hplip Name: hplip
Version: 3.20.9 Version: 3.20.9
Release: 1mamba Release: 3mamba
Summary: A printer driver for HP inkjet devices Summary: A printer driver for HP inkjet devices
Group: System/Spooling Group: System/Spooling
Vendor: openmamba Vendor: openmamba
@ -21,39 +21,46 @@ Patch5: hplip-3.19.6-remove-libImageProcessor.patch
License: BSD, LGPL License: BSD, LGPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: ldconfig
BuildRequires: libavahi-devel
BuildRequires: libcups-devel BuildRequires: libcups-devel
BuildRequires: libdbus-devel BuildRequires: libdbus-devel
BuildRequires: libgcc BuildRequires: libgcc
BuildRequires: libjpeg-devel BuildRequires: libjpeg-devel
BuildRequires: liblzma-devel
BuildRequires: libnetsnmp-devel BuildRequires: libnetsnmp-devel
BuildRequires: libnsl-devel
BuildRequires: libopenssl-devel BuildRequires: libopenssl-devel
BuildRequires: libperl BuildRequires: libperl
BuildRequires: libpython-devel BuildRequires: libpython-devel
BuildRequires: libsane-backends-devel BuildRequires: libsane-backends-devel
BuildRequires: libssp-devel
BuildRequires: libstdc++6-devel BuildRequires: libstdc++6-devel
BuildRequires: libusbx-devel BuildRequires: libsystemd-devel
BuildRequires: libudev-devel
BuildRequires: libusb-compat-devel
BuildRequires: libusb-devel
BuildRequires: libxml2-devel
BuildRequires: libz-devel
BuildRequires: perl-devel BuildRequires: perl-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRequires: gcc-fortran >= 4.0.1 BuildRequires: gcc-fortran >= 4.0.1
BuildRequires: libieee1284-devel BuildRequires: libieee1284-devel
BuildRequires: libgphoto-devel BuildRequires: libgphoto-devel
BuildRequires: libavahi-devel
BuildRequires: libssp-devel
BuildRequires: libudev-devel
Obsoletes: hpijs
Requires: cups Requires: cups
Requires: PyQt5-py36 Requires: PyQt5-py3
Requires: python-Pillow-py36 Requires: python-Pillow-py3
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires(pre): libsane-backends >= 1.0.16
%ifarch x86_64
Provides: libImageProcessor.so()(64bit)
Provides: libImageProcessor.so(VERS_1.0)(64bit)
%else
Provides: libImageProcessor.so
Provides: libImageProcessor.so(VERS_1.0)
%endif
Provides: hpijs = %{version} Provides: hpijs = %{version}
Obsoletes: hpijs
Requires(pre): libsane-backends >= 1.0.16
#%ifarch x86_64
#Provides: libImageProcessor.so()(64bit)
#Provides: libImageProcessor.so(VERS_1.0)(64bit)
#%else
#Provides: libImageProcessor.so
#Provides: libImageProcessor.so(VERS_1.0)
#%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
A printer driver for HP inkjet devices. A printer driver for HP inkjet devices.
@ -77,6 +84,8 @@ Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
A printer driver for HP inkjet devices. A printer driver for HP inkjet devices.
This package contains the proprietary plugins needed by some printers. This package contains the proprietary plugins needed by some printers.
%debug_package
%prep %prep
%setup -q %setup -q
#%patch0 -p1 #%patch0 -p1
@ -96,7 +105,7 @@ sh %{SOURCE1} --target hplip-%{version}-plugin --noexec
#replace shebang lines to python3 interpreter (from hplip-install) #replace shebang lines to python3 interpreter (from hplip-install)
PAT1="#!\/usr\/bin\/(env )?python$" PAT1="#!\/usr\/bin\/(env )?python$"
PAT2="#!\/usr\/bin\/env python3\.6" PAT2="#!\/usr\/bin\/env python3"
for pyfile in `find . -maxdepth 1 -name "*.py"`; do for pyfile in `find . -maxdepth 1 -name "*.py"`; do
sed -i -r "0,/$PAT1/s//$PAT2/" $pyfile sed -i -r "0,/$PAT1/s//$PAT2/" $pyfile
done done
@ -119,7 +128,7 @@ autoreconf -f -i
--enable-cups-drv-install \ --enable-cups-drv-install \
--enable-cups-ppd-install \ --enable-cups-ppd-install \
--with-hpppddir=%{_datadir}/cups/model/HP \ --with-hpppddir=%{_datadir}/cups/model/HP \
PYTHON=%{__python36} PYTHON=%{__python3}
# \ # \
# --disable-foomatic_install # --disable-foomatic_install
@ -256,11 +265,11 @@ fi
%{_libdir}/sane/libsane-hpaio.so.* %{_libdir}/sane/libsane-hpaio.so.*
%{_libdir}/sane/libsane-hpaio.so %{_libdir}/sane/libsane-hpaio.so
#%{_libdir}/menu/hplip #%{_libdir}/menu/hplip
%{python36_sitearch}/*.so %{python3_sitearch}/*.so
%{python36_sitearch}/cupsext.la %{python3_sitearch}/cupsext.la
%{python36_sitearch}/hpmudext.la %{python3_sitearch}/hpmudext.la
%{python36_sitearch}/scanext.la %{python3_sitearch}/scanext.la
%{python36_sitearch}/pcardext.la %{python3_sitearch}/pcardext.la
%{_datadir}/applications/hplip.desktop %{_datadir}/applications/hplip.desktop
%{_datadir}/cups/drv/hp/hpijs.drv %{_datadir}/cups/drv/hp/hpijs.drv
%{_datadir}/cups/drv/hp/hpcups.drv %{_datadir}/cups/drv/hp/hpcups.drv
@ -309,6 +318,12 @@ fi
%{_localstatedir}/lib/hp/hplip.state %{_localstatedir}/lib/hp/hplip.state
%changelog %changelog
* Sat Nov 07 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 3.20.9-3mamba
- fix shebangs for python3
* Mon Nov 02 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 3.20.9-2mamba
- rebuilt with python3
* Wed Oct 07 2020 Automatic Build System <autodist@mambasoft.it> 3.20.9-1mamba * Wed Oct 07 2020 Automatic Build System <autodist@mambasoft.it> 3.20.9-1mamba
- automatic version update by autodist - automatic version update by autodist