%global forgeurl https://github.com/OpenPrinting/pappl-retrofit

Version: 1.0b1

%forgemeta

Name:           pappl-retrofit
Release:        1%{?dist}
License:        ASL 2.0
Summary:        Library that allows the conversion of classic CUPS printer drivers into Printer Applications.
URL:	        %{forgeurl}
Source:         %{forgesource}
BuildRequires:	make
BuildRequires:	gcc
BuildRequires:  automake
BuildRequires:  gettext-devel
BuildRequires:  libtool
BuildRequires:  cups-devel >= 2.2.0
BuildRequires:  pkgconfig(libcupsfilters) >= 2.0b2
BuildRequires:  pkgconfig(libppd) >= 2.0b2
BuildRequires:  pam-devel
BuildRequires:  pkgconfig(pappl) >= 1.1b2

%description
This library together with PAPPL and cups-filters 2.x allows to convert classic
CUPS printer drivers into Printer Applications. This way the printer appears as
an emulated IPP printer and one can print on it from practically any operating
system, especially also mobile operating systems and IoT platforms,
without need any client-side driver.

%package devel
Summary: pappl-retrofit - development environment
Requires: %{name}%{?_isa} = %{version}-%{release}

%description devel
This package provides the pappl-retrofit headers and development environment.

%prep
%forgesetup

%build
./autogen.sh

%configure

%make_build

%install
%make_install

# Removal of the static library.
rm -f %{buildroot}/%{_libdir}/libpappl-retrofit.a
rm -f %{buildroot}/%{_libdir}/libpappl-retrofit.la

%files
%license LICENSE NOTICE
%{_libdir}/libpappl-retrofit.so.1
%{_libdir}/libpappl-retrofit.so.1.0.0

%files devel
%{_bindir}/legacy-printer-app
%doc %{_docdir}/pappl-retrofit
%{_includedir}/pappl-retrofit.h
%{_libdir}/libpappl-retrofit.so
%dir %{_datadir}/legacy-printer-app
%{_datadir}/legacy-printer-app/testpage.ps
%{_datadir}/legacy-printer-app/testpage.pdf
%{_libdir}/pkgconfig/libpappl-retrofit.pc

%changelog
* Thu Feb 2 2023 Brandon Nielsen <nielsenb@jetfuse.net> 1.0b1-1
- Update to 1.0b1

* Thu Aug 25 2022 Brandon Nielsen <nielsenb@jetfuse.net> 0-1.20220825git32483ad
- Update to 32483ad git snapshot

* Sun Feb 27 2022 Brandon Nielsen <nielsenb@jetfuse.net> 0-1.20220227gitfe6c189
- Update to fe6c189 git snapshot

* Tue Nov 16 2021 Brandon Nielsen <nielsenb@jetfuse.net> 0-1.20211116git95113dc
- Update to latest git

* Wed Sep 22 2021 Brandon Nielsen <nielsenb@jetfuse.net> 0-1.20210916git59864c0
- Initial specfile