File deepin-pdfium.spec of Package deepin-pdfium
#
# spec file for package deepin-pdfium
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2023 Hillwood Yang <hillwood@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/
#
%define sover 1
Name: deepin-pdfium
Version: 1.5.1
Release: 0
Summary: Development library for pdf on Deepin
License: LGPL-3.0-or-later
Group: System/GUI/Other
URL: https://github.com/linuxdeepin/deepin-pdfium
Source0: https://github.com/linuxdeepin/deepin-pdfium/archive/%{version}/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTEAM workaround-gcc15-errors.patch hillwood@opensuse.org - include <cstdint> to resolve uint8_t missing in GCC 15
# https://github.com/linuxdeepin/deepin-pdfium/pull/15
Patch0: workaround-gcc15-errors.patch
BuildRequires: pkgconfig(chardet)
BuildRequires: pkgconfig(lcms2)
BuildRequires: pkgconfig(icu-i18n)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(libopenjp2)
BuildRequires: pkgconfig(libjpeg)
BuildRequires: pkgconfig(Qt6Core)
BuildRequires: pkgconfig(Qt6Gui)
BuildRequires: pkgconfig(libpng)
%if 0%{?suse_version} < 1600
BuildRequires: gcc13-c++
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Development Library For Pdf On Deepin.
%package -n lib%{name}%{sover}
Summary: Deepin pdfium libraries
Group: System/Libraries
%description -n lib%{name}%{sover}
Development library for pdf on Deepin.
%package devel
Summary: Development library for pdf on Deepin
Group: Development/Languages/C and C++
Requires: lib%{name}%{sover} = %{version}
%description devel
Development Library For Pdf On Deepin.
%prep
%autosetup -p1
%build
%if 0%{?suse_version} < 1600
export CXX=g++-13
%endif
%cmake
%cmake_build
%install
%cmake_install
chmod -x %{buildroot}%{_includedir}/%{name}/*.h
%post -n lib%{name}%{sover} -p /sbin/ldconfig
%postun -n lib%{name}%{sover} -p /sbin/ldconfig
%files -n lib%{name}%{sover}
%{_libdir}/lib%{name}.so.*
%files devel
%license LICENSE
%{_includedir}/%{name}
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/cmake/%{name}
%changelog