aboutsummaryrefslogtreecommitdiffstats
path: root/main/cups/APKBUILD
blob: 46d029b80c6da64fd9b38308926133c827155936 (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cups
pkgver=1.6.2
pkgrel=4
pkgdesc="The CUPS Printing System"
url="http://www.cups.org/"
arch="all"
license="GPL"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs ipptool $pkgname-client
	$pkgname-lang"
depends_dev="openssl-dev zlib-dev"
makedepends="$depends_dev libpaper-dev dbus-dev libjpeg-turbo-dev"
depends="cups-client poppler-utils openssl dbus"
install="cups.pre-install"
pkggroups="lp lpadmin"
pkgusers="lp"
replaces="cups-doc"
source="http://www.cups.org/software/$pkgver/$pkgname-$pkgver-source.tar.bz2
	$pkgname.logrotate
	cupsd.initd
	CVE-2014-2856.patch
	CVE-2014-3537.patch
	CVE-2014-5029_5030_5031.patch
	CVE-2014-9679.patch
	"


_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$srcdir"/$pkgname-$pkgver

	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--with-logdir=/var/log/cups \
		--with-docdir=/usr/share/cups \
		--with-cups-user=lp \
		--with-cups-group=lp \
		--with-system-groups=lpadmin \
		--without-php \
		--disable-pam \
		--disable-ldap \
		--libdir=/usr/lib \
		--enable-raw-printing \
		--enable-dbus \
		--with-dbusdir=/etc/dbus-1 \
		--enable-libpaper \
		--enable-ssl=yes \
		--enable-gnutls \
		--with-pdftops=pdftops \
		--with-optim="$CFLAGS"
	make || return 1
}

package() {
	cd "$srcdir"/$pkgname-$pkgver
	make BUILDROOT="$pkgdir" install
	rm -rf "$pkgdir"/etc/init.d \
		"$pkgdir"/etc/rc* \
		"$pkgdir"/usr/share/cups/banners \
		"$pkgdir"/usr/share/cups/data/testprint || return 1

	install -D -m644 ../cups.logrotate "$pkgdir"/etc/logrotate.d/cups
	install -D -m755 ../cupsd.initd "$pkgdir"/etc/init.d/cupsd

	sed -i 's|^Exec=htmlview http://localhost:631/|Exec=xdg-open http://localhost:631/|g' "$pkgdir"/usr/share/applications/cups.desktop
	find "$pkgdir"/usr/share/cups/model -name "*.ppd" | xargs gzip -n9f
}

_mv() {
	for i in "$@"; do
		mkdir -p "$subpkgdir"/${i%/*}
		mv "$pkgdir"/$i "$subpkgdir"/${i%/*}/ || return 1
	done
}

libs() {
	pkgdesc="CUPS libraries"
	depends=
	replaces="libcups"
	cd "$pkgdir"
	_mv usr/lib/*.so*
	install -d "$pkgdir"/etc/cups
}

ipptool() {
	pkgdesc=""
	depends=
	cd "$pkgdir"
	_mv usr/bin/ipptool \
		usr/share/cups/ipptool
}

client() {
	pkgdesc="CUPS client"
	depends=
	cd "$pkgdir"
	_mv usr/bin \
		usr/sbin/accept \
		usr/sbin/cupsaddsmb \
		usr/sbin/cupsctl \
		usr/sbin/cupsdisable \
		usr/sbin/cupsenable \
		usr/sbin/lpadmin \
		usr/sbin/lpc \
		usr/sbin/lpinfo \
		usr/sbin/lpmove \
		usr/sbin/reject
}

md5sums="13c8b2b2336d42001abe4899766b62dc  cups-1.6.2-source.tar.bz2
f861b18f4446c43918c8643dcbbd7f6d  cups.logrotate
1154ed66fdcfa0523f929a369079f43c  cupsd.initd
09c0def850cf68d5f0bd4adcb39192ba  CVE-2014-2856.patch
e7b557c8515d17bda174caf39dc774ad  CVE-2014-3537.patch
749673017347dacc336a60555e6c7a58  CVE-2014-5029_5030_5031.patch
405bbe44191c628d7f1f1cbd30e242fa  CVE-2014-9679.patch"
sha256sums="37a3ebd305e76cfd4c9c53013e89c0f7a4dcb04b2e9da61029a29faa57e0f10d  cups-1.6.2-source.tar.bz2
b3308353504bc1cc0d5203ad3609bc98639ad9655b52e8ec8257286877532796  cups.logrotate
3ea71f13cf925736847ca44aa0f1a9ed944fb3d303c34af923140b20fd587e2b  cupsd.initd
1066ddc97764e55f1cf98c742c59a3296adf9a9acb5d1a5d7d4ef80cba519755  CVE-2014-2856.patch
8898d80602eff060cf595b1e671b657930968c029614715f050aa6802bb8d080  CVE-2014-3537.patch
c90152101ea215b34b9a483538c31902f683bea452a91e74733b41a1a1d7aa25  CVE-2014-5029_5030_5031.patch
9a2ae9590348aea7d6c383a1ce5f2b08d259b44a1e0eb3ddb2201b81148c9fb9  CVE-2014-9679.patch"
sha512sums="08b7ae95af9c19a1bb72f851b801d55a51360a4c2993c34878d18a605bf1d9381eada5a8f51653c4467738f0509bb8ad713b79e78c8d2a80f1aa86f1d2196038  cups-1.6.2-source.tar.bz2
162fe69ee46962f7ce07a9a2a75154682088895c4749c9bcfc54bb2aa861f48d7d1a8e3223f78a197319a3a405626ffe996615f6eb23168afcefabab343d5be0  cups.logrotate
3c5f4017cb1faf3e63551db53da4cb8305601adf65358bc53e982c5a0dfdd2b455a8ce735760ae3cc5ef81cdfa2a3cfe4be4107d1858d7ab9d91b4b97d3bc73b  cupsd.initd
c365b6e85b180c839f15d9945fb5597c21a0b2f5fd9b941f162b4582767fff7e8b8306d8c3fcb74d160f47a1e795fb69b0f2d32776b49e3971d0090fe624d6fa  CVE-2014-2856.patch
146c85e595f66a339852fc7e79bfde0e9329704d412dfc85130f94f946a78481827261236acea9502bddd538c0db84a7905040f777fd123cc7e983c3f1c13930  CVE-2014-3537.patch
4261de408769cf24b7f32044ac606145c28fa879aa268c084b2b6119efaa8b53b6f4a455d21195e94c7fd5f099cde2b8f7915c2458873ed90f80613937d246b3  CVE-2014-5029_5030_5031.patch
69220ed540e9871ada0c94e7ceecca0a0d2f3236ed7263e0941f468091544343ff1866fb97d499c14b509f2b93e15b228861acf9c1d457ea2803d7be2ec1c037  CVE-2014-9679.patch"