Summary: Drivers for printing to HP PPA printers
Summary(ja): HP PPAプリンタ用ドライバ
Name: pnm2ppa
#Serial: 1
Obsoletes: ppa, pbm2ppa
Version: 1.12
Release: 1%{?_dist_release}
License: GPL
URL: http://sourceforge.net/projects/pnm2ppa 
Source: http://download.sourceforge.net/pnm2ppa/pnm2ppa-%{version}.tar.gz
Source1: http://www.httptech.com/ppa/files/ppa-0.8.6.tar.gz
Patch2: pbm2ppa-20000205.diff
Patch3: pnm2ppa-redhat.patch
Group: Applications/Publishing
Buildroot: %{_tmppath}/%{name}-%{version}-root
%define topdir pnm2ppa-%{version}

%description
pnm2ppa is a color driver for HP PPA host-based printers such
as the HP710C, 712C, 720C, 722C, 820Cse, 820Cxi, 1000Cse, and 1000Cxi.
It accepts ghostscript output in PPM format, and sends it to the printer
in PPA format.  The  older (black only) driver pbm2ppa is also included.

Install pnm2ppa if you have a PPA printer and need to print.

%description -l ja
このソフトウェアは PPA (printer performance architecture) プロトコルを使った
出力を作成します。このプロトコルは数種の HP の 「Windows のみの」プリンタで
使われています。HP Deskjet 710C, 712C, 720C, 722C, 820Cse, 820Cxi, 1000Cse,
1000Cxi などが該当プリンタとなります。このフィルタは ghostscript のPPM
フォーマットの出力を受け付け、プリンタにPPAフォーマットで送ります。
古い白黒専用のフィルタpbm2ppaも含まれています。

PPAプリンタを使うときには、この pnm2ppa が必要になります。

%prep
%setup -q -n %{topdir}

#pbm2ppa source
%setup -T -D -a 1 -n %{topdir}
%patch2 -p0
#%patch3 -p1 -b .rh

%build
make 
cd pbm2ppa-0.8.6
make

%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_bindir}
install -d $RPM_BUILD_ROOT%{_sysconfdir}
install -d $RPM_BUILD_ROOT%{_mandir}/man1
make BINDIR=$RPM_BUILD_ROOT%{_bindir} \
    CONFDIR=$RPM_BUILD_ROOT%{_sysconfdir} \
    MANDIR=$RPM_BUILD_ROOT%{_mandir}/man1 install 
install -m 0755 utils/Linux/detect_ppa $RPM_BUILD_ROOT%{_bindir}
install -m 0755 utils/Linux/test_ppa $RPM_BUILD_ROOT%{_bindir}
install -m 0755 pbm2ppa-0.8.6/pbm2ppa  $RPM_BUILD_ROOT%{_bindir}
install -m 0755 pbm2ppa-0.8.6/pbmtpg   $RPM_BUILD_ROOT%{_bindir}
install -m 0644 pbm2ppa-0.8.6/pbm2ppa.conf   $RPM_BUILD_ROOT%{_sysconfdir}
install -m 0644 pbm2ppa-0.8.6/pbm2ppa.1   $RPM_BUILD_ROOT%{_mandir}/man1

chmod 644 docs/en/LICENSE
mkdir -p pbm2ppa
for file in CALIBRATION CREDITS INSTALL INSTALL-MORE LICENSE README ; do
  install -m 0644 pbm2ppa-0.8.6/$file pbm2ppa/$file
done

%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

%files 
%defattr(-,root,root)
%doc docs/en/CREDITS docs/en/INSTALL docs/en/LICENSE docs/en/README
%doc docs/en/RELEASE-NOTES docs/en/TODO
%doc docs/en/INSTALL.REDHAT.txt docs/en/COLOR.txt docs/en/CALIBRATION.txt
%doc docs/en/INSTALL.REDHAT.html docs/en/COLOR.html docs/en/CALIBRATION.html
%doc test.ps
%doc pbm2ppa
%{_bindir}/pnm2ppa
%{_bindir}/pbm2ppa
%{_bindir}/pbmtpg
%{_bindir}/calibrate_ppa
%{_bindir}/test_ppa
%{_bindir}/detect_ppa
%{_mandir}/man1/pnm2ppa.1*
%{_mandir}/man1/pbm2ppa.1*
%config %{_sysconfdir}/pnm2ppa.conf
%config %{_sysconfdir}/pbm2ppa.conf

%changelog
* Thu Oct 09 2008 Shu KONNO <owa@bg.wakwak.com> 1.12-1vl5
- applied new versioning policy, spec in utf-8

* Fri Dec 28 2007 Shu KONNO <owa@bg.wakwak.com> 1.12-0vl2
- s/Copyright/License/
- dropt Serial: 1

* Sat Mar 15 2003 <ryo1@bc.wakwak.com> 1.12-0vl1
- rebuild with new toolchains
- update to 1.12 and dropped patch3
- use more macros

* Sat Jun 09 2001 <sagami@vinelinux.org>
- 1.0-2vl2: rebuilt for _mandir

* Wed Oct  4 2000 Jun Nishii <jun@vinelinux.org>
- 1.0-2vl1
- added Japanese summary and description
- build for Vine Linux 2.1

* Thu Aug  3 2000 Bill Nottingham <notting@redhat.com>
- build upstream package

* Tue Jul 11 2000 Duncan Haldane <duncan_haldane@users.sourceforge.net>
- updated for 1.0 release.

* Mon Jul 10 2000 Florian La Roche <Florian.LaRoche@redhat.com>
- remove execute bits from config file and man-page


* Sun Apr 09 2000 <duncan_haldane@users.sourceforge.net>
- added optional updated rhs-printfilter  files

* Thu Feb 10 2000 Bill Nottingham <notting@redhat.com>
- adopt upstream package

* Sun Feb 6 2000 <duncan_haldane@users.sourceforge.net>
- new pnm2ppa release,  and add pbm2ppa driver.

* Thu Jan 7 2000 <duncan_haldane@users.sourceforge.net>
- created rpm
