68b3c6
Name: pnm2ppa
68b3c6
Summary: Drivers for printing to HP PPA printers
68b3c6
Epoch: 1
68b3c6
Version: 1.04
68b3c6
Release: 52%{?dist}
68b3c6
URL: http://sourceforge.net/projects/pnm2ppa 
68b3c6
Source: http://download.sourceforge.net/pnm2ppa/pnm2ppa-%{version}.tar.gz
68b3c6
# Following sourcelink is dead currently.
68b3c6
Source1: http://www.httptech.com/ppa/files/ppa-0.8.6.tar.gz
68b3c6
# Upstream sync.
68b3c6
Patch2: pbm2ppa-20000205.diff
68b3c6
# Use RPM_OPT_FLAGS.
68b3c6
Patch3: pnm2ppa-redhat.patch
68b3c6
# Don't return a local variable out of scope (bug #704568).
68b3c6
Patch4: pnm2ppa-coverity-return-local.patch
68b3c6
# add ldflags to Makefile
68b3c6
Patch5: pnm2ppa-ldflags.patch
68b3c6
# FTBFS with GCC 10
68b3c6
Patch6: pnm2ppa-gcc10.patch
68b3c6
# fix argument reading for non x86_64 archs - use int instead of char
68b3c6
Patch7: pnm2ppa-optargs-read.patch
68b3c6
License: GPLv2+
68b3c6
68b3c6
# gcc is no longer in buildroot by default
68b3c6
BuildRequires: gcc
68b3c6
# uses make
68b3c6
BuildRequires: make
68b3c6
68b3c6
# foomatic is needed for using the filters in CUPS
68b3c6
Requires: foomatic
68b3c6
68b3c6
%description
68b3c6
Pnm2ppa is a color driver for HP PPA host-based printers such as the
68b3c6
HP710C, 712C, 720C, 722C, 820Cse, 820Cxi, 1000Cse, and 1000Cxi.
68b3c6
Pnm2ppa accepts Ghostscript output in PPM format and sends it to the
68b3c6
printer in PPA format.
68b3c6
68b3c6
Install pnm2ppa if you need to print to a PPA printer.
68b3c6
68b3c6
%prep
68b3c6
%setup -q
68b3c6
68b3c6
#pbm2ppa source
68b3c6
%setup -q -T -D -a 1 
68b3c6
%patch2 -p0 -b .20000205
68b3c6
%patch3 -p1 -b .rh
68b3c6
%patch4 -p1 -b .coverity-return-local
68b3c6
%patch5 -p1 -b .ldflags
68b3c6
%patch6 -p1 -b .gcc10
68b3c6
%patch7 -p1 -b .optargs-read
68b3c6
68b3c6
for file in docs/en/LICENSE pbm2ppa-0.8.6/LICENSE; do
68b3c6
 sed "s|\r||g" $file > $file.new && \
68b3c6
 touch -r $file $file.new && \
68b3c6
 mv $file.new $file
68b3c6
done
68b3c6
68b3c6
%build
68b3c6
# set redhat build flags
68b3c6
%set_build_flags
68b3c6
%make_build
68b3c6
pushd pbm2ppa-0.8.6
68b3c6
%make_build
68b3c6
popd
68b3c6
68b3c6
68b3c6
%install
68b3c6
install -d $RPM_BUILD_ROOT%{_bindir}
68b3c6
install -d $RPM_BUILD_ROOT%{_sysconfdir}
68b3c6
install -d $RPM_BUILD_ROOT%{_mandir}/man1
68b3c6
make INSTALLDIR=$RPM_BUILD_ROOT%{_bindir} CONFDIR=$RPM_BUILD_ROOT%{_sysconfdir} \
68b3c6
    MANDIR=$RPM_BUILD_ROOT%{_mandir}/man1 install 
68b3c6
install -p -m 0755 utils/Linux/detect_ppa $RPM_BUILD_ROOT%{_bindir}
68b3c6
install -p -m 0755 utils/Linux/test_ppa $RPM_BUILD_ROOT%{_bindir}
68b3c6
install -p -m 0755 pbm2ppa-0.8.6/pbm2ppa  $RPM_BUILD_ROOT%{_bindir}
68b3c6
install -p -m 0755 pbm2ppa-0.8.6/pbmtpg   $RPM_BUILD_ROOT%{_bindir}
68b3c6
install -p -m 0644 pbm2ppa-0.8.6/pbm2ppa.conf $RPM_BUILD_ROOT%{_sysconfdir}
68b3c6
install -p -m 0644 pbm2ppa-0.8.6/pbm2ppa.1   $RPM_BUILD_ROOT%{_mandir}/man1
68b3c6
68b3c6
chmod 644 docs/en/LICENSE
68b3c6
mkdir -p pbm2ppa
68b3c6
for file in CALIBRATION CREDITS INSTALL INSTALL-MORE LICENSE README ; do
68b3c6
  install -p -m 0644 pbm2ppa-0.8.6/$file pbm2ppa/$file
