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