wok-current view hplip/receipt @ rev 25701

Fix dep for libglamoregl.so (libepoxy), and miss file for amdgpu (thanks alanyih)
author Stanislas Leduc <shann@slitaz.org>
date Fri Apr 19 12:48:51 2024 +0000 (2 months ago)
parents 3ad63c8fc2f9
children
line source
1 # SliTaz package receipt.
3 PACKAGE="hplip"
4 VERSION="3.20.5"
5 CATEGORY="system-tools"
6 TAGS="printer driver printing"
7 SHORT_DESC="Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet."
8 MAINTAINER="jozee@slitaz.org"
9 LICENSE="GPL2"
10 WEB_SITE="https://hplipopensource.com/"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
15 DEPENDS="cups dbus-python gcc-lib-base ghostscript jpeg libexif
16 libgphoto2 libltdl libusb libv4l net-snmp python3
17 python3-distro python3-pillow sane-backends tiff"
18 BUILD_DEPENDS="cups-dev dbus-dev dbus-python dbus-python-dev gawk
19 ghostscript-dev jpeg-dev libexif-dev libgphoto2-dev libtool
20 libusb-dev net-snmp-dev openssl-dev pkg-config python3
21 python3-dev Qt4-dev sane-backends-dev tiff-dev"
23 # Take long long time for recompress, need check why
24 COOKOPTS="!gz !menus"
26 BUGS="Unable to delete hplip.desktop from $fs. Using hack in post_install."
28 # What is the latest version available today?
29 current_version()
30 {
31 wget -O - https://sourceforge.net/projects/hplip/files/hplip/ 2>/dev/null | \
32 sed '/scope="row/!d;/\/[0-9]/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
33 sed '/scope="row/!d;s|.*/hplip/||;s|/.*||;q'
34 }
36 # Rules to configure and make the package.
37 compile_rules()
38 {
39 grep -lr 'uname -m' . | xargs sed -i 's|uname -m|echo i686|'
41 # Patch from slackware
42 patch -p1 < $stuff/hplip.no.upgrade.diff
43 patch -p1 < $stuff/setup.py.lc_all.c.diff
44 patch -p1 < $stuff/hplip.python3.shebang.diff
45 patch -p1 < $stuff/hplip.is_alive.diff
46 patch -p1 < $stuff/hplip.python3.10.diff
48 find -name '*.py' -print0 | xargs -0 \
49 sed -i.env-python -e 's,^#!/usr/bin/env python,#!/usr/bin/python3,'
50 sed -i.env-python -e 's,^#!/usr/bin/env python,#!/usr/bin/python3,' \
51 prnt/filters/hpps fax/filters/pstotiff
53 patch -p1 < $stuff/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch
54 patch -p1 < $stuff/0021-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
56 # autoreconf will fail if these files do not exist:
57 for file in NEWS README AUTHORS ChangeLog ; do
58 if [ ! -r $file ]; then
59 touch $file
60 fi
61 done
63 # Needed because Makefile.am was patched:
64 autoreconf -vif
66 PYTHON=/usr/bin/python3 \
67 ./configure \
68 --prefix=/usr \
69 --with-cupsbackenddir=/usr/lib/cups/backend \
70 --with-cupsfilterdir=/usr/lib/cups/filter \
71 --sysconfdir=/etc \
72 --disable-doc-build \
73 --enable-qt4 \
74 $CONFIGURE_ARGS &&
75 make &&
76 make -j 1 DESTDIR=$DESTDIR install
77 }
79 # Rules to gen a SliTaz package suitable for Tazpkg.
80 genpkg_rules()
81 {
82 mkdir -p $fs/etc
83 mkdir -p $fs/usr/lib
84 mkdir -p $fs/usr/share
86 cp -a $install/etc $fs
87 #cp -a $install/var $fs
88 cp -a $install/usr/bin $fs/usr
89 cp -a $install/usr/lib/cups $fs/usr/lib
90 cp -a $install/usr/lib/python* $fs/usr/lib
91 cp -a $install/usr/lib/sane $fs/usr/lib
92 #cp -a $install/usr/lib/hal $fs/usr/lib
93 cp -a $install/usr/lib/*so* $fs/usr/lib
94 cp -a $install/usr/share/cups $fs/usr/share
95 cp -a $install/usr/share/hplip $fs/usr/share
96 cp -a $install/usr/share/ppd $fs/usr/share
97 cp -a $install/usr/share/app* $fs/usr/share
99 # compress non-zipped ppd files
100 find $fs/usr/share/ppd/HP -name "*.ppd" -exec gzip -n9 {} \;
102 # Split UI to hplip-gui
103 for file in $(cat $WOK/hplip-gui/stuff/wanted-files.list)
104 do
105 rm ${fs}$file
106 done
107 # Remove desktop files
108 rm -rf $fs/usr/share/applications
110 # remove hp-uninstall / hp-upgrade
111 rm $fs/usr/bin/hp-uninstall $fs/usr/bin/hp-upgrade
112 rm $fs/usr/share/hplip/uninstall.py
113 rm $fs/usr/share/hplip/upgrade.py
115 # remove autostart of hp-daemon
116 rm -rf $fs/etc/sane.d
118 # remove xdg
119 rm -rf $fs/etc/xdg
120 }
122 post_install()
123 {
124 tazpkg reconfigure udev --root="$1"
125 }