aboutsummaryrefslogtreecommitdiff
path: root/print/hplip
diff options
context:
space:
mode:
authorDeposite Pirate2018-09-16 18:48:36 +0200
committerDeposite Pirate2018-09-16 18:48:36 +0200
commitd150a5f3e462fa7fe194a805a4aa0076f4d03ab9 (patch)
treece5e44d69c5f3175bfdbd1e3717b52c5dcca5638 /print/hplip
parentf29d3519ce073ec30f99754d93304324f7f26d65 (diff)
Add ports.
Diffstat (limited to 'print/hplip')
-rw-r--r--print/hplip/hplip-3.13.5-cups161fix.patch.xzbin0 -> 2632 bytes
-rw-r--r--print/hplip/hplip-3.13.5-desktopfile.patch.xzbin0 -> 552 bytes
-rw-r--r--print/hplip/hplip-3.13.5-libnotify.patch.xzbin0 -> 352 bytes
-rw-r--r--print/hplip/hplip-3.13.5-typo.patch.xzbin0 -> 396 bytes
-rwxr-xr-xprint/hplip/hplip.build123
5 files changed, 123 insertions, 0 deletions
diff --git a/print/hplip/hplip-3.13.5-cups161fix.patch.xz b/print/hplip/hplip-3.13.5-cups161fix.patch.xz
new file mode 100644
index 0000000..63dbc24
--- /dev/null
+++ b/print/hplip/hplip-3.13.5-cups161fix.patch.xz
Binary files differ
diff --git a/print/hplip/hplip-3.13.5-desktopfile.patch.xz b/print/hplip/hplip-3.13.5-desktopfile.patch.xz
new file mode 100644
index 0000000..87292ce
--- /dev/null
+++ b/print/hplip/hplip-3.13.5-desktopfile.patch.xz
Binary files differ
diff --git a/print/hplip/hplip-3.13.5-libnotify.patch.xz b/print/hplip/hplip-3.13.5-libnotify.patch.xz
new file mode 100644
index 0000000..b72df06
--- /dev/null
+++ b/print/hplip/hplip-3.13.5-libnotify.patch.xz
Binary files differ
diff --git a/print/hplip/hplip-3.13.5-typo.patch.xz b/print/hplip/hplip-3.13.5-typo.patch.xz
new file mode 100644
index 0000000..8b28786
--- /dev/null
+++ b/print/hplip/hplip-3.13.5-typo.patch.xz
Binary files differ
diff --git a/print/hplip/hplip.build b/print/hplip/hplip.build
new file mode 100755
index 0000000..37ffcfa
--- /dev/null
+++ b/print/hplip/hplip.build
@@ -0,0 +1,123 @@
+#!/bin/bash
+#
+# Maintainer: Deposite Pirate <ofni.sknuplatem@etaripd>
+
+source /usr/src/ports/Build/build.sh
+
+NAME=hplip
+VERSION=3.13.5
+BUILD=1
+DEPENDS=('ghostscript >= 9.06-1' 'snmp >= 5.7.2-1' 'dbus >= 1.6.8-1')
+OPTDEPENDS=('usb >= 1.0.15-1' 'cups >= 1.6.2-1' 'python >= 2.7.4-1')
+
+# Description
+
+cat > ${PKG}/install/slack-desc <<EOF
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+$(padd)|-----handy-ruler------------------------------------------------------|
+${NAME}: hplip (HP print/scan/fax support)
+${NAME}:
+${NAME}: HPLIP is an HP developed solution for printing, scanning, and faxing
+${NAME}: with HP inkjet and laser based printers in Linux. The HPLIP project
+${NAME}: provides printing support for more than 1400 HP printer models,
+${NAME}: including Deskjet, Officejet, Photosmart, PSC (Print Scan Copy),
+${NAME}: Business Inkjet, LaserJet, and LaserJet MFP.
+${NAME}:
+${NAME}: Homepage: http://hplipopensource.com
+${NAME}:
+${NAME}:
+EOF
+
+cat >> ${PKG}/install/doinst.sh <<EOF
+#!/bin/sh
+
+if [ -x usr/bin/update-desktop-database ]; then
+ usr/bin/update-desktop-database usr/share/applications >/dev/null 2>&1
+fi
+EOF
+
+# Sources
+
+SRCNAME[0]=${NAME}
+SRCVERS[0]=${VERSION}
+SRCPACK[0]=${URL[sf]}/${SRCNAME[0]}/${SRCNAME[0]}/${SRCVERS[0]}/${SRCNAME[0]}-${SRCVERS[0]}.tar.gz
+SRCCOPY[0]="GPL2 BSD3 MIT"
+
+build0()
+{
+find . -type f -exec sed -i 's~^#.*env python~#!/usr/bin/env python2~' {} +
+find . -name "*.py" -exec sed -i '1s|#!/usr/bin/python|#!/usr/bin/python2|' {} +
+sed -i 's|python ./print.py|python2 ./print.py|' scan.py
+sed -i 's|python ./testpage.py|python2 ./testpage.py|' setup.py
+sed -i 's|python ./setup.py|python2 ./setup.py|' ui4/devmgr5.py ui4/nodevicesdialog.py
+sed -i 's|python %HOME%|python2 %HOME%|' base/utils.py
+sed -i 's|python ./plugin.py|python2 ./plugin.py|' base/pkit.py
+# https://bugs.archlinux.org/task/30085 - hack found in Gentoo
+# Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip
+# The hpcups driver does not use foomatic-rip
+(
+ cd ppd/hpijs
+ for file in *.ppd.gz; do
+ rm -f ${file}.temp
+ gunzip -c ${file} | sed 's|foomatic-rip-hplip|foomatic-rip|g' | gzip > ${file}.temp
+ mv ${file}.temp ${file}
+ done
+)
+#LIBS="-Wl,--as-needed $(pkg-config libusb --libs)"
+export PYTHON=python2
+sed -i 's|/usr/lib/systemd/system|/usr/share/systemd/system|g' Makefile.{am,in}
+CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \
+./configure \
+ --build="${ARCH}-slackware-linux" \
+ --host="${ARCH}-slackware-linux" \
+ --disable-dependency-tracking \
+ --enable-static=no \
+ --enable-shared=yes \
+ --prefix=/usr \
+ --mandir="${SYS_DIR[man]}" \
+ --sysconfdir="${SYS_DIR[etc]}" \
+ --libdir="${SYS_DIR[lib]}" \
+ --localstatedir="${SYS_DIR[var]}" \
+ --docdir="${SYS_DIR[html]}/${SRCNAME[0]}" \
+ --with-docdir="${SYS_DIR[html]}/${SRCNAME[0]}" \
+ --with-cupsbackenddir="${SYS_DIR[lib]}/exec/cups/backend" \
+ --with-cupsfilterdir="${SYS_DIR[lib]}/exec/cups/filter" \
+ --with-hpppddir="${SYS_DIR[share]}/cups/model/HP" \
+ --with-drvdir="${SYS_DIR[share]}/cups/drv/hp" \
+ --disable-foomatic-rip-hplip-install \
+ --enable-foomatic-ppd-install \
+ --enable-foomatic-drv-install \
+ --enable-hpcups-install \
+ --enable-new-hpcups \
+ --enable-pp-build \
+ --enable-cups-ppd-install \
+ --enable-cups-drv-install \
+ --enable-hpijs-install \
+ --enable-network-build=yes \
+ --enable-shadow-build \
+ --disable-scan-build \
+ --enable-gui-build \
+ --enable-fax-build \
+ --enable-qt4 \
+ --enable-policykit \
+ --enable-udev-acl-rules
+#FIXME: --enable-scan-build when we have sane
+#FIXME: PAM
+make ${JOBS}
+make install DESTDIR="${PKG}" rulesdir="${SYS_DIR[udevrules]}"
+mv \
+ ${PKG}${SYS_DIR[etc]}/cron.daily/hplip_cron \
+ ${PKG}${SYS_DIR[etc]}/cron.daily/hplip
+# Log dir should not be world writeable
+chmod 775 \
+ ${PKG}${SYS_DIR[var]}/log/{hp,hp/tmp}
+rm -rf \
+ ${PKG}${SYS_DIR[etc]}/{sane.d,xdg} \
+ ${PKG}${SYS_DIR[share]}/hal
+}