Ok, I install the base-devel packages and copied the raw PKGBUILD script into Kate and saved it the folder ~/dev/build/hplip - I commented out lines 20, 21, 23, 24:
pkgna
me=hplip
pkgver=3.18.6
# incase a or b is used in hplip rls:
_pkgver=3.18.6
pkgrel=2
pkgdesc="Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet."
arch=('x86_64')
url="https://developers.hp.com/hp-linux-imaging-and-printing"
license=('GPL')
depends=('ghostscript' 'foomatic-db' 'foomatic-db-engine' 'cups'
'net-snmp' 'libusb' 'wget' 'python3-gobject3' 'pyqt5-python3')
makedepends=('pkgconfig' 'sane' 'rpcbind' 'dbus-python3')
optdepends=('dbus-python3: for dbus support'
'sane: for scanner support'
'rpcbind: for network support')
options=('!libtool')
install=${pkgname}.install
source=("https://downloads.sourceforge.net/hplip/${pkgname}-${_pkgver}.tar.gz"
# "https://launchpadlibrarian.net/281975878/patch"
# 'cups-2.2.patch')
md5sums=('3857eae76c49c00fa185628d4dce7d61'
# 'c873eb40c9e3fa794637523400190218'
# 'ceb7449b12e2ecf70f898bc50b161a3c')
build() {
cd ${pkgname}-${_pkgver}
find . -type f -exec sed -i 's~^#.*env python~#!/usr/bin/env python3~' {} +
sed -i '1s|#!/usr/bin/python|#!/usr/bin/python3|' doctor.py setup.py makeuri.py logcapture.py base/magic.py
sed -i '1s|#!/usr/bin/python|#!/usr/bin/python3|' ui/upgradeform.py uninstall.py upgrade.py config_usb_printer.py
sed -i 's|python ./print.py|python3 ./print.py|' scan.py
sed -i 's|python ./testpage.py|python3 ./testpage.py|' setup.py
sed -i 's|python %HOME%|python3 %HOME%|' base/utils.py
sed -i 's|python ./plugin.py|python3 ./plugin.py|' base/pkit.py
sed -i 's|/usr/bin/python|/usr/bin/python3|' data/rules/hplip-printer@.service
# https://github.com/KaOSx/main/issues/31, patch file prnt/filters/hpps
#patch -p2 -i ${srcdir}/patch
# cups 2.2 patch https://packages.debian.org/sid/hplip
#patch -p1 -i ${srcdir}/cups-2.2.patch
export AUTOMAKE='automake --foreign'
export PYTHON=/usr/bin/python3
autoreconf --force --install
./configure --prefix=/usr \
--disable-qt4 \
--enable-qt5 \
--enable-hpcups-install \
--enable-new-hpcups \
--enable-cups-ppd-install \
--enable-cups-drv-install \
--enable-pp-build
make
}
package() {
cd ${pkgname}-${_pkgver}
make rulesdir=/usr/lib/udev/rules.d DESTDIR=${pkgdir}/ install
# remove sane conflicts and obsolete files
rm -rf ${pkgdir}/etc/{sane.d,xdg}
rm -vrf ${pkgdir}/usr/share/hal
rm -vrf $pkgdir/etc/init.d
}
Then I ran makepkg -si and this is the output I get:
~ dev build hplip makepkg -si
/home/ezsit/dev/build/hplip/PKGBUILD: line 22: syntax error near unexpected token `('
/home/ezsit/dev/build/hplip/PKGBUILD: line 22: `md5sums=('3857eae76c49c00fa185628d4dce7d61''
==> ERROR: install file (hplip.install) does not exist or is not a regular file.
Any idea what I might be doing wrong?