Magellan Linux

Contents of /trunk/core/cups/cups-1.5.0-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10342 - (show annotations) (download)
Sat Jan 21 01:30:39 2012 UTC (12 years, 4 months ago) by niro
File size: 5084 byte(s)
-added patch fix missing -lrt
1 # $Id$
2
3 PNAME="cups"
4 PVER="1.5.0"
5 PBUILD="r3"
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-3.9
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
21 CUPS_DEPEND=">= sys-libs/pam-1.1
22 >= sys-apps/acl-2.2
23 >= sys-apps/dbus-1.5
24 >= dev-libs/libusb-compat-0.1.3
25 >= dev-libs/dbus-glib-0.98
26 >= app-text/libpaper-1.1.24
27 >= app-text/poppler-0.18"
28
29 SDEPEND="${LIB_DEPEND}
30 ${CUPS_DEPEND}
31 >= sys-dev/automake-4
32 >= sys-dev/autoconf-5"
33
34 SRCFILE="${PNAME}-${PVER}-source.tar.bz2"
35 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
36
37 sminclude mbuild mtools multilib
38
39 SRC_URI=(
40 http://ftp.easysw.com/pub/${PNAME}/${PVER}/${SRCFILE}
41 mirror://${PNAME}/${SRCFILE}
42 mirror://${PNAME}/cups.conf.tmpd
43 mirror://${PNAME}/cups.logrotate
44 mirror://${PNAME}/cups.pam-systemauth
45 mirror://${PNAME}/${PNAME}-1.2.11-multilib.patch
46 mirror://${PNAME}/${PNAME}-1.4.1-backend-https.patch
47 mirror://${PNAME}/${PNAME}-1.4.7-systemd-socket.patch
48 mirror://${PNAME}/${PNAME}-${PVER}-build-fix.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 # fix build, adds missing -lrt
80 mpatch ${PNAME}-${PVER}-build-fix.patch || die
81
82 # non standard configure
83 all-abis aclocal -I config-scripts --force || die
84 all-abis autoconf --force || die
85 }
86
87 src_compile()
88 {
89 mconfigure \
90 --localstatedir=/var \
91 --with-docdir=/usr/share/cups/html \
92 --with-systemdsystemunitdir=/lib/systemd/system \
93 --with-cups-user=lp \
94 --with-cups-group=lp \
95 --with-system-groups=lpadmin \
96 --enable-threads \
97 --enable-pam \
98 --enable-nls \
99 --enable-dbus \
100 --enable-png \
101 --enable-jpeg \
102 --enable-tiff \
103 --enable-libpaper \
104 --enable-dnssd \
105 --enable-ssl=yes --enable-gnutls \
106 --disable-slp \
107 --disable-php \
108 --disable-ldap \
109 || die
110
111 mmake || die
112 }
113
114 src_install_libcups()
115 {
116 mmake BUILDROOT=${BINDIR} install-headers || die
117 mmake BUILDROOT=${BINDIR} install-libs || die
118 # install config utiliy so other packages can find the libs
119 # because there a no pkgconfig files
120 minstallexec cups-config || die
121 }
122
123 src_install_cups()
124 {
125 mmake BUILDROOT=${BINDIR} install-data || die
126 mmake BUILDROOT=${BINDIR} install-exec || die
127
128 # provided by libcups
129 rm ${BINDIR}/usr/bin/cups-config || die
130
131 # gzip *all* ppd's not just few
132 find ${BINDIR}/usr/share/cups/model -name "*.ppd" | xargs gzip -n9f || die
133
134 # remove 32bit serverbins and co on 64bit multilib systems
135 if [[ ${ARCH} = x86_64 ]]
136 then
137 [[ -d ${BINDIR}/usr/lib/cups ]] && ( rm -rf ${BINDIR}/usr/lib/cups || die; )
138 fi
139
140 # remove possible installed backup configs
141 find ${BINDIR}/etc -name "*.O" | xargs rm -f || die
142 find ${BINDIR}/etc -name "*.N" | xargs rm -f || die
143
144 # removing cups created init-scripts
145 rm -rf ${BINDIR}/etc/rc*.d || die
146
147 # remove /etc/init.d too
148 rm -rf ${BINDIR}/etc/init.d || die
149
150 # tempfile creation
151 minstalltmp cups.conf.tmpd cups.conf || die
152
153 # install logrotate config
154 minstalllog cups.logrotate cups || die
155
156 # install pam config
157 minstallpam cups.pam-systemauth cups || die
158
159 # ship some config files to keep many apps happy (javapps nxnode etc)
160 memptyfile /etc/cups/printers.conf || die
161 memptyfile /etc/cups/classes.conf || die
162 memptyfile /etc/cups/client.conf || die
163 memptyfile /etc/cups/subscriptions.conf || die
164
165 # prevents uninstall from prior versions
166 mkeepdir /usr/share/cups/profiles || die
167 mkeepdir /usr/$(mlibdir)/cups/driver || die
168 mkeepdir /var/log/cups || die
169 mkeepdir /var/run/cups/certs || die
170 mkeepdir /var/spool/cups || die
171 mkeepdir /var/spool/cups/tmp || die
172
173 # create a rss feed directory
174 mkeepdir /var/cache/cups/rss || die
175 mchown lp.lp /var/cache/cups/rss || die
176 mchmod 0740 /var/cache/cups/rss || die
177
178 # create a ssl directory to store cacerts and to fix some samba issues
179 mkeepdir /etc/cups/ssl || die
180 mchown root:lp /etc/cups/ssl || die
181 mchmod 0700 /etc/cups/ssl || die
182
183 # install missing docs
184 minstalldocs CHANGES* CREDITS* LICENSE* README* || die
185 }
186
187 preinstall()
188 {
189 ${MLIBDIR}/mgroupadd -o "-g 106" lpadmin
190 ${MLIBDIR}/mgroupadd -o "-g 9" lp
191 ${MLIBDIR}/museradd -o "-u 9 -g lp -d /var/spool/lpd -s /bin/false" lp
192 }
193
194 postinstall()
195 {
196 mstartunit cups.service cupsd
197 mstartunit cups.socket cupsd
198 }
199
200 postremove()
201 {
202 mstopunit cups.service cupsd
203 mstopunit cups.socket cupsd
204 }