File capypdf.spec of Package capypdf

#
# spec file for package inkscape
#
# Copyright (c) 2025 mantarimay
#
# 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/
#


%global apiver 0
Name:           capypdf
Version:        0.16.0
Release:        0
Summary:        Fully color-managed PDF generation library
License:        Apache-2.0
URL:            https://github.com/jpakkane/capypdf
Source0:        %{url}/releases/download/%{version}/%{name}-%{version}.tar.xz
BuildRequires:  gcc-c++
BuildRequires:  meson
BuildRequires:  pkgconfig
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module wheel}
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(lcms2)
BuildRequires:  pkgconfig(libjpeg)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(libtiff-4)
BuildRequires:  pkgconfig(zlib)
#define python_subpackage_only 1
#python_subpackages

%description
This is a library for generating PDF files. It aims to be very low level.
It does not have its own document model, it merely exposes PDF primitives
directly.

%package -n libcapypdf-%{apiver}
Summary:        Fully color-managed PDF generation library

%description -n libcapypdf-%{apiver}
This is a library for generating PDF files. It aims to be very low level.
It does not have its own document model, it merely exposes PDF primitives
directly.

%package devel
Summary:        Development files for %{name}
Requires:       libcapypdf-%{apiver} = %{version}

%description devel
This package provides the files for building applications that use
%{name}.

%package -n python-%{name}
Summary:        Python 3 module for %{name}
Requires:       python3
Requires:       libcapypdf-%{apiver} = %{version}
BuildArch:      noarch

%description -n python-%{name}
This package provides the files for building applications that use
%{name}.

%prep
%autosetup -p1 

%build
%meson
%meson_build

%install
%meson_install

%ldconfig_scriptlets -n libcapypdf-%{apiver}

%files -n libcapypdf-%{apiver}
%license COPYING
%doc readme.md
%{_libdir}/lib%{name}.so.%{apiver}
%{_libdir}/lib%{name}.so.0.18.99

%files devel
%{_includedir}/%{name}-%{apiver}/
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc

#files #{python_files capypdf}
%files -n python-%{name}
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by