hplip/hplip.spec
2006-03-28 11:58:08 +00:00

300 lines
8.4 KiB
RPMSpec

Summary: HP Linux Imaging and Printing Project
Name: hplip
Version: 0.9.10
Release: 2
License: GPL/MIT/BSD
Group: System Environment/Daemons
Conflicts: system-config-printer < 0.6.132
Obsoletes: hpoj <= 0.91
Obsoletes: xojpanel <= 0.91
Url: http://sourceforge.net/projects/hpinkjet
Source: http://kent.dl.sourceforge.net/sourceforge/hpinkjet/%{name}-%{version}.tar.gz
Patch1: hplip-desktop.patch
Patch2: hplip-config.patch
Patch3: hplip-quiet.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
Requires: desktop-file-utils >= 0.2.92
Requires: PyQt
%define hpijs_epoch 1
Conflicts: hpijs < %{hpijs_epoch}:%{version}-%{release}
BuildRequires: net-snmp-devel
BuildRequires: cups-devel
BuildRequires: python-devel
BuildRequires: libjpeg-devel
BuildRequires: desktop-file-utils
BuildRequires: libusb-devel
%description
The Hewlett-Packard Linux Imaging and Printing Project provides
drivers for HP printers and multi-function peripherals.
%package -n hpijs
Summary: HP Printer Drivers
Group: Applications/Publishing
License: BSD
Epoch: %{hpijs_epoch}
%description -n hpijs
hpijs is a collection of optimized drivers for HP printers.
hpijs supports the DeskJet 350C, 600C, 600C Photo, 630C, Apollo 2000,
Apollo 2100, Apollo 2560, DeskJet 800C, DeskJet 825, DeskJet 900,
PhotoSmart, DeskJet 990C, and PhotoSmart 100 series.
%package -n libsane-hpaio
Summary: SANE driver for scanners in HP's multi-function devices
Group: System Environment/Daemons
License: GPL
Obsoletes: libsane-hpoj <= 0.91
Requires: sane-backends
ExcludeArch: s390 s390x
%description -n libsane-hpaio
SANE driver for scanners in HP's multi-function devices (from HPOJ).
%prep
rm -rf $RPM_BUILD_DIR/%{name}-%{version}
%setup -q
# Use /usr/share/applications for putting desktop files in.
%patch1 -p1 -b .desktop
# Use static IP ports (for SELinux policy).
%patch2 -p1 -b .config
# Quieten hpssd on startup.
%patch3 -p1 -b .quiet
%build
%configure --disable-foomatic-install --disable-cups-install
make
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_bindir}
make install DESTDIR=%{buildroot}
# Move SANE backend into correct directory
mkdir -p %{buildroot}%{_libdir}/sane
mv %{buildroot}%{_libdir}/libsane-*.so* %{buildroot}%{_libdir}/sane
# Remove unpackaged files
rm -rf %{buildroot}%{_sysconfdir}/sane.d \
%{buildroot}%{_docdir}
rm -f %{buildroot}%{_bindir}/foomatic-rip \
%{buildroot}%{_libdir}/cups/filter/foomatic-rip \
%{buildroot}%{_libdir}/*.la \
%{buildroot}%{_libdir}/*.so \
%{buildroot}%{_datadir}/cups/model/foomatic-ppds \
%{buildroot}%{_datadir}/applications/hplip.desktop
mkdir -p %{buildroot}%{_datadir}/applications
echo 'Hidden=true' >> %{buildroot}%{_datadir}/hplip/data/hplip.desktop
desktop-file-install --vendor HP \
--dir %{buildroot}%{_datadir}/applications \
--add-category X-Red-Hat-Extra \
--add-category Utility \
--add-category Application \
%{buildroot}%{_datadir}/hplip/data/hplip.desktop
# Move initscript
mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
mv %{buildroot}%{_sysconfdir}/{init.d,rc.d/init.d}/hplip
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc COPYING hplip_readme.html hplip_overview.png
%dir %{_sysconfdir}/hp
%config(noreplace) %{_sysconfdir}/hp/hplip.conf
%config(noreplace) %{_sysconfdir}/rc.d/init.d/hplip
%{_bindir}/hp-*
%{_sbindir}/hpiod
/usr/lib/cups/backend/hp
/usr/lib/cups/backend/hpfax
%{_datadir}/hplip
%{_libdir}/python*/site-packages/*
%{_datadir}/applications/*.desktop
%{_datadir}/ppd
%files -n hpijs
%defattr(-,root,root)
%doc prnt/hpijs/COPYING prnt/hpijs/hpijs_readme.html prnt/hpijs/gs_hpijs.png
%{_bindir}/hpijs
%{_bindir}/hppgsz
%files -n libsane-hpaio
%defattr(-,root,root)
%{_libdir}/libhpip.so*
%{_libdir}/sane/libsane-*.so*
%post
/sbin/chkconfig --add hplip || :
if [ "$1" == "1" ]; then
/sbin/service hplip condrestart >/dev/null 2>&1 || :
fi
exit 0
%preun
if [ "$1" == "0" ]; then
/sbin/service hplip stop >/dev/null 2>&1 || :
/sbin/chkconfig --del hplip
fi
exit 0
%post -n libsane-hpaio
/sbin/ldconfig
if ! grep ^hpaio /etc/sane.d/dll.conf >/dev/null 2>/dev/null ; then \
echo hpaio >> /etc/sane.d/dll.conf; \
fi
%changelog
* Tue Mar 28 2006 Tim Waugh <twaugh@redhat.com> 0.9.10-2
- 0.9.10.
- Ship PPDs.
* Fri Mar 24 2006 Tim Waugh <twaugh@redhat.com> 0.9.9-7
- Include hpfax.
- Build requires libusb-devel.
* Thu Mar 23 2006 Tim Waugh <twaugh@redhat.com> 0.9.9-6
- CUPS backend directory is always in /usr/lib.
* Mon Mar 13 2006 Tim Waugh <twaugh@redhat.com> 0.9.9-4
- Quieten hpssd on startup.
* Sat Mar 11 2006 Tim Waugh <twaugh@redhat.com> 0.9.9-3
- Patchlevel 1.
* Thu Mar 9 2006 Tim Waugh <twaugh@redhat.com> 0.9.9-2
- 0.9.9. No longer need quiet or 0.9.8-4 patches.
* Wed Mar 01 2006 Karsten Hopp <karsten@redhat.de> 0.9.8-6
- Buildrequires: desktop-file-utils
* Mon Feb 27 2006 Tim Waugh <twaugh@redhat.com> 0.9.8-5
- Patchlevel 4.
* Tue Feb 14 2006 Tim Waugh <twaugh@redhat.com> 0.9.8-4
- Added Obsoletes: hpoj tags back in (bug #181476).
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - (none):0.9.8-3.1
- bump again for double-long bug on ppc(64)
* Tue Feb 7 2006 Tim Waugh <twaugh@redhat.com> 0.9.8-3
- Patchlevel 3.
* Fri Feb 3 2006 Tim Waugh <twaugh@redhat.com> 0.9.8-2
- Patchlevel 2.
* Thu Feb 2 2006 Tim Waugh <twaugh@redhat.com> 0.9.8-1
- 0.9.8.
- No longer need initscript patch.
- Don't package hpfax yet.
* Wed Jan 18 2006 Tim Waugh <twaugh@redhat.com> 0.9.7-8
- Don't package PPD files.
* Thu Jan 5 2006 Tim Waugh <twaugh@redhat.com> 0.9.7-7
- Fix initscript (bug #176966).
* Mon Jan 2 2006 Tim Waugh <twaugh@redhat.com> 0.9.7-6
- Rebuild.
* Fri Dec 23 2005 Tim Waugh <twaugh@redhat.com> 0.9.7-5
- Rebuild.
* Wed Dec 21 2005 Tim Waugh <twaugh@redhat.com> 0.9.7-4
- Build requires python-devel, libjpeg-devel (bug #176317).
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt
* Wed Dec 7 2005 Tim Waugh <twaugh@redhat.com> 0.9.7-3
- Use upstream patch 0.9.7-2.
- No longer need lpgetstatus or compile patches.
* Fri Nov 25 2005 Tim Waugh <twaugh@redhat.com> 0.9.7-2
- Prevent LPGETSTATUS overrunning format buffer.
* Thu Nov 24 2005 Tim Waugh <twaugh@redhat.com> 0.9.7-1
- 0.9.7.
* Fri Nov 18 2005 Tim Waugh <twaugh@redhat.com> 0.9.6-7
- Fix compilation.
* Wed Nov 9 2005 Tomas Mraz <tmraz@redhat.com> 0.9.6-6
- rebuilt against new openssl
* Mon Nov 7 2005 Tim Waugh <twaugh@redhat.com> 0.9.6-5
- Rebuilt.
* Wed Oct 26 2005 Tim Waugh <twaugh@redhat.com> 0.9.6-4
- Ship initscript in %%{_sysconfdir}/rc.d/init.d.
* Fri Oct 14 2005 Tim Waugh <twaugh@redhat.com>
- Install the desktop file with Hidden=True (bug #170762).
* Fri Oct 14 2005 Tim Waugh <twaugh@redhat.com> 0.9.6-3
- Don't install desktop file (bug #170762).
- Quieten the hpssd daemon at startup (bug #170762).
* Wed Oct 12 2005 Tim Waugh <twaugh@redhat.com> 0.9.6-2
- 0.9.6.
* Tue Sep 20 2005 Tim Waugh <twaugh@redhat.com> 0.9.5-3
- Apply upstream patch to fix scanning in LaserJets and parallel InkJets.
* Mon Sep 19 2005 Tim Waugh <twaugh@redhat.com> 0.9.5-2
- 0.9.5.
- No longer need condrestart patch.
- Fix compile errors.
* Tue Jul 26 2005 Tim Waugh <twaugh@redhat.com> 0.9.4-3
- Fix condrestart in the initscript.
* Mon Jul 25 2005 Tim Waugh <twaugh@redhat.com> 0.9.4-2
- Use 'condrestart' not 'restart' in %%post scriptlet.
* Fri Jul 22 2005 Tim Waugh <twaugh@redhat.com> 0.9.4-1
- forward-decl patch not needed.
- 0.9.4.
* Fri Jul 1 2005 Tim Waugh <twaugh@redhat.com> 0.9.3-8
- Removed Obsoletes: hpoj tags (bug #162222).
* Thu Jun 30 2005 Tim Waugh <twaugh@redhat.com> 0.9.3-7
- Rebuild to get Python modules precompiled.
* Wed Jun 22 2005 Tim Waugh <twaugh@redhat.com> 0.9.3-6
- For libsane-hpaio ExcludeArch: s390 s390x, because it requires
sane-backends.
* Wed Jun 15 2005 Tim Waugh <twaugh@redhat.com> 0.9.3-5
- Use static IP ports (for SELinux policy).
* Tue Jun 14 2005 Tim Waugh <twaugh@redhat.com> 0.9.3-4
- Conflicts: hpijs from before this package provided it.
- Conflicts: system-config-printer < 0.6.132 (i.e. before HPLIP support
was added)
* Thu Jun 9 2005 Tim Waugh <twaugh@redhat.com> 0.9.3-3
- Added Obsoletes: for xojpanel and hpoj-devel (but we don't actually package
devel files yet).
* Thu Jun 9 2005 Tim Waugh <twaugh@redhat.com> 0.9.3-2
- Add 'hpaio' to SANE config file, not 'hpoj' (bug #159954).
* Thu Jun 9 2005 Tim Waugh <twaugh@redhat.com> 0.9.3-1
- Use /usr/share/applications for putting desktop files in (bug #159932).
- Requires PyQt (bug #159932).
* Tue Jun 7 2005 Tim Waugh <twaugh@redhat.com> 0.9.3-0.1
- Initial package, based on Mandriva spec file.