File cups-bjnp.spec of Package cups-bjnp
#
# spec file for package cups-bjnp
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2022 Tejas Guruswamy <tejas.guruswamy@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: cups-bjnp
Version: 2.0.3
Release: 0
Summary: BJNP network protocol CUPS backend for Canon printers
License: GPL-2.0-or-later
Group: Hardware/Printing
URL: https://sourceforge.net/projects/cups-bjnp/
Source0: http://downloads.sourceforge.net/project/cups-bjnp/cups-bjnp/%{version}/cups-bjnp-%{version}.tar.gz
Source1: canonmx700.ppd
Source2: SuSEfirewall.bjnp
BuildRequires: cups
BuildRequires: cups-devel
BuildRequires: xorg-x11-util-devel
Requires: cnijfilter-common
Recommends: cnijfilter-mp520series
%description
This package contains a backend for CUPS for Canon printers using the proprietary BJNP network protocol.
%prep
%setup -q
%build
%if 0%{?suse_version} > 1500
%configure --disable-static --with-cupsbackenddir=%{_prefix}/lib/cups/backend --disable-Werror
%else
%configure --disable-static --with-cupsbackenddir=%{_libexecdir}/cups/backend --disable-Werror
%endif
%make_build
%install
%make_install BUILDROOT=%{buildroot} LIBDIR=%{_libdir}
install -D -m 644 %{SOURCE1} %{buildroot}%{_datadir}/cups/model/canonmx700.ppd
%if 0%{?suse_version} == 1500
install -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/bjnp
%endif
%files
%license COPYING
%doc AUTHORS ChangeLog TODO README NEWS
%if 0%{?suse_version} > 1500
%{_prefix}/lib/cups/backend/bjnp
%else
%{_libexecdir}/cups/backend/bjnp
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/bjnp
%endif
%{_datadir}/cups/model/canonmx700.ppd
%changelog