File libinklevel.spec of Package libinklevel

#
# spec file for package libinklevel
#
# Copyright (c) 2025 SUSE LLC and contributors
# Copyright (c) 2011 philipp thomas
# Copyright (c) 2024 Andreas Stieger <Andreas.Stieger@gmx.de>
#
# 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/
#


%define so_major 5
Name:           libinklevel
Version:        0.9.7
Release:        0
Summary:        Retrieve ink level information
License:        GPL-2.0-only
Group:          Development/Libraries/C and C++
URL:            https://libinklevel.sourceforge.net
Source:         http://downloads.sourceforge.net/libinklevel/%{name}-%{version}.tar.gz
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(libusb-1.0) >= 1.0.22
BuildRequires:  pkgconfig(libxml-2.0)

%description
Libinklevel is a library to check the ink level of ink jet printers
connected via USB. Canon BJNP network printers are supported too.

%package     -n libinklevel%{so_major}
Summary:        Libinklevel runtime library
Group:          System/Libraries

%description -n libinklevel%{so_major}
This package contains the runtime library needed by programs using libinklevel.

%package        devel
Summary:        Development kit for libinklevel
Group:          Development/Libraries/C and C++
Requires:       libinklevel%{so_major} = %{version}

%description  devel
This package contains all that is needed to compile applications
using libinklevel.

%prep
%autosetup -p1

%build
%configure \
	--disable-static \
	--docdir=%{_docdir}/%{name} \
	%{nil}
%make_build

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print

%check
%make_build check

%ldconfig_scriptlets -n libinklevel%{so_major}

%files -n libinklevel%{so_major}
%license COPYING
%doc NEWS README ChangeLog AUTHORS
%{_docdir}/%{name}
%{_libdir}/%{name}.so.*

%files devel
%license COPYING
%{_libdir}/%{name}.so
%{_includedir}/inklevel.h

%changelog
openSUSE Build Service is sponsored by