python-cups/python-cups.spec
lixinhong fb714ab529 *Driverless utilities are generic tools for driverless support, which generate 'drivers' based on communication with a device, so it is not usable to try to generate rpm tags for specific models.
*Creating generic ```postscriptdriver(driverless)``` doesn't make sense too, because utilities are shipped within core printing packages (CUPS/cups-filters), so just ignore postscriptdriver tag creation for them.

Signed-off-by: lixinhong <lixinhong@xfusion.com>
2023-04-24 10:07:45 +08:00

65 lines
1.8 KiB
RPMSpec

Name: python-cups
Version: 2.0.1
Release: 2
Summary: Python bindings for CUPS
License: GPLv2+
URL: http://cyberelk.net/tim/software/pycups/
Source0: https://github.com/OpenPrinting/pycups/archive/refs/tags/v2.0.1.tar.gz
Patch0: 0001-postscriptdriver.prov-ignore-driverless-utilities.patch
BuildRequires: cups-devel python3-devel gcc
%description
This package can be known as pycups, which provides Python bindings for CUPS API.
%package -n python3-cups
Summary: Python3 bindings for CUPS API, known as pycups
%description -n python3-cups
This package can be known as pycups, which provides Python 3 bindings for CUPS API.
%package help
Summary: Help documentation for python-cups
Provides: python-cups-doc = %{version}-%{release}
Obsoletes: python-cups-doc < %{version}-%{release}
%description help
Man pages and other related help documents for python-cups.
%prep
%autosetup -n pycups-%{version} -p1
sed -i '/^#!\/usr\/bin\/python/d' examples/cupstree.py
%build
%py3_build
%install
make install-rpmhook DESTDIR="%{buildroot}"
%py3_install
export PYTHONPATH=%{buildroot}%{python3_sitearch}
pydoc3 -w cups
mkdir html
mv cups.html html
%files -n python3-cups
%doc README NEWS TODO COPYING
%{python3_sitearch}/{cups.cpython-3*.so,pycups*.egg-info}
%{_rpmconfigdir}/fileattrs/psdriver.attr
%{_rpmconfigdir}/postscriptdriver.prov
%files help
%doc examples html
%changelog
* Mon Apr 24 2023 lixinhong <lixinhong@xfusion.com> - 2.0.1-2
- postscriptdriver.prov: ignore driverless utilities
* Fri Jun 17 2022 houyingchao <houyingchao@h-partners.com> - 2.0.1-1
- Upgrade to version 2.0.1
* Mon May 31 2021 huanghaitao <huanghaitao8@huawei.com> - 1.9.72-24
- Completing build dependencies
* Tue Nov 26 2019 wangzhishun <wangzhishun1@huawei.com> - 1.9.72-23
- Package init