68b3c6
done
68b3c6
68b3c6
68b3c6
%files 
68b3c6
%license docs/en/LICENSE
68b3c6
%doc docs/en/CREDITS docs/en/INSTALL docs/en/README
68b3c6
%doc docs/en/RELEASE-NOTES docs/en/TODO
68b3c6
%doc docs/en/INSTALL.REDHAT.txt docs/en/COLOR.txt docs/en/CALIBRATION.txt
68b3c6
%doc docs/en/INSTALL.REDHAT.html docs/en/COLOR.html docs/en/CALIBRATION.html
68b3c6
%doc test.ps
68b3c6
%doc pbm2ppa
68b3c6
%{_bindir}/pnm2ppa
68b3c6
%{_bindir}/pbm2ppa
68b3c6
%{_bindir}/pbmtpg
68b3c6
%{_bindir}/calibrate_ppa
68b3c6
%{_bindir}/test_ppa
68b3c6
%{_bindir}/detect_ppa
68b3c6
%{_mandir}/man1/pnm2ppa.1*
68b3c6
%{_mandir}/man1/pbm2ppa.1*
68b3c6
%config(noreplace) %{_sysconfdir}/pnm2ppa.conf
68b3c6
%config(noreplace) %{_sysconfdir}/pbm2ppa.conf
68b3c6
68b3c6
%changelog
68b3c6
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1:1.04-52
68b3c6
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
68b3c6
  Related: rhbz#1991688
