%global forgeurl https://github.com/OpenPrinting/libppd

Version: 2.0b2

%forgemeta

# we build CUPS also with relro
%global _hardened_build 1

Summary: Support libraries for legacy PPD files
Name:    libppd
Release: 1%{?dist}
License: Apache-2.0
Url:     https://github.com/OpenPrinting/libppd
Source0: %{forgesource}
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: git-core
BuildRequires: make

BuildRequires: cups-devel
BuildRequires: ghostscript
BuildRequires: pkgconfig(libcupsfilters) = %{version}-%{release}
BuildRequires: mupdf-devel
BuildRequires: poppler-utils

Requires: ghostscript
Requires: poppler-utils

%package devel
Summary: Headers for libppd
License: Apache-2.0

%description
libppd provides legacy support library for PPD files, which is by 95 % code overtaken from CUPS 2.x.

%description devel
Development pacakge for the libppd library.

%prep
%forgesetup

%build
%configure
%make_build

%install
%make_install

# Remove the static library
rm -f %{buildroot}%{_libdir}/libppd.a

# Don't ship libtool la files.
rm -f %{buildroot}%{_libdir}/lib*.la

%files
%license %{_docdir}/libppd/COPYING
%doc %{_docdir}/libppd/ABOUT-NLS
%doc %{_docdir}/libppd/AUTHORS
%doc %{_docdir}/libppd/CHANGES-1.x.md
%doc %{_docdir}/libppd/CHANGES.md
%doc %{_docdir}/libppd/CONTRIBUTING.md
%doc %{_docdir}/libppd/DEVELOPING.md
%doc %{_docdir}/libppd/INSTALL
%doc %{_docdir}/libppd/NOTICE
%doc %{_docdir}/libppd/README.md
%{_libdir}/libppd.so.2
%{_libdir}/libppd.so.2.0.0

%files devel
%{_includedir}/ppd
%{_datadir}/ppdc
%{_libdir}/libppd.so
%{_libdir}/pkgconfig/libppd.pc

%changelog
* Tue Jan 31 2023 Brandon Nielsen <nielsenb@jetfuse.net> 2.0b2-1
- Initial specfile