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