aboutsummaryrefslogtreecommitdiffstats
path: root/testing/hplip/APKBUILD
blob: 8a0f4fcc77d834fe81569805e9e01c9c33af1ac1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org>
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Contributor: Valery Kartel <valery.kartel@gmail.com>
pkgname=hplip
pkgver=3.18.10
pkgrel=1
pkgdesc="Drivers for HP printers and scanners"
arch="x86 x86_64" # missing sane on several arches
url="http://hplipopensource.com"
license="GPL"
depends=""
makedepends="libjpeg-turbo-dev net-snmp-dev cups-dev libusb-dev sane-dev gawk"
subpackages="$pkgname-doc $pkgname-libs sane-backend-hpaio:sane"
source="https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
	fix-includes.patch
	types-musl.patch
	disable_upgrade.patch
	0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch
	"
builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	default_prepare
	update_config_guess
}

build() {
	cd "$builddir"
	./configure --prefix=/usr \
		--with-docdir=/usr/share/doc/$pkgname \
		--enable-lite-build \
		--disable-doc-build \
		--disable-gui-build \
		--disable-fax-build \
		--disable-dbus-build \
		--enable-cups-drv-install \
		--enable-cups-ppd-install
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make -j1 DESTDIR="$pkgdir" install
	rm -fr "$pkgdir"/usr/bin \
		"$pkgdir"/etc/udev \
		"$pkgdir"/etc/sane.d \
		"$pkgdir"/usr/share/hal \
		"$pkgdir"/usr/lib/systemd \
		"$pkgdir"/usr/lib/cups/filter/pstotiff
	install -m755 -D prnt/filters/hpps "$pkgdir"/usr/lib/cups/filter/hpps
}

sane() {
	depends="sane"
	pkgdesc="SANE backend for HP multi-function peripherals"
	provides="$pkgname-sane"
	mkdir -p "$subpkgdir"/usr/lib \
		"$subpkgdir"/etc/sane.d/dll.d
	mv "$pkgdir"/usr/lib/sane "$subpkgdir"/usr/lib
	echo "hpaio" > "$subpkgdir"/etc/sane.d/dll.d/hpaio
}

sha512sums="8e744608f1da0e24afbeea814973363d95bbff15a7430c8471d5a53c4a9e772b141e5cd7e69ea03826d1b2e4544e9aabaedc148f2b6577339ef9b2a6d4431c96  hplip-3.18.10.tar.gz
173f0c2bbf0daefc717282bf125d3fd94b3914da0754078c45b58b09ab841672aae9238ca8fc0448486a871e40fc50f960da17c1e07ad3f04053d217ed634498  fix-includes.patch
dbce7d859661b1a03847edf91db755c9b3d1ad7c2d3173741ecd89b954d1595d71f1adcbd481e81821ebd58cd9ae23adcef1cc026cfa09928fb0cba599781cd1  types-musl.patch
ac436b54aecc0c2a7fc0eb5ae8e28d483c1efd5bd9385b0a1480fb78b8ccdd28ef85db86a980aec5ca093e9095d5714f93df095bf606e9a9c919f07c64e29697  disable_upgrade.patch
8710e039626878270b8b7bc1569566274d935c84652d758e25ce8fe01c0f44d911148620bb494489e1238201c01f3ba255c19f7dc5c2ff0d45a5f2a79190286b  0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch"