View previous topic :: View next topic |
Author |
Message |
scdgro n00b
Joined: 16 Nov 2002 Posts: 56
|
Posted: Wed Mar 04, 2009 4:25 pm Post subject: Problem installing a HP printer with the hp-setup tool ? |
|
|
Before someone tears out his hear because the hp setup (latest is 3.9.2) tools gives errors when adding the printer.
Maybe you may find the answer here, and i wanted to share it with you, to save you some sleepless hours.
First check with cups running : lpinfo -v
This should give something similar like this :
Code: |
network socket
network beh
direct hpfax
network socket://192.168.1.3
direct hp
network http
network https
network ipp
network lpd
direct scsi
|
The direct hp direct hpfax should be present... If not copy over some files, because the installer puts them on a different location.
Code: |
cp /usr/lib/cups/backend/hp* /usr/libexec/cups/backend/
cp /usr/lib/cups/filter/* /usr/libexec/cups/filter/
|
With the last line also note my configure rule : make sure it contains --enable-foomatic-rip-hplip-install, otherwise you may get errors in the webinterface " "Filter "foomatic-rip-hplip" for printer XXXX" .. The filter is needed for some printers.. If you check the ppd file with a grep, you should see it if needed.
Code: |
./configure --with-hpppddir=/usr/share/ppd/HP --libdir=/usr/lib64 --prefix=/usr --enable-qt4 --enable-doc-build --disable-qt3 --disable-pp-build --disable-foomatic-drv-install --enable-foomatic-ppd-install --enable-network-build --enable-dbus-build --disable-hpijs-only-build --enable-scan-build --enable-fax-build --enable-foomatic-rip-hplip-install
|
And then check again.. Hope this is the solution for you. |
|
Back to top |
|
|
phixth n00b
Joined: 24 Apr 2005 Posts: 30
|
Posted: Tue Mar 17, 2009 7:37 pm Post subject: re |
|
|
thanks man, you helped me to solve my problem with hplip driver. New ebuild is not ready yet, and attached in bugzilla is not correct because it disables foomatic-rip-hplip-install and also wants to download some hplip-3.9.2-plugin.run which should be hplip-3.9.2.run. Thanks to you I've changed the ebuild and all is working now.
I'm pasting it here, maybe it'll help someone:
Code: |
# cat hplip-3.9.2.ebuild
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-print/hplip/hplip-2.8.7.ebuild,v 1.2 2009/03/14 19:04:39 armin76 Exp $
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="1"
inherit eutils flag-o-matic linux-info python
IUSE="cupsddk dbus doc fax gtk minimal parport ppds plugins qt3 qt4 scanner snmp"
DESCRIPTION="HP Linux Imaging and Printing System. Includes net-print/hpijs, scanner drivers and service tools."
HOMEPAGE="http://hplip.sourceforge.net/"
SRC_URI="plugins? ( http://www.linuxprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-${PV}.run )
mirror://sourceforge/hplip/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
DEPEND="!net-print/hpijs
!net-print/hpoj
virtual/ghostscript
>=media-libs/jpeg-6b
>=net-print/foomatic-filters-3.0.20080507
!minimal? (
>=net-print/cups-1.2
dev-libs/libusb
cupsddk? ( net-print/cupsddk )
dbus? ( >=sys-apps/dbus-1.0.0 )
scanner? ( >=media-gfx/sane-backends-1.0.19-r1 )
snmp? (
net-analyzer/net-snmp
dev-libs/openssl
)
)"
RDEPEND="${DEPEND}
app-arch/gzip
!minimal? (
!<sys-fs/udev-114
scanner? (
dev-python/imaging
gtk? ( >=media-gfx/xsane-0.89 )
!gtk? ( >=media-gfx/sane-frontends-1.0.9 )
)
qt4? ( !qt3? (
dev-python/PyQt4
dbus? ( >=dev-python/dbus-python-0.80 )
fax? ( dev-python/reportlab )
) )
qt3? (
>=dev-python/PyQt-3.14
dev-python/ctypes
dbus? ( >=dev-python/dbus-python-0.80 )
fax? ( dev-python/reportlab )
)
)"
CONFIG_CHECK="PARPORT PPDEV"
ERROR_PARPORT="Please make sure parallel port support is enabled in your kernel (PARPORT and PPDEV)."
RESTRICT="plugins? ( strip )"
pkg_setup() {
! use qt3 && ! use qt4 && ewarn "You need USE=qt3 (recommended) or USE=qt4 for the hplip GUI."
use scanner && ! use gtk && ewarn "You need USE=gtk for the scanner GUI."
if ! use ppds && ! use cupsddk; then
ewarn "Installing neither static (USE=-ppds) nor dynamic (USE=-cupsddk) PPD files,"
ewarn "which is probably not what you want. You will almost certainly not be able to "
ewarn "print (recommended: USE=\"cupsddk -ppds\")."
fi
if use minimal ; then
ewarn "Installing hpijs driver only, make sure you know what you are doing."
else
use parport && linux-info_pkg_setup
fi
}
src_unpack() {
unpack ${P}.tar.gz
if use plugins; then
echo ">>> Unpacking hplip-${PV}-plugin.tar.gz to ${WORKDIR}/plugins"
mkdir -p "${WORKDIR}"/plugins
cd "${WORKDIR}"/plugins
tail -c +9523 "${DISTDIR}"/hplip-${PV}-plugin.run > hplip-${PV}-plugin.tar.gz
tar xf "${WORKDIR}"/plugins/hplip-${PV}-plugin.tar.gz
rm -f "${WORKDIR}"/plugins/hplip-${PV}-plugin.tar.gz
fi
cd "${S}"
sed -i -e "s:\/usr\/share\/hal\/fdi\/preprobe\/10osvendor:\/etc\/hal\/fdi\/preprobe:g" Makefile.in || die "Patching hplip.list.in failed"
sed -i -e "s:\$(doc_DATA)::" Makefile.in || die "Patching Makefile.in failed"
sed -i -e "s/'skipstone']/'skipstone', 'epiphany']/" \
-e "s/'skipstone': ''}/'skipstone': '', 'epiphany': '--new-window'}/" \
base/utils.py || die "Patching base/utils.py failed"
# bug 98428
sed -i -e "s:/usr/bin/env python:/usr/bin/python:g" hpssd.py || die "Patching hpssd.py failed"
# Force recognition of Gentoo distro by hp-check
sed -i \
-e "s:file('/etc/issue', 'r').read():'Gentoo':" \
installer/core_install.py || die "sed core_install.py"
# Replace udev rules, see bug #197726.
rm data/rules/55-hpmud.rules
cp "${FILESDIR}"/70-hpmud.rules data/rules
sed -i -e "s/55-hpmud.rules/70-hpmud.rules/g" Makefile.* */*.html || die "sed failed"
# Use system foomatic-rip instead of foomatic-rip-hplip
local i
for i in ppd/*.ppd.gz
do
rm -f $i.temp
gunzip -c $i | sed 's/foomatic-rip-hplip/foomatic-rip/' | gzip > $i.temp || die "*.ppd.gz sed failed"
mv $i.temp $i
done
local QT_VER
use qt4 && QT_VER="4"
use qt3 && QT_VER="3"
sed -i \
-e "s/%s --force-startup/%s --force-startup --qt${QT_VER}/" \
-e "s/'--force-startup'/'--force-startup', '--qt${QT_VER}'/" \
base/device.py || die "sed failed"
sed -i \
-e "s/Exec=hp-systray/Exec=hp-systray --qt${QT_VER}/" \
hplip-systray.desktop.in || die "sed failed"
}
src_compile() {
if use qt3 || use qt4 ; then
local GUI_BUILD="--enable-gui-build"
else
local GUI_BUILD="--disable-gui-build"
fi
econf \
--disable-dependency-tracking \
--disable-cups11-build \
--with-cupsbackenddir=$(cups-config --serverbin)/backend \
--with-cupsfilterdir=$(cups-config --serverbin)/filter \
--enable-foomatic-rip-hplip-install \
${GUI_BUILD} \
$(use_enable doc doc-build) \
$(use_enable cupsddk foomatic-drv-install) \
$(use_enable dbus dbus-build) \
$(use_enable fax fax-build) \
$(use_enable minimal hpijs-only-build) \
$(use_enable parport pp-build) \
$(use_enable ppds foomatic-ppd-install) \
$(use_enable scanner scan-build) \
$(use_enable snmp network-build) \
|| die "econf failed"
emake || die "Compilation failed"
}
src_install() {
replace-flags "-j?" "-j1"
emake DESTDIR="${D}" install || die "emake install failed"
rm -f "${D}"/etc/sane.d/dll.conf
if use plugins; then
sed -i -e "s:SYSFS:ATTRS:g" "${WORKDIR}"/plugins/*.rules || die "sed failed"
insinto /etc/udev/rules.d
doins "${WORKDIR}"/plugins/86-hpmud-hp_laserjet_1000.rules
doins "${WORKDIR}"/plugins/86-hpmud-hp_laserjet_1005_series.rules
doins "${WORKDIR}"/plugins/86-hpmud-hp_laserjet_1018.rules
doins "${WORKDIR}"/plugins/86-hpmud-hp_laserjet_1020.rules
doins "${WORKDIR}"/plugins/86-hpmud-hp_laserjet_p1005.rules
doins "${WORKDIR}"/plugins/86-hpmud-hp_laserjet_p1006.rules
doins "${WORKDIR}"/plugins/86-hpmud-hp_laserjet_p1007.rules
doins "${WORKDIR}"/plugins/86-hpmud-hp_laserjet_p1008.rules
doins "${WORKDIR}"/plugins/86-hpmud-hp_laserjet_p1505.rules
# detect ARCH variable
if [[ "${ARCH}" == "amd64" ]] ; then
arch_var="64"
else
arch_var="32"
fi
cd "${D}"/usr/lib
dodir /usr/share/hplip/scan/plugins
dolib.so "${WORKDIR}"/plugins/bb_marvell-x86_"${arch_var}".so
ln -s bb_marvell-x86_"${arch_var}".so bb_marvell.so
dosym /usr/lib/bb_marvell-x86_"${arch_var}".so /usr/share/hplip/scan/plugins/bb_marvell.so
dosym /usr/lib/bb_marvell-x86_"${arch_var}".so /usr/share/hplip/scan/plugins/bb_marvell-x86_"${arch_var}".so
dolib.so "${WORKDIR}"/plugins/bb_soap-x86_"${arch_var}".so
ln -s bb_soap-x86_"${arch_var}".so bb_soap.so
dosym /usr/lib/bb_soap-x86_"${arch_var}".so /usr/share/hplip/scan/plugins/bb_soap.so
dosym /usr/lib/bb_soap-x86_"${arch_var}".so /usr/share/hplip/scan/plugins/bb_soap-x86_"${arch_var}".so
dolib.so "${WORKDIR}"/plugins/bb_soapht-x86_"${arch_var}".so
ln -s bb_soapht-x86_"${arch_var}".so bb_soapht.so
dosym /usr/lib/bb_soapht-x86_"${arch_var}".so /usr/share/hplip/scan/plugins/bb_soapht.so
dosym /usr/lib/bb_soapht-x86_"${arch_var}".so /usr/share/hplip/scan/plugins/bb_soapht-x86_"${arch_var}".so
dodir /usr/share/hplip/prnt/plugins
dolib.so "${WORKDIR}"/plugins/lj-x86_"${arch_var}".so
ln -s lj-x86_"${arch_var}".so lj.so
dosym /usr/lib/lj-x86_"${arch_var}".so /usr/share/hplip/prnt/plugins/lj.so
dosym /usr/lib/lj-x86_"${arch_var}".so /usr/share/hplip/prnt/plugins/lj-x86_"${arch_var}".so
dodir /usr/share/hplip/data/plugins
insinto /usr/share/hplip/data/plugins
doins "${WORKDIR}"/plugins/license.txt
dodir /usr/share/hplip/data/firmware
insinto /usr/share/hplip/data/firmware
doins "${WORKDIR}"/plugins/hp_laserjet_1000.fw.gz
doins "${WORKDIR}"/plugins/hp_laserjet_1005_series.fw.gz
doins "${WORKDIR}"/plugins/hp_laserjet_1018.fw.gz
doins "${WORKDIR}"/plugins/hp_laserjet_1020.fw.gz
doins "${WORKDIR}"/plugins/hp_laserjet_p1005.fw.gz
doins "${WORKDIR}"/plugins/hp_laserjet_p1006.fw.gz
doins "${WORKDIR}"/plugins/hp_laserjet_p1007.fw.gz
doins "${WORKDIR}"/plugins/hp_laserjet_p1008.fw.gz
doins "${WORKDIR}"/plugins/hp_laserjet_p1505.fw.gz
sed -i -e "s:version\=2\.8\.12:version\=2\.8\.12\\nplugin \= 1:" "${D}"/etc/hp/hplip.conf || die "sed failed"
fi
# bug 106035
use qt3 || use qt4 || rm -Rf "${D}"/usr/share/applications
use minimal && rm -rf "${D}"/usr/lib
# install docs
cp -af "${S}"/doc/* "${D}"/usr/share/doc/hplip-${PV}
}
pkg_preinst() {
# avoid collisions with cups-1.2 compat symlinks
if [ -e "${ROOT}"/usr/lib/cups/backend/hp ] && [ -e "${ROOT}"/usr/libexec/cups/backend/hp ]; then
rm -f "${ROOT}"/usr/libexec/cups/backend/hp{,fax};
fi
}
pkg_postinst() {
python_mod_optimize /usr/share/${PN}
elog "You should run hp-setup as root if you are installing hplip for the first time, and may also"
elog "need to run it if you are upgrading from an earlier version."
elog
elog "If your device is connected using USB, users will need to be in the lp group to access it."
elog
elog "This release doesn't use an init script anymore, so you should probably do a"
elog "'rc-update del hplip' if you are updating from an old version."
}
pkg_postrm() {
python_mod_cleanup /usr/share/${PN}
}
|
|
|
Back to top |
|
|
ferreirafm Guru
Joined: 28 Jul 2005 Posts: 487 Location: Sao Paulo, Brazil
|
Posted: Thu Mar 19, 2009 5:18 pm Post subject: |
|
|
phixth,
I have changed the hplip-2.8.6b.ebuild to enable foomatic, but cant emerge it. The portage complains that the package have been mask because corruption.
Any clues are welcome. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|