Contents of /trunk/extras/cups/cups-1.6.3-r1.smage2
Parent Directory | Revision Log
Revision 18977 -
(show annotations)
(download)
Mon Aug 19 08:37:44 2013 UTC (11 years, 1 month ago) by niro
File size: 5260 byte(s)
Mon Aug 19 08:37:44 2013 UTC (11 years, 1 month ago) by niro
File size: 5260 byte(s)
-fixed SRC_URI and UP2DATE
1 | # $Id$ |
2 | |
3 | PNAME="cups" |
4 | PVER="1.6.3" |
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.7 |
20 | >= sys-apps/systemd-196" |
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.21" |
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://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=/usr/lib/systemd/system \ |
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 --enable-gnutls \ |
109 | --disable-slp \ |
110 | --disable-php \ |
111 | --disable-ldap \ |
112 | || die |
113 | |
114 | mmake || die |
115 | } |
116 | |
117 | src_install_libcups() |
118 | { |
119 | mmake BUILDROOT=${BINDIR} install-headers || die |
120 | mmake BUILDROOT=${BINDIR} install-libs || die |
121 | # install config utiliy so other packages can find the libs |
122 | # because there a no pkgconfig files |
123 | minstallexec cups-config || die |
124 | } |
125 | |
126 | src_install_cups() |
127 | { |
128 | mmake BUILDROOT=${BINDIR} install-data || die |
129 | mmake BUILDROOT=${BINDIR} install-exec || die |
130 | |
131 | # provided by libcups |
132 | rm ${BINDIR}/usr/bin/cups-config || die |
133 | |
134 | # gzip *all* ppd's not just few |
135 | find ${BINDIR}/usr/share/cups/model -name "*.ppd" | xargs gzip -n9f || die |
136 | |
137 | # remove 32bit serverbins and co on 64bit multilib systems |
138 | if [[ ${ARCH} = x86_64 ]] |
139 | then |
140 | [[ -d ${BINDIR}/usr/lib/cups ]] && ( rm -rf ${BINDIR}/usr/lib/cups || die; ) |
141 | fi |
142 | |
143 | # remove possible installed backup configs |
144 | find ${BINDIR}/etc -name "*.O" | xargs rm -f || die |
145 | find ${BINDIR}/etc -name "*.N" | xargs rm -f || die |
146 | |
147 | # removing cups created init-scripts |
148 | rm -rf ${BINDIR}/etc/rc*.d || die |
149 | |
150 | # remove /etc/init.d too |
151 | rm -rf ${BINDIR}/etc/init.d || die |
152 | |
153 | # tempfile creation |
154 | minstalltmp cups.conf.tmpd cups.conf || die |
155 | |
156 | # install logrotate config |
157 | minstalllog cups.logrotate cups || die |
158 | |
159 | # install pam config |
160 | minstallpam cups.pam-systemauth cups || die |
161 | |
162 | # ship some config files to keep many apps happy (javapps nxnode etc) |
163 | memptyfile /etc/cups/printers.conf || die |
164 | memptyfile /etc/cups/classes.conf || die |
165 | memptyfile /etc/cups/client.conf || die |
166 | memptyfile /etc/cups/subscriptions.conf || die |
167 | |
168 | # prevents uninstall from prior versions |
169 | mkeepdir /usr/share/cups/profiles || die |
170 | mkeepdir /usr/$(mlibdir)/cups/driver || die |
171 | mkeepdir /var/log/cups || die |
172 | mkeepdir /var/run/cups/certs || die |
173 | mkeepdir /var/spool/cups || die |
174 | mkeepdir /var/spool/cups/tmp || die |
175 | |
176 | # create a rss feed directory |
177 | mkeepdir /var/cache/cups/rss || die |
178 | mchown lp.lp /var/cache/cups/rss || die |
179 | mchmod 0740 /var/cache/cups/rss || die |
180 | |
181 | # create a ssl directory to store cacerts and to fix some samba issues |
182 | mkeepdir /etc/cups/ssl || die |
183 | mchown root:lp /etc/cups/ssl || die |
184 | mchmod 0700 /etc/cups/ssl || die |
185 | |
186 | # fix cupsd permisions |
187 | mchmod 0755 /usr/sbin/cupsd || die |
188 | |
189 | # install missing docs |
190 | minstalldocs CHANGES* CREDITS* LICENSE* README* || die |
191 | } |
192 | |
193 | preinstall_cups() |
194 | { |
195 | ${MLIBDIR}/mgroupadd -o "-g 106" lpadmin |
196 | ${MLIBDIR}/mgroupadd -o "-g 9" lp |
197 | ${MLIBDIR}/museradd -o "-u 9 -g lp -d /var/spool/lpd -s /bin/false" lp |
198 | } |
199 | |
200 | postinstall_cups() |
201 | { |
202 | mstartunit cups.service cupsd |
203 | mstartunit cups.socket cupsd |
204 | } |
205 | |
206 | postremove_cups() |
207 | { |
208 | mstopunit cups.service cupsd |
209 | mstopunit cups.socket cupsd |
210 | } |