Contents of /branches/R11-stable/extras/cups/cups-1.6.4-r1.smage2
Parent Directory | Revision Log
Revision 20454 -
(show annotations)
(download)
Mon Jan 27 09:22:04 2014 UTC (10 years, 4 months ago) by niro
File size: 5273 byte(s)
Mon Jan 27 09:22:04 2014 UTC (10 years, 4 months ago) by niro
File size: 5273 byte(s)
-release branches/R11-stable
1 | # $Id$ |
2 | |
3 | PNAME="cups" |
4 | PVER="1.6.4" |
5 | PBUILD="r1" |
6 | |
7 | SPLIT_PACKAGES="libcups cups" |
8 | |
9 | PCAT="net-print" |
10 | HOMEPAGE="http://www.cups.org/" |
11 | |
12 | LIB_DEPEND=">= virtual/glibc |
13 | >= app-crypt/gnutls-2.12 |
14 | >= media-libs/libpng-1.5 |
15 | >= media-libs/libtiff-4 |
16 | >= media-libs/libjpeg-8 |
17 | >= net-dns/avahi-0.6.31 |
18 | >= sys-libs/zlib-1.2.5 |
19 | >= sys-libs/libstdc++-4.8 |
20 | >= sys-apps/systemd-208" |
21 | |
22 | CUPS_DEPEND=">= sys-libs/pam-1.1 |
23 | >= sys-apps/acl-2.2 |
24 | >= sys-apps/dbus-1.6 |
25 | >= dev-libs/libusb-compat-0.1.3 |
26 | >= dev-libs/dbus-glib-0.100 |
27 | >= app-text/libpaper-1.1.24 |
28 | >= app-text/poppler-0.22" |
29 | |
30 | SDEPEND="${LIB_DEPEND} |
31 | ${CUPS_DEPEND} |
32 | >= sys-dev/automake-4 |
33 | >= sys-dev/autoconf-5" |
34 | |
35 | SRCFILE="${PNAME}-${PVER}-source.tar.bz2" |
36 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
37 | |
38 | sminclude mbuild mtools multilib systemd |
39 | msetfeature "!check" |
40 | |
41 | SRC_URI=( |
42 | http://cups.org/software/${PVER}/${SRCFILE} |
43 | mirror://${PNAME}/${SRCFILE} |
44 | mirror://${PNAME}/cups.conf.tmpd |
45 | mirror://${PNAME}/cups.logrotate |
46 | mirror://${PNAME}/cups.pam-systemauth |
47 | mirror://${PNAME}/${PNAME}-1.2.11-multilib.patch |
48 | mirror://${PNAME}/${PNAME}-1.6.1-systemd-socket.patch |
49 | mirror://${PNAME}/${PNAME}-1.5.0-build-fix.patch |
50 | mirror://${PNAME}/${PNAME}-1.6.1-dnssd-deviceid.patch |
51 | ) |
52 | |
53 | #UP2DATE="updatecmd ${HOMEPAGE} | grep 'Download Stable' | grep v[0-9] | sed 's/.*v\([0-9].*\)\ (.*/\1/'" |
54 | UP2DATE="updatecmd ${HOMEPAGE} | sed 's:-source::g' | firsttarball" |
55 | |
56 | split_info_libcups() |
57 | { |
58 | DESCRIPTION="cups: common unix printing system - client libraries and headers" |
59 | DEPEND="${LIB_DEPEND}" |
60 | } |
61 | |
62 | split_info_cups() |
63 | { |
64 | DESCRIPTION="cups: common unix printing system - service daemons." |
65 | DEPEND="== net-print/libcups-${PVER} |
66 | ${CUPS_DEPEND}" |
67 | } |
68 | |
69 | src_prepare() |
70 | { |
71 | munpack ${SRCFILE} || die |
72 | |
73 | # fix hardcoded /usr/lib in cups-directories.m4 to respect 64bit arches |
74 | mpatch ${PNAME}-1.2.11-multilib.patch || die |
75 | |
76 | # adds systemd socket activation support |
77 | mpatch ${PNAME}-1.6.1-systemd-socket.patch || die |
78 | |
79 | # fix build, adds missing -lrt |
80 | mpatch ${PNAME}-1.5.0-build-fix.patch || die |
81 | |
82 | # mark DNSSD device-ids that have been guessed at with "FZY:1;" |
83 | mpatch ${PNAME}-1.6.1-dnssd-deviceid.patch || die |
84 | |
85 | # non standard configure |
86 | all-abis aclocal -I config-scripts --force || die |
87 | all-abis autoconf --force || die |
88 | } |
89 | |
90 | src_compile() |
91 | { |
92 | mconfigure \ |
93 | --localstatedir=/var \ |
94 | --with-docdir=/usr/share/cups/html \ |
95 | --with-systemdsystemunitdir=$(mget-systemd-unit-dir) \ |
96 | --with-cups-user=lp \ |
97 | --with-cups-group=lp \ |
98 | --with-system-groups=lpadmin \ |
99 | --enable-threads \ |
100 | --enable-pam \ |
101 | --enable-nls \ |
102 | --enable-dbus \ |
103 | --enable-png \ |
104 | --enable-jpeg \ |
105 | --enable-tiff \ |
106 | --enable-libpaper \ |
107 | --enable-avahi \ |
108 | --enable-ssl=yes \ |
109 | --enable-gnutls \ |
110 | --disable-slp \ |
111 | --disable-php \ |
112 | --disable-ldap \ |
113 | || die |
114 | |
115 | mmake || die |
116 | } |
117 | |
118 | src_install_libcups() |
119 | { |
120 | mmake BUILDROOT=${BINDIR} install-headers || die |
121 | mmake BUILDROOT=${BINDIR} install-libs || die |
122 | # install config utiliy so other packages can find the libs |
123 | # because there a no pkgconfig files |
124 | minstallexec cups-config || die |
125 | } |
126 | |
127 | src_install_cups() |
128 | { |
129 | mmake BUILDROOT=${BINDIR} install-data || die |
130 | mmake BUILDROOT=${BINDIR} install-exec || die |
131 | |
132 | # provided by libcups |
133 | rm ${BINDIR}/usr/bin/cups-config || die |
134 | |
135 | # gzip *all* ppd's not just few |
136 | find ${BINDIR}/usr/share/cups/model -name "*.ppd" | xargs gzip -n9f || die |
137 | |
138 | # remove 32bit serverbins and co on 64bit multilib systems |
139 | if [[ ${ARCH} = x86_64 ]] |
140 | then |
141 | [[ -d ${BINDIR}/usr/lib/cups ]] && ( rm -rf ${BINDIR}/usr/lib/cups || die; ) |
142 | fi |
143 | |
144 | # remove possible installed backup configs |
145 | find ${BINDIR}/etc -name "*.O" | xargs rm -f || die |
146 | find ${BINDIR}/etc -name "*.N" | xargs rm -f || die |
147 | |
148 | # removing cups created init-scripts |
149 | rm -rf ${BINDIR}/etc/rc*.d || die |
150 | |
151 | # remove /etc/init.d too |
152 | rm -rf ${BINDIR}/etc/init.d || die |
153 | |
154 | # tempfile creation |
155 | minstalltmp cups.conf.tmpd cups.conf || die |
156 | |
157 | # install logrotate config |
158 | minstalllog cups.logrotate cups || die |
159 | |
160 | # install pam config |
161 | minstallpam cups.pam-systemauth cups || die |
162 | |
163 | # ship some config files to keep many apps happy (javapps nxnode etc) |
164 | memptyfile /etc/cups/printers.conf || die |
165 | memptyfile /etc/cups/classes.conf || die |
166 | memptyfile /etc/cups/client.conf || die |
167 | memptyfile /etc/cups/subscriptions.conf || die |
168 | |
169 | # prevents uninstall from prior versions |
170 | mkeepdir /usr/share/cups/profiles || die |
171 | mkeepdir /usr/$(mlibdir)/cups/driver || die |
172 | mkeepdir /var/log/cups || die |
173 | mkeepdir /var/run/cups/certs || die |
174 | mkeepdir /var/spool/cups || die |
175 | mkeepdir /var/spool/cups/tmp || die |
176 | |
177 | # create a rss feed directory |
178 | mkeepdir /var/cache/cups/rss || die |
179 | mchown lp.lp /var/cache/cups/rss || die |
180 | mchmod 0740 /var/cache/cups/rss || die |
181 | |
182 | # create a ssl directory to store cacerts and to fix some samba issues |
183 | mkeepdir /etc/cups/ssl || die |
184 | mchown root:lp /etc/cups/ssl || die |
185 | mchmod 0700 /etc/cups/ssl || die |
186 | |
187 | # fix cupsd permisions |
188 | mchmod 0755 /usr/sbin/cupsd || die |
189 | |
190 | # install missing docs |
191 | minstalldocs CHANGES* CREDITS* LICENSE* README* || die |
192 | } |
193 | |
194 | preinstall_cups() |
195 | { |
196 | ${MLIBDIR}/mgroupadd -o "-g 106" lpadmin |
197 | ${MLIBDIR}/mgroupadd -o "-g 9" lp |
198 | ${MLIBDIR}/museradd -o "-u 9 -g lp -d /var/spool/lpd -s /bin/false" lp |
199 | } |
200 | |
201 | postinstall_cups() |
202 | { |
203 | mstartunit cups.service cupsd |
204 | mstartunit cups.socket cupsd |
205 | } |
206 | |
207 | postremove_cups() |
208 | { |
209 | mstopunit cups.service cupsd |
210 | mstopunit cups.socket cupsd |
211 | } |