Contents of /trunk/extras/cups/cups-1.5.2-r1.smage2
Parent Directory | Revision Log
Revision 11067 -
(show annotations)
(download)
Thu Feb 16 10:12:14 2012 UTC (12 years, 7 months ago) by niro
File size: 6146 byte(s)
Thu Feb 16 10:12:14 2012 UTC (12 years, 7 months ago) by niro
File size: 6146 byte(s)
-added missing systemd dep
1 | # $Id$ |
2 | |
3 | PNAME="cups" |
4 | PVER="1.5.2" |
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.30 |
18 | >= sys-libs/zlib-1.2.5 |
19 | >= sys-libs/libstdc++-4.6 |
20 | >= sys-apps/systemd-39" |
21 | |
22 | CUPS_DEPEND=">= sys-libs/pam-1.1 |
23 | >= sys-apps/acl-2.2 |
24 | >= sys-apps/dbus-1.5 |
25 | >= dev-libs/libusb-compat-0.1.3 |
26 | >= dev-libs/dbus-glib-0.98 |
27 | >= app-text/libpaper-1.1.24 |
28 | >= app-text/poppler-0.18" |
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 |
39 | msetfeature "!check" |
40 | |
41 | SRC_URI=( |
42 | http://ftp.easysw.com/pub/${PNAME}/${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.4.1-backend-https.patch |
49 | mirror://${PNAME}/${PNAME}-1.5.2-systemd-socket.patch |
50 | mirror://${PNAME}/${PNAME}-1.5.0-build-fix.patch |
51 | mirror://${PNAME}/${PNAME}-1.5.2-dnssd-build.patch |
52 | mirror://${PNAME}/${PNAME}-1.5.2-avahi-1-config.patch |
53 | mirror://${PNAME}/${PNAME}-1.5.2-avahi-2-backend.patch |
54 | mirror://${PNAME}/${PNAME}-1.5.2-avahi-3-timeouts.patch |
55 | mirror://${PNAME}/${PNAME}-1.5.2-avahi-4-poll.patch |
56 | mirror://${PNAME}/${PNAME}-1.5.2-avahi-5-services.patch |
57 | mirror://${PNAME}/${PNAME}-1.5.2-dnssd-deviceid.patch |
58 | ) |
59 | |
60 | UP2DATE="updatecmd ${HOMEPAGE} | grep 'Download CUPS' | grep v[0-9] | sed 's/.*v\([0-9].*\)\ (.*/\1/'" |
61 | |
62 | split_info_libcups() |
63 | { |
64 | DESCRIPTION="cups: common unix printing system - client libraries and headers" |
65 | DEPEND="${LIB_DEPEND}" |
66 | } |
67 | |
68 | split_info_cups() |
69 | { |
70 | DESCRIPTION="cups: common unix printing system - service daemons." |
71 | DEPEND="== net-print/libcups-${PVER} |
72 | ${CUPS_DEPEND}" |
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 | # create a missing symlink to allow https printing via IPP, bug #217293 |
83 | mpatch ${PNAME}-1.4.1-backend-https.patch || die |
84 | |
85 | # adds systemd socket activation support |
86 | mpatch ${PNAME}-1.5.2-systemd-socket.patch || die |
87 | |
88 | # fix build, adds missing -lrt |
89 | mpatch ${PNAME}-1.5.0-build-fix.patch || die |
90 | |
91 | # simplify the DNSSD parts so they can build using the compat library |
92 | mpatch ${PNAME}-1.5.2-dnssd-build.patch || die |
93 | |
94 | # real avahi support - from redhat/fedora |
95 | # - discovery in the dnssd backend |
96 | # - service announcement in the scheduler |
97 | mpatch ${PNAME}-1.5.2-avahi-1-config.patch || die |
98 | mpatch ${PNAME}-1.5.2-avahi-2-backend.patch || die |
99 | mpatch ${PNAME}-1.5.2-avahi-3-timeouts.patch || die |
100 | mpatch ${PNAME}-1.5.2-avahi-4-poll.patch || die |
101 | mpatch ${PNAME}-1.5.2-avahi-5-services.patch || die |
102 | |
103 | # mark DNSSD device-ids that have been guessed at with "FZY:1;" |
104 | mpatch ${PNAME}-1.5.2-dnssd-deviceid.patch || die |
105 | |
106 | # non standard configure |
107 | all-abis aclocal -I config-scripts --force || die |
108 | all-abis autoconf --force || die |
109 | } |
110 | |
111 | src_compile() |
112 | { |
113 | mconfigure \ |
114 | --localstatedir=/var \ |
115 | --with-docdir=/usr/share/cups/html \ |
116 | --with-systemdsystemunitdir=/usr/lib/systemd/system \ |
117 | --with-cups-user=lp \ |
118 | --with-cups-group=lp \ |
119 | --with-system-groups=lpadmin \ |
120 | --enable-threads \ |
121 | --enable-pam \ |
122 | --enable-nls \ |
123 | --enable-dbus \ |
124 | --enable-png \ |
125 | --enable-jpeg \ |
126 | --enable-tiff \ |
127 | --enable-libpaper \ |
128 | --enable-avahi \ |
129 | --enable-ssl=yes --enable-gnutls \ |
130 | --disable-slp \ |
131 | --disable-php \ |
132 | --disable-ldap \ |
133 | || die |
134 | |
135 | mmake || die |
136 | } |
137 | |
138 | src_install_libcups() |
139 | { |
140 | mmake BUILDROOT=${BINDIR} install-headers || die |
141 | mmake BUILDROOT=${BINDIR} install-libs || die |
142 | # install config utiliy so other packages can find the libs |
143 | # because there a no pkgconfig files |
144 | minstallexec cups-config || die |
145 | } |
146 | |
147 | src_install_cups() |
148 | { |
149 | mmake BUILDROOT=${BINDIR} install-data || die |
150 | mmake BUILDROOT=${BINDIR} install-exec || die |
151 | |
152 | # provided by libcups |
153 | rm ${BINDIR}/usr/bin/cups-config || die |
154 | |
155 | # gzip *all* ppd's not just few |
156 | find ${BINDIR}/usr/share/cups/model -name "*.ppd" | xargs gzip -n9f || die |
157 | |
158 | # remove 32bit serverbins and co on 64bit multilib systems |
159 | if [[ ${ARCH} = x86_64 ]] |
160 | then |
161 | [[ -d ${BINDIR}/usr/lib/cups ]] && ( rm -rf ${BINDIR}/usr/lib/cups || die; ) |
162 | fi |
163 | |
164 | # remove possible installed backup configs |
165 | find ${BINDIR}/etc -name "*.O" | xargs rm -f || die |
166 | find ${BINDIR}/etc -name "*.N" | xargs rm -f || die |
167 | |
168 | # removing cups created init-scripts |
169 | rm -rf ${BINDIR}/etc/rc*.d || die |
170 | |
171 | # remove /etc/init.d too |
172 | rm -rf ${BINDIR}/etc/init.d || die |
173 | |
174 | # tempfile creation |
175 | minstalltmp cups.conf.tmpd cups.conf || die |
176 | |
177 | # install logrotate config |
178 | minstalllog cups.logrotate cups || die |
179 | |
180 | # install pam config |
181 | minstallpam cups.pam-systemauth cups || die |
182 | |
183 | # ship some config files to keep many apps happy (javapps nxnode etc) |
184 | memptyfile /etc/cups/printers.conf || die |
185 | memptyfile /etc/cups/classes.conf || die |
186 | memptyfile /etc/cups/client.conf || die |
187 | memptyfile /etc/cups/subscriptions.conf || die |
188 | |
189 | # prevents uninstall from prior versions |
190 | mkeepdir /usr/share/cups/profiles || die |
191 | mkeepdir /usr/$(mlibdir)/cups/driver || die |
192 | mkeepdir /var/log/cups || die |
193 | mkeepdir /var/run/cups/certs || die |
194 | mkeepdir /var/spool/cups || die |
195 | mkeepdir /var/spool/cups/tmp || die |
196 | |
197 | # create a rss feed directory |
198 | mkeepdir /var/cache/cups/rss || die |
199 | mchown lp.lp /var/cache/cups/rss || die |
200 | mchmod 0740 /var/cache/cups/rss || die |
201 | |
202 | # create a ssl directory to store cacerts and to fix some samba issues |
203 | mkeepdir /etc/cups/ssl || die |
204 | mchown root:lp /etc/cups/ssl || die |
205 | mchmod 0700 /etc/cups/ssl || die |
206 | |
207 | # install missing docs |
208 | minstalldocs CHANGES* CREDITS* LICENSE* README* || die |
209 | } |
210 | |
211 | preinstall_cups() |
212 | { |
213 | ${MLIBDIR}/mgroupadd -o "-g 106" lpadmin |
214 | ${MLIBDIR}/mgroupadd -o "-g 9" lp |
215 | ${MLIBDIR}/museradd -o "-u 9 -g lp -d /var/spool/lpd -s /bin/false" lp |
216 | } |
217 | |
218 | postinstall_cups() |
219 | { |
220 | mstartunit cups.service cupsd |
221 | mstartunit cups.socket cupsd |
222 | } |
223 | |
224 | postremove_cups() |
225 | { |
226 | mstopunit cups.service cupsd |
227 | mstopunit cups.socket cupsd |
228 | } |