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