Magellan Linux

Contents of /branches/R11-stable/extras/cups/cups-1.7.3-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 21708 - (show annotations) (download)
Mon Jul 21 09:36:17 2014 UTC (9 years, 10 months ago) by niro
File size: 5304 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="cups"
4 PVER="1.7.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-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-211"
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.22"
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}-${PVER}-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 src_prepare()
71 {
72 munpack ${SRCFILE} || die
73
74 # fix hardcoded /usr/lib in cups-directories.m4 to respect 64bit arches
75 mpatch ${PNAME}-1.2.11-multilib.patch || die
76
77 # adds systemd socket activation support
78 mpatch ${PNAME}-${PVER}-systemd-socket.patch || die
79
80 # fix build, adds missing -lrt
81 mpatch ${PNAME}-1.5.0-build-fix.patch || die
82
83 # mark DNSSD device-ids that have been guessed at with "FZY:1;"
84 mpatch ${PNAME}-1.6.1-dnssd-deviceid.patch || die
85
86 # non standard configure
87 all-abis aclocal -I config-scripts --force || die
88 all-abis autoconf --force || die
89 }
90
91 src_compile()
92 {
93 mconfigure \
94 --localstatedir=/var \
95 --with-docdir=/usr/share/cups/html \
96 --with-systemdsystemunitdir=$(mget-systemd-unit-dir) \
97 --with-cups-user=lp \
98 --with-cups-group=lp \
99 --with-system-groups=lpadmin \
100 --enable-threads \
101 --enable-pam \
102 --enable-nls \
103 --enable-dbus \
104 --enable-png \
105 --enable-jpeg \
106 --enable-tiff \
107 --enable-libpaper \
108 --enable-avahi \
109 --enable-ssl=yes \
110 --enable-gnutls \
111 --disable-slp \
112 --disable-php \
113 --disable-ldap \
114 || die
115
116 mmake || die
117 }
118
119 src_install_libcups()
120 {
121 mmake BUILDROOT=${BINDIR} install-headers || die
122 mmake BUILDROOT=${BINDIR} install-libs || die
123 # install config utiliy so other packages can find the libs
124 # because there a no pkgconfig files
125 minstallexec cups-config || die
126 }
127
128 src_install_cups()
129 {
130 mmake BUILDROOT=${BINDIR} install-data || die
131 mmake BUILDROOT=${BINDIR} install-exec || die
132
133 # provided by libcups
134 rm ${BINDIR}/usr/bin/cups-config || die
135
136 # gzip *all* ppd's not just few
137 find ${BINDIR}/usr/share/cups/model -name "*.ppd" | xargs gzip -n9f || die
138
139 # remove 32bit serverbins and co on 64bit multilib systems
140 if [[ ${ARCH} = x86_64 ]]
141 then
142 [[ -d ${BINDIR}/usr/lib/cups ]] && ( rm -rf ${BINDIR}/usr/lib/cups || die; )
143 fi
144
145 # remove possible installed backup configs
146 find ${BINDIR}/etc -name "*.O" | xargs rm -f || die
147 find ${BINDIR}/etc -name "*.N" | xargs rm -f || die
148
149 # removing cups created init-scripts
150 rm -rf ${BINDIR}/etc/rc*.d || die
151
152 # remove /etc/init.d too
153 rm -rf ${BINDIR}/etc/init.d || die
154
155 # tempfile creation
156 minstalltmp cups.conf.tmpd cups.conf || die
157
158 # install logrotate config
159 minstalllog cups.logrotate cups || die
160
161 # install pam config
162 minstallpam cups.pam-systemauth cups || die
163
164 # ship some config files to keep many apps happy (javapps nxnode etc)
165 memptyfile /etc/cups/printers.conf || die
166 memptyfile /etc/cups/classes.conf || die
167 memptyfile /etc/cups/client.conf || die
168 memptyfile /etc/cups/subscriptions.conf || die
169
170 # prevents uninstall from prior versions
171 mkeepdir /usr/share/cups/profiles || die
172 mkeepdir /usr/$(mlibdir)/cups/driver || die
173 mkeepdir /var/log/cups || die
174 mkeepdir /var/run/cups/certs || die
175 mkeepdir /var/spool/cups || die
176 mkeepdir /var/spool/cups/tmp || die
177
178 # create a rss feed directory
179 mkeepdir /var/cache/cups/rss || die
180 mchown lp.lp /var/cache/cups/rss || die
181 mchmod 0740 /var/cache/cups/rss || die
182
183 # create a ssl directory to store cacerts and to fix some samba issues
184 mkeepdir /etc/cups/ssl || die
185 mchown root:lp /etc/cups/ssl || die
186 mchmod 0700 /etc/cups/ssl || die
187
188 # fix cupsd permisions
189 mchmod 0755 /usr/sbin/cupsd || die
190
191 # install missing docs
192 minstalldocs CHANGES* CREDITS* LICENSE* README* || die
193 }
194
195 preinstall_cups()
196 {
197 ${MLIBDIR}/mgroupadd -o "-g 106" lpadmin
198 ${MLIBDIR}/mgroupadd -o "-g 9" lp
199 ${MLIBDIR}/museradd -o "-u 9 -g lp -d /var/spool/lpd -s /bin/false" lp
200 }
201
202 postinstall_cups()
203 {
204 mstartunit cups.service cupsd
205 mstartunit cups.socket cupsd
206 }
207
208 postremove_cups()
209 {
210 mstopunit cups.service cupsd
211 mstopunit cups.socket cupsd
212 }