68b3c6
68b3c6
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1:1.04-51
68b3c6
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
68b3c6
68b3c6
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.04-50
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
68b3c6
68b3c6
* Thu Nov 05 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1:1.04-49
68b3c6
- make is no longer in buildroot by default
68b3c6
68b3c6
* Tue Aug 04 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1:1.04-48
68b3c6
- fix argument reading for non x86_64 archs - use int instead of char
68b3c6
68b3c6
* Mon Aug 03 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1:1.04-47
68b3c6
- add foomatic as a dependency, because pnm2ppa drivers are not available as a driver without it
68b3c6
68b3c6
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.04-46
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
68b3c6
68b3c6
* Mon Feb 03 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1:1.04-45
68b3c6
- FTBFS with GCC 10
68b3c6
68b3c6
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.04-44
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
68b3c6
68b3c6
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.04-43
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
68b3c6
68b3c6
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.04-42
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
68b3c6
68b3c6
* Tue Jul 24 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1:1.04-41
68b3c6
- correcting license
68b3c6
68b3c6
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.04-40
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
68b3c6
68b3c6
* Wed Jul 11 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1:1.04-39
68b3c6
- ship license in %%license tag
68b3c6
68b3c6
* Thu Mar 01 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1:1.04-38
68b3c6
- 1548734 - pnm2ppa: Partial Fedora build flags injection
68b3c6
68b3c6
* Mon Feb 19 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1:1.04-37
68b3c6
- gcc is no longer in buildroot by default
68b3c6
68b3c6
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.04-36
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
68b3c6
68b3c6
* Thu Feb 08 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1:1.04-35
68b3c6
- remove old stuff https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/MRWOMRZ6KPCV25EFHJ2O67BCCP3L4Y6N/
68b3c6
68b3c6
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.04-34
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
68b3c6
68b3c6
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.04-33
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
68b3c6
68b3c6
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.04-32
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
68b3c6
68b3c6
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.04-31
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
68b3c6
68b3c6
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.04-30
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
68b3c6
68b3c6
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.04-29
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
68b3c6
68b3c6
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.04-28
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
68b3c6
68b3c6
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.04-27
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
68b3c6
68b3c6
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.04-26
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
68b3c6
68b3c6
* Tue Oct 23 2012 Tim Waugh <twaugh@redhat.com> - 1:1.04-25
68b3c6
- Fixed license tag.  pnm2ppa is GPLv2+; pbm2ppa is GPLv2.
68b3c6
68b3c6
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.04-24
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
68b3c6
68b3c6
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.04-23
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
68b3c6
68b3c6
* Fri May 20 2011 Tim Waugh <twaugh@redhat.com> - 1:1.04-22
68b3c6
- Don't return a local variable out of scope (bug #704568).
68b3c6
68b3c6
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.04-21
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
68b3c6
68b3c6
* Tue Oct 05 2010 Parag Nemade <paragn AT fedoraproject.org> - 1:1.04-20
68b3c6
- Merge-review cleanup (#226303)
68b3c6
68b3c6
* Fri Mar  5 2010 Tim Waugh <twaugh@redhat.com> - 1:1.04-19
68b3c6
- Consistent use of macros.
68b3c6
- Removed ancient obsoletes tag.
68b3c6
- Clean buildroot in install section not prep section.
68b3c6
- Make setup quiet.
68b3c6
- Use noreplace for config files.
68b3c6
68b3c6
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.04-18
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
68b3c6
68b3c6
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.04-17
68b3c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
68b3c6
68b3c6
* Wed Sep 24 2008 Tim Waugh <twaugh@redhat.com> 1:1.04-16
68b3c6
- Removed patch fuzz.
68b3c6
68b3c6
* Wed Feb 13 2008 Tim Waugh <twaugh@redhat.com> 1:1.04-15
68b3c6
- Rebuild for GCC 4.3.
68b3c6
68b3c6
* Wed Aug 29 2007 Tim Waugh <twaugh@redhat.com> 1:1.04-14
68b3c6
- Added dist tag.
68b3c6
- Fixed summary.
68b3c6
- Better buildroot tag.
68b3c6
- More specific license tag.
68b3c6
68b3c6
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1:1.04-13.2.2
68b3c6
- rebuild
68b3c6
68b3c6
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1:1.04-13.2.1
68b3c6
- bump again for double-long bug on ppc(64)
68b3c6
68b3c6
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1:1.04-13.2
68b3c6
- rebuilt for new gcc4.1 snapshot and glibc changes
68b3c6
68b3c6
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
68b3c6
- rebuilt
68b3c6
68b3c6
* Wed Mar 16 2005 Tim Waugh <twaugh@redhat.com> 1:1.04-13
68b3c6
- Rebuild for new GCC.
68b3c6
68b3c6
* Wed Feb  9 2005 Tim Waugh <twaugh@redhat.com> 1:1.04-12
68b3c6
- s/Copyright:/License:/.
68b3c6
- s/Serial:/Epoch:/.
68b3c6
- Rebuilt.
68b3c6
68b3c6
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
68b3c6
- rebuilt
68b3c6
68b3c6
* Thu Feb 19 2004 Tim Waugh <twaugh@redhat.com>
68b3c6
- rebuilt
68b3c6
68b3c6
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
68b3c6
- rebuilt
68b3c6
68b3c6
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
68b3c6
- rebuilt
68b3c6
68b3c6
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
68b3c6
- rebuilt
68b3c6
68b3c6
* Wed Nov 20 2002 Tim Powers <timp@redhat.com>
68b3c6
- rebuild in current collinst
68b3c6
68b3c6
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
68b3c6
- automated rebuild
68b3c6
68b3c6
* Thu May 23 2002 Tim Powers <timp@redhat.com>
68b3c6
- automated rebuild
68b3c6
68b3c6
* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
68b3c6
- automated rebuild
68b3c6
68b3c6
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
68b3c6
- Bump release + rebuild.
68b3c6
68b3c6
* Mon Dec 11 2000 Crutcher Dunnavant <crutcher@redhat.com>
68b3c6
- Upgrade to 1.04, editied the pbm2ppa patch to add <string.h>
68b3c6
- to pbmtpg.c, which uses strmp, edited the redhat patch to
68b3c6
- apply cleanly.
68b3c6
68b3c6
* Thu Aug 17 2000 Bill Nottingham <notting@redhat.com>
68b3c6
- tweak summary
68b3c6
68b3c6
* Thu Aug  3 2000 Bill Nottingham <notting@redhat.com>
68b3c6
- build upstream package
68b3c6
68b3c6
* Tue Jul 11 2000 Duncan Haldane <duncan_haldane@users.sourceforge.net>
68b3c6
- updated for 1.0 release.
68b3c6
68b3c6
* Mon Jul 10 2000 Florian La Roche <Florian.LaRoche@redhat.com>
68b3c6
- remove execute bits from config file and man-page
68b3c6
68b3c6
* Sun Apr 09 2000 <duncan_haldane@users.sourceforge.net>
68b3c6
- added optional updated rhs-printfilter  files
68b3c6
68b3c6
* Thu Feb 10 2000 Bill Nottingham <notting@redhat.com>
68b3c6
- adopt upstream package
68b3c6
68b3c6
* Sun Feb 6 2000 <duncan_haldane@users.sourceforge.net>
68b3c6
- new pnm2ppa release,  and add pbm2ppa driver.
68b3c6
68b3c6
* Thu Jan 6 2000 <duncan_haldane@users.sourceforge.net>
68b3c6
- created rpm
68b3c6
68b3c6
68b3c6