initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

143
hplip-drivers/PKGBUILD Normal file
View File

@@ -0,0 +1,143 @@
# Maintainer: Jesus E. <heckyel@riseup.net>
pkgname=hplip-drivers
_pkgname=hplip
pkgver=3.21.2
_debver=$pkgver
_debrel=2
pkgrel=2
pkgdesc="Free and libre device drivers for HP-printer (DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet)"
arch=('i686' 'x86_64')
url='https://developers.hp.com/hp-linux-imaging-and-printing'
license=('GPL-2' 'GPL-3' 'Expat' 'Modified-BSD')
depends=('ghostscript' 'net-snmp' 'foomatic-db-engine' 'python')
makedepends=('sane' 'cups' 'libusb' 'quilt')
optdepends=('cups: for printing support'
'sane: for scanner support'
'xsane: sane scanner frontend'
'libusb: for advanced usb support')
backup=('etc/hp/hplip.conf'
'etc/sane.d/dll.d/hpaio')
source=(https://downloads.sourceforge.net/${_pkgname}/${_pkgname}-${pkgver}.tar.gz{,.asc}
https://deb.debian.org/debian/pool/main/h/hplip/hplip_${_debver}+dfsg1-${_debrel}.debian.tar.xz
disable_upgrade.patch
add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
remove-systemd-support.patch)
sha512sums=('73ba37275cfe34a58b81c9656514e15da67c1a69af5471ad132a1538d324efe640879cb7e60c359915607e41b63e653e7ae757661e553235f6e83e378ab46474'
'SKIP'
'771bfae13f452f637696ef7947e95c21e5cb514cd613fb15d182f0e0fbb02ce60684c75a7cb8245423bbcffe2c7d1a155f4109fe1769b0badb7d006bb9406ff2'
'6abd3b3fbc827b9a618e54b3b96b6fa574fa6477845ed385ebd972c26eeb33139591ddc808d110fbb19ce9e002898590b900cc8dcbc933fd837de781f9ada71f'
'22aeb5b851f78bc6bc62e0bc3da99fecaf42d7604af41e2f3343f8d3666541f7b06b7d1a7d0ddf24f1731ac7b12dfe582375a98e3b94dfa323d6ce954549ca67'
'abd64e02965190cdfb7f7fd65d1875da4420594b627cd85b7f1da1f69a823b55358146e02d81e50e90000e21ba6e69d25fbb785dd489f1f3f461e50ce16f11e7')
validpgpkeys=('4ABA2F66DBD5A95894910E0673D770CDA59047B9') # HPLIP (HP Linux Imaging and Printing) <hplip@hp.com>
prepare() {
cd $_pkgname-$pkgver
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
# Debian patches
export QUILT_PATCHES=debian/patches
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
export QUILT_DIFF_ARGS='--no-timestamps'
mv "$srcdir"/debian .
# Doesn't apply
rm -v debian/patches/0022-LaserJet-PostScript-4000-PPD-bugfix.patch || true
rm -v debian/patches/0052-IEEE1284-Device-ID-for-HP-LaserJet-4000.patch || true
rm -v debian/patches/0053-Fix-ImageableArea-for-Laserjet-8150-9000.patch || true
quilt push -av
else
# add missing 'include <cups/ppd.h>' at various places
patch -Np1 -i ${srcdir}/0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
fi
# based on https://devel.trisquel.info/trisquel/package-helpers/raw/master/helpers/make-hplip
# keep header license
sed '/\[/,99999d' data/models/models.dat > mktemp
for model in $(grep '\[' data/models/models.dat | sed 's/\[//; s/\]//'); do
sed -n "/\[$model\]/,/^$/p;" data/models/models.dat > mktemp1
grep '^download=True' -q mktemp1 && continue
grep '^plugin=1' -q mktemp1 && continue
grep '^support-type=0' -q mktemp1 && continue
cat mktemp1 >> mktemp
done
sed -i 's/plugin=2/plugin=0/g' mktemp
cp mktemp data/models/models.dat
rm -v mktemp{,1}
# remove systemd support
patch -p1 -i ../remove-systemd-support.patch
# remove nonfree software recommendation
sed -i 's/\, requires proprietary plugin//' $(grep -rlI '[,] requires proprietary plugin')
# disable insecure update
patch -Np0 -i ${srcdir}/disable_upgrade.patch
export AUTOMAKE='automake --foreign'
autoreconf --force --install
}
build() {
cd $_pkgname-$pkgver
# disable dbus for build including fax
# avahi is needed for network also disabled
# no gui-support needed furthermore
./configure --prefix=/usr \
--with-cupsbackenddir=/usr/libexec/cups/backend \
--with-cupsfilterdir=/usr/libexec/cups/filter \
--enable-hpcups-install \
--enable-new-hpcups \
--enable-cups-ppd-install \
--enable-cups-drv-install \
--enable-foomatic-drv-install \
--enable-foomatic-ppd-install \
--enable-pp-build \
--disable-dbus-build \
--disable-fax-build \
--disable-gui-build \
--disable-qt3 \
--disable-qt4 \
--disable-qt5 \
--disable-foomatic-rip-hplip-install \
--disable-polkit \
--disable-network-build \
--disable-doc-build
make
}
package() {
cd $_pkgname-$pkgver
make -j1 rulesdir=/lib/udev/rules.d DESTDIR="$pkgdir/" install
# install license
install -Dm644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname
# remove config provided by sane and autostart of hp-daemon
rm -rf "$pkgdir"/etc/{sane.d,xdg}
install -dm755 ${pkgdir}/etc/sane.d/dll.d
echo hpaio > ${pkgdir}/etc/sane.d/dll.d/hpaio
# remove HAL .fdi file because HAL is no longer used
rm -vrf "$pkgdir"/usr/share/hal
# cleanup
rm -rf "$pkgdir"/usr/share/applications
rm -rf "$pkgdir"/usr/share/hplip/data/localization
rm -rf "$pkgdir"/usr/bin
rm -rf "$pkgdir"/usr/share/hplip/*.py
rm -rf "$pkgdir"/usr/share/hplip/hplip_clean.sh
rm -rf "$pkgdir"/usr/share/hplip/scan
rm -rf "$pkgdir"/usr/share/hplip/prnt
rm -rf "$pkgdir"/usr/share/hplip/pcard
rm -rf "$pkgdir"/usr/share/hplip/installer
rm -rf "$pkgdir"/usr/share/hplip/copier
rm -rf "$pkgdir"/usr/share/hplip/base
}

View File

@@ -0,0 +1,50 @@
From b3a7fa4d4a573cfe0073ae50197f679af7e3a0ac Mon Sep 17 00:00:00 2001
From: Till Kamppeter <till.kamppeter@canonical.com>
Date: Sat, 24 Sep 2016 10:37:20 +0200
Subject: Add 'include <cups/ppd.h>' in various places as CUPS 2.2 moved some
definitions to ppd.h
---
configure.in | 2 +-
prnt/hpcups/HPCupsFilter.h | 2 ++
prnt/hpijs/hpcupsfax.cpp | 1 +
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/configure.in b/configure.in
index d3a1ddb..eabe14a 100755
--- a/configure.in
+++ b/configure.in
@@ -554,7 +554,7 @@ fi
if test "$hpijs_only_build" = "no" && test "$hpcups_only_build" = "no"; then
AC_CHECK_LIB([cups], [cupsDoFileRequest], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libcups support], 9)])
- AC_CHECK_HEADERS(cups/cups.h, ,[AC_MSG_ERROR([cannot find cups-devel support], 3)])
+ AC_CHECK_HEADERS(cups/cups.h cups/ppd.h, ,[AC_MSG_ERROR([cannot find cups-devel support], 3)])
if test "$libusb01_build" = "yes"; then
AC_CHECK_LIB([usb], [usb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb support], 2)])
AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)])
diff --git a/prnt/hpcups/HPCupsFilter.h b/prnt/hpcups/HPCupsFilter.h
index ff5548e..c517989 100644
--- a/prnt/hpcups/HPCupsFilter.h
+++ b/prnt/hpcups/HPCupsFilter.h
@@ -38,6 +38,8 @@
#include "dbuscomm.h"
+#include <cups/ppd.h>
+
#define DBITMAPFILEHEADER 14
#define DBITMAPINFOHEADER 40
diff --git a/prnt/hpijs/hpcupsfax.cpp b/prnt/hpijs/hpcupsfax.cpp
index 8514775..994e50f 100644
--- a/prnt/hpijs/hpcupsfax.cpp
+++ b/prnt/hpijs/hpcupsfax.cpp
@@ -43,6 +43,7 @@
#include <arpa/inet.h>
#include <math.h>
#include <cups/cups.h>
+#include <cups/ppd.h>
#include <cups/raster.h>
#include <string>
#ifdef FALSE

View File

@@ -0,0 +1,14 @@
--- upgrade.py.orig 2013-10-31 12:46:54.000000000 +0100
+++ upgrade.py 2013-12-04 14:58:03.000000000 +0100
@@ -134,6 +134,11 @@ except getopt.GetoptError, e:
if os.getenv("HPLIP_DEBUG"):
log.set_level('debug')
+
+log.error("HPLIP upgrade is disabled by Hyperbola for security reasons - if you like to upgrade HPLIP, use the Hyperbola software package manager hyperman.")
+clean_exit(1)
+
+
for o, a in opts:
if o in ('-h', '--help'):
usage()

View File

@@ -0,0 +1,30 @@
diff --git a/Makefile.am b/Makefile.am
index 2e7cb27..20b33c4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -120,10 +120,6 @@ libhpip_la_SOURCES = ip/xconvolve.c ip/xfax.c ip/xgrayout.c ip/xjpg_dct.c ip/xjp
ip/hpip.h ip/ipdefs.h ip/xform.h ip/xjpg_dct.h ip/xjpg_huf.h ip/xjpg_mrk.h
-#hpmud rules data dir
-rulessystemdir=/usr/lib/systemd/system
-dist_rulessystem_DATA =data/rules/hplip-printer@.service
-
# hpmud.rules
rulesdir = /etc/udev/rules.d
if UDEV_SYSFS_RULES
diff --git a/Makefile.in b/Makefile.in
index 0745c8b..cbe6581 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -4823,10 +4823,6 @@ cups_drv = prnt/drv/hpcups.drv
@HPLIP_BUILD_TRUE@ ip/hpip.h ip/ipdefs.h ip/xform.h ip/xjpg_dct.h ip/xjpg_huf.h ip/xjpg_mrk.h
-#hpmud rules data dir
-@HPLIP_BUILD_TRUE@rulessystemdir = /usr/lib/systemd/system
-@HPLIP_BUILD_TRUE@dist_rulessystem_DATA = data/rules/hplip-printer@.service
-
# hpmud.rules
@HPLIP_BUILD_TRUE@rulesdir = /etc/udev/rules.d
@HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_FALSE@dist_rules_DATA = data/rules/56-hpmud.rules