hplip/hpijs-standalone.spec

140 lines
6.5 KiB
RPMSpec
Raw Normal View History

#
# spec file for package hpijs-standalone (Version 1.7.1)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: hpijs-standalone
BuildRequires: gcc-c++ libjpeg-devel
Summary: HPIJS stand-alone
# HPLIP has reached 1.0 status. With this release a date encoded revision number is used:
# x.y.m : x = major release number, y = year (eg: 6 = 2006), m = month (eg: 6a = second release in June)
# Official releases have a 3 digit number and release candidates have a 4 digit number: x.y.m.rc
Version: 1.7.1
Release: 1
Group: Hardware/Printing
License: BSD License and BSD-like
URL: http://hpinkjet.sourceforge.net/
# Source0...Source9 is for sources from HP:
# URL for Source0: http://superb-west.dl.sourceforge.net/sourceforge/hplip/hplip-1.7.1.tar.gz
Source0: hplip-%{version}.tar.bz2
# Patch0...Patch9 is for patches from HP:
# URL for Patch0: http://sourceforge.net/project/showfiles.php?group_id=149981
# Fix Deskjet D4100/D4160 christmas-tree (firmware hangs up with flashing LEDs) on second print job:
Patch0: hplip-1.7.1-1.patch
# Patch10...Patch99 is for Suse patches for the sources from HP:
# Source100... is for special Suse sources:
# Source102 is a small man page for /usr/bin/hpijs:
Source102: hpijs.1.gz
# Install into this non-root directory (required when norootforbuild is used):
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# Mutual RPM package requirements are meanwhile considered to be bad because
# such cyclic dependencies which makes it harder to automatically solve dependencies.
# Actually the hpijs driver requires Ghostscript (i.e ghostscript_any, e.g. ghostscript-library).
# But ghostscript-library must also require the hpijs driver which is the more imortant requirement
# because when a user (or a printer setup tool) wants to set up a HP printer with the hpijs driver
# it must be 100% sure that all what the hpijs driver needs to run is also installed.
# Therefore the requirement is weakened for this package:
Supplements: ghostscript_any
# hplip-hpijs and hplip-hpijs-standalone both contain /usr/bin/hpijs:
Conflicts: hplip-hpijs
# Skip testing devel dependencies required by libtool .la files by the following comment:
# skip-check-libtool-deps
%description
HPIJS is a Ghostscript printer driver for HP printers.
This package includes a special version of the hpijs binary which
neither needs a HPLIP library nor a CUPS library to run it. Therefore
it conflicts with the hpijs binary in the hplip-hpijs package. For
special cases (e.g. for LPRng/lpdfilter or for a minimal printing
system or for printing without any printing system) it is possible to
use only this hpijs binary and Ghostscript.
For full documentation and license see the package hplip.
Authors:
--------
David Suffield <david.suffield@hp.com>
Cory Meisch <cory.meisch@hp.com>
Yie Shiyun <shiyun.yie@hp.com>
Donald J. Welch <donald.welch@hp.com>
Cauligi Raghothama S. <raghothama.cauligi@hp.com>
%prep
# Be quiet when unpacking:
%setup -q -n hplip-1.7.1
# Fix Deskjet D4100/D4160 christmas-tree (firmware hangs up with flashing LEDs) on second print job:
%patch0 -p1
%build
# If AUTOMAKE='automake --foreign' is not set, autoreconf (in fact automake)
# complains about missing files like NEWS, README, AUTHORS, ChangeLog
# in each directory where a Makefile.am exists:
AUTOMAKE='automake --foreign' autoreconf --force --install
# Set our preferred architecture-specific flags for the compiler and linker:
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
# We build a special hpijs which does not require the CUPS library.
# One of the HPLIP authors David Suffield told me in a mail:
# > To: Johannes Meixner <jsmeix@suse.de>, <hplip-devel@lists.sourceforge.net>
# > Subject: RE: [HPLIP-Devel] /usr/bin/hpijs requires libcups.so
# > If you want to build hpijs with-out the libcups.so dependency, build
# > hpijs with-out hplip support.
# > For example if you want to build hpijs for use with other spoolers,
# > don't use the top-level hplip makefile, use configure/make in the hpijs
# > directory. There is a hpijs configure time "hplip-build" flag that
# > defaults to false if you don't use the top-level make file.
# To avoid that too much is built (e.g. the full documentation from higher directories)
# the specific make target "make hpijs" is called.
# Regarding the configure options see tech_docs/tarball_install.html (not very explanatory):
# --disable-rpm-install disables sane, icon, /etc/hp and /etc/init.d install (default = disabled)
# --disable-foomatic-install disables foomatic install (HPIJS option, default = enabled)
# --disable-cups-install disables cups install (HPIJS option, default = enabled)
# CUPS install would do:
# (1) remove any old HP HPIJS PPD files from the CUPS PPD directory
# (2) symlink the HP HPIJS PPD files to the CUPS PPD directory
# (3) symlink foomatic-rip to the CUPS filter directory.
# --disable-network-build disables network support, will not link with libsnmp (default = enabled)
# --disable-pp-build disables parallel port support (default = enabled)
# --enable-scan-build enable scanner build (default=yes)
# --enable-gui-build enable gui build (default=yes)
# --enable-fax-build enable fax build (default=yes)
# rpm-install is no longer needed because "make install DESTDIR=/tmp/myhplip" works correctly now.
pushd prnt/hpijs
./configure --prefix=/usr --libdir=%_libdir --disable-hplip-build --disable-cups-install --disable-foomatic-install
make hpijs
popd
%install
# Install only the hpijs binary ("make install" would install full HPLIP documentation):
install -d %{buildroot}%{_bindir}
install -m 755 prnt/hpijs/hpijs %{buildroot}%{_bindir}
# Install the man page for /usr/bin/hpijs:
install -d %{buildroot}%{_mandir}/man1
install -m 644 %{SOURCE102} %{buildroot}%{_mandir}/man1/
%post
/sbin/ldconfig
exit 0
%files
%defattr(-, root, root)
%doc doc/tech_docs/hpijs.html doc/tech_docs/device_classes.html
%doc %{_mandir}/man1/hpijs.1.gz
%{_bindir}/hpijs
%changelog -n hpijs-standalone
* Thu Feb 01 2007 - jsmeix@suse.de
- Created new package hpijs-standalone and hpijs-standalone.spec
for a special version of /usr/bin/hpijs which neither needs
a HPLIP library nor a CUPS library to run it.