From patchwork Wed Mar 13 19:36:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Schonken X-Patchwork-Id: 227339 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 9C7ED2C0091 for ; Thu, 14 Mar 2013 06:36:58 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id CF05610BA59; Wed, 13 Mar 2013 19:36:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7VmbHDltTZbn; Wed, 13 Mar 2013 19:36:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id A86F710B978; Wed, 13 Mar 2013 19:36:23 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 811D68F74B for ; Wed, 13 Mar 2013 19:36:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D33368C9DE for ; Wed, 13 Mar 2013 19:36:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ddbz2YNOjD+F for ; Wed, 13 Mar 2013 19:36:36 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-we0-f179.google.com (mail-we0-f179.google.com [74.125.82.179]) by whitealder.osuosl.org (Postfix) with ESMTPS id CBD458C710 for ; Wed, 13 Mar 2013 19:36:35 +0000 (UTC) Received: by mail-we0-f179.google.com with SMTP id p43so1344165wea.38 for ; Wed, 13 Mar 2013 12:36:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=Atv7cUEtwAzz6AJ7CuNBRBBD2zCQy4YkJ4rAsRFTn7M=; b=xpFbgO5WERDqOI77zqI3/Ys6aTVk/k7UGL+n5rn0neiz3jms/DVskH/St6QHN5yXvJ bb1/hPXPAIJht7BzG9NKbaCsHmTfqXTPY4Nvcv+CYQPs4DrdN9128kXmhrDqB0nt49as XEhKAuLr7PctJ/A1nrvC2cLWTH+dc5bZobilgchTC9oeKoKZcS1xtNOMGHgBD/gWk7jr 0x2ooH5k7+yTaR5eJEfnrqQuwO1iN76n13bEkHe6DePrWdvfe6rhzTYEGek+wEYFhFI3 aMG2jJn94hQlKyh15kR0ArleGRfOCm7Fg/yepmxGT03bwKH9aRTzXwd4JJlVkRQ2VGSY dLAw== X-Received: by 10.181.11.164 with SMTP id ej4mr29587836wid.29.1363203394239; Wed, 13 Mar 2013 12:36:34 -0700 (PDT) Received: from incognito-desktop.nomad.org (41-135-144-50.dsl.mweb.co.za. [41.135.144.50]) by mx.google.com with ESMTPS id ex1sm5197002wib.7.2013.03.13.12.36.32 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Mar 2013 12:36:33 -0700 (PDT) From: Olivier Schonken To: buildroot@busybox.net Date: Wed, 13 Mar 2013 21:36:08 +0200 Message-Id: <1363203368-19909-1-git-send-email-olivier.schonken@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <20130304084108.GB10626@sapphire.tkos.co.il> References: <20130304084108.GB10626@sapphire.tkos.co.il> Cc: Olivier Schonken Subject: [Buildroot] [PATCHv3] Added package HPLIP for printing to HP printers X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net HPLIP (Hewlett-Packard Linux Imaging & Printing) is an HP-developed solution for printing, scanning, and faxing with HP inkjet and laser based printers in Linux. The --includedir=$(STAGING_DIR)/usr/include is unfortunately necessary even with the modified Makefile.am for a succesful build. Created a menu for cups related components to be kept close together. Fixed a jpeg and dbus dependencies, Thanks for pointing out the dbus dependency Baruch. Signed-off-by: Olivier Schonken --- package/Config.in | 3 ++ package/hplip/Config.in | 15 ++++++++ package/hplip/hplip-fix-make.patch | 74 ++++++++++++++++++++++++++++++++++++ package/hplip/hplip.mk | 52 +++++++++++++++++++++++++ 4 files changed, 144 insertions(+) create mode 100644 package/hplip/Config.in create mode 100644 package/hplip/hplip-fix-make.patch create mode 100644 package/hplip/hplip.mk diff --git a/package/Config.in b/package/Config.in index a65054c..21c3ec9 100644 --- a/package/Config.in +++ b/package/Config.in @@ -631,7 +631,10 @@ source "package/can-utils/Config.in" source "package/connman/Config.in" source "package/ctorrent/Config.in" source "package/conntrack-tools/Config.in" +menu "cups (common unix printing system)" source "package/cups/Config.in" +source "package/hplip/Config.in" +endmenu #cups if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/dhcp/Config.in" endif diff --git a/package/hplip/Config.in b/package/hplip/Config.in new file mode 100644 index 0000000..4c673e6 --- /dev/null +++ b/package/hplip/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_HPLIP + bool "hplip" + depends on BR2_PACKAGE_CUPS + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_JPEG + help + HP Linux Imaging and Printing (HPLIP) + HPLIP is an HP-developed solution for printing, scanning, and faxing + with HP inkjet and laser based printers in Linux. The HPLIP project + provides printing support for 2,211 printer models, including + Deskjet, Officejet, Photosmart, PSC (Print Scan Copy), Business + Inkjet, LaserJet, Edgeline MFP, and LaserJet MFP. + + http://hplipopensource.com/ + diff --git a/package/hplip/hplip-fix-make.patch b/package/hplip/hplip-fix-make.patch new file mode 100644 index 0000000..8f4aab5 --- /dev/null +++ b/package/hplip/hplip-fix-make.patch @@ -0,0 +1,74 @@ +From 6019d012246578ae1a191d3510284e7b894fb528 Mon Sep 17 00:00:00 2001 +From: Olivier Schonken +Date: Sat, 2 Mar 2013 18:01:03 +0200 +Subject: [PATCH] Changed Makefile.am to allow cross-compilation of HPLIP + +Signed-off-by: Olivier Schonken +--- + Makefile.am | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 16ea902..b22f46a 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -72,7 +72,7 @@ libhpmud_la_SOURCES = io/hpmud/hpmud.c io/hpmud/mlc.c io/hpmud/model.c io/hpmud/ + io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/pml.h io/hpmud/dot4.c \ + io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h io/hpmud/musb.h io/hpmud/musb_libusb01.c + else +-libhpmud_la_CFLAGS = -I/usr/include/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\" ++libhpmud_la_CFLAGS = -I$(includedir)/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\" + libhpmud_la_SOURCES = io/hpmud/hpmud.c io/hpmud/mlc.c io/hpmud/model.c io/hpmud/pml.c \ + io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/pml.h io/hpmud/dot4.c \ + io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h io/hpmud/musb.h io/hpmud/musb.c +@@ -292,7 +292,7 @@ hpmudext_la_LIBADD = libhpmud.la + if LIBUSB01_BUILD + hpmudext_la_CFLAGS = -I$(PYTHONINCLUDEDIR) + else +-hpmudext_la_CFLAGS =-I/usr/include/libusb-1.0 -I$(PYTHONINCLUDEDIR) ++hpmudext_la_CFLAGS =-I$(includedir)/libusb-1.0 -I$(PYTHONINCLUDEDIR) + endif + + # ui (qt3) +@@ -551,26 +551,26 @@ endif + + install-dist_hplip_LogDATA: + if FULL_BUILD +- test -z "$(DESTDIR)$(hplip_Logdir)" || mkdir -p $(DESTDIR)$(hplip_Logdir) +- chgrp "lp" -R $(DESTDIR)$(hplip_Logdir) +- chmod 777 $(DESTDIR)$(hplip_Logdir) ++# test -z "$(DESTDIR)$(hplip_Logdir)" || mkdir -p $(DESTDIR)$(hplip_Logdir) ++# chgrp "lp" -R $(DESTDIR)$(hplip_Logdir) ++# chmod 777 $(DESTDIR)$(hplip_Logdir) + endif #FULL_BUILD + if HPLIP_BUILD +- test -z "$(DESTDIR)$(hplip_Logdir)" || mkdir -p $(DESTDIR)$(hplip_Logdir) +- chgrp "lp" -R $(DESTDIR)$(hplip_Logdir) +- chmod 777 $(DESTDIR)$(hplip_Logdir) ++# test -z "$(DESTDIR)$(hplip_Logdir)" || mkdir -p $(DESTDIR)$(hplip_Logdir) ++# chgrp "lp" -R $(DESTDIR)$(hplip_Logdir) ++# chmod 777 $(DESTDIR)$(hplip_Logdir) + endif #FULL_BUILD + + install-dist_hplip_tmpDATA: + if FULL_BUILD +- test -z "$(DESTDIR)$(hplip_tmpdir)" || mkdir -p $(DESTDIR)$(hplip_tmpdir) +- chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir) +- chmod 1777 $(DESTDIR)$(hplip_tmpdir) ++# test -z "$(DESTDIR)$(hplip_tmpdir)" || mkdir -p $(DESTDIR)$(hplip_tmpdir) ++# chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir) ++# chmod 1777 $(DESTDIR)$(hplip_tmpdir) + endif #FULL_BUILD + if HPLIP_BUILD +- test -z "$(DESTDIR)$(hplip_tmpdir)" || mkdir -p $(DESTDIR)$(hplip_tmpdir) +- chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir) +- chmod 1777 $(DESTDIR)$(hplip_tmpdir) ++# test -z "$(DESTDIR)$(hplip_tmpdir)" || mkdir -p $(DESTDIR)$(hplip_tmpdir) ++# chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir) ++# chmod 1777 $(DESTDIR)$(hplip_tmpdir) + endif #FULL_BUILD + + install-dist_cronDATA:$(dist_cron_DATA) +-- +1.7.10.4 + diff --git a/package/hplip/hplip.mk b/package/hplip/hplip.mk new file mode 100644 index 0000000..1bfac40 --- /dev/null +++ b/package/hplip/hplip.mk @@ -0,0 +1,52 @@ +############################################################# +# +# hplip +# +############################################################# + +HPLIP_VERSION = 3.12.11 +HPLIP_SITE = http://downloads.sourceforge.net/hplip/hplip/ +HPLIP_AUTORECONF = YES +HPLIP_DEPENDENCIES = cups libusb jpeg + +HPLIP_CONF_OPT = \ + --disable-qt4 \ + --disable-scan-build \ + --disable-gui-build \ + --disable-doc-build \ + --disable-network-build \ + --enable-hpcups-install \ + --disable-hpijs-install \ + --enable-cups-ppd-install \ + --enable-cups-drv-install \ + --disable-foomatic-ppd-install \ + --disable-foomatic-drv-install \ + --disable-foomatic-rip-hplip-install \ + --enable-new-hpcups \ + --enable-lite-build \ + --with-sysroot=$(STAGING_DIR) \ + --includedir=$(STAGING_DIR)/usr/include + +ifeq ($(BR2_PACKAGE_DBUS),y) + HPLIP_CONF_OPT += --enable-dbus-build + HPLIP_DEPENDENCIES += dbus +else + HPLIP_CONF_OPT += --disable-dbus-build +endif + +define HPLIP_POST_INSTALL_TARGET_FIXUP + mkdir -p $(TARGET_DIR)/usr/share/hplip/data/models + cp $(@D)/data/models/* $(TARGET_DIR)/usr/share/hplip/data/models +endef +HPLIP_POST_INSTALL_TARGET_HOOKS += HPLIP_POST_INSTALL_TARGET_FIXUP + +define HPLIP_PRE_CONFIGURE_FIXUP + touch $(@D)/AUTHORS + touch $(@D)/ChangeLog + touch $(@D)/CHANGES + touch $(@D)/NEWS + touch $(@D)/README +endef +HPLIP_PRE_CONFIGURE_HOOKS += HPLIP_PRE_CONFIGURE_FIXUP + +$(eval $(autotools-package))