Magellan Linux

Contents of /trunk/extras/cups/cups-1.6.1-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 16031 - (show annotations) (download)
Mon Jan 21 12:56:36 2013 UTC (11 years, 4 months ago) by niro
File size: 5292 byte(s)
-added patch to remove obsolete config directives
1 # $Id$
2
3 PNAME="cups"
4 PVER="1.6.1"
5 PBUILD="r2"
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://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}-${PVER}-systemd-socket.patch
49 mirror://${PNAME}/${PNAME}-1.5.0-build-fix.patch
50 mirror://${PNAME}/${PNAME}-${PVER}-dnssd-deviceid.patch
51 mirror://${PNAME}/${PNAME}-${PVER}-config-fixes.patch
52 )
53
54 UP2DATE="updatecmd ${HOMEPAGE} | grep 'Download CUPS' | grep v[0-9] | sed 's/.*v\([0-9].*\)\ (.*/\1/'"
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}-${PVER}-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}-${PVER}-dnssd-deviceid.patch || die
84
85 # fix obsolete config auth directives
86 mpatch ${PNAME}-${PVER}-config-fixes.patch || die
87
88 # non standard configure
89 all-abis aclocal -I config-scripts --force || die
90 all-abis autoconf --force || die
91 }
92
93 src_compile()
94 {
95 mconfigure \
96 --localstatedir=/var \
97 --with-docdir=/usr/share/cups/html \
98 --with-systemdsystemunitdir=/usr/lib/systemd/system \
99 --with-cups-user=lp \
100 --with-cups-group=lp \
101 --with-system-groups=lpadmin \
102 --enable-threads \
103 --enable-pam \
104 --enable-nls \
105 --enable-dbus \
106 --enable-png \
107 --enable-jpeg \
108 --enable-tiff \
109 --enable-libpaper \
110 --enable-avahi \
111 --enable-ssl=yes --enable-gnutls \
112 --disable-slp \
113 --disable-php \
114 --disable-ldap \
115 || die
116
117 mmake || die
118 }
119
120 src_install_libcups()
121 {
122 mmake BUILDROOT=${BINDIR} install-headers || die
123 mmake BUILDROOT=${BINDIR} install-libs || die
124 # install config utiliy so other packages can find the libs
125 # because there a no pkgconfig files
126 minstallexec cups-config || die
127 }
128
129 src_install_cups()
130 {
131 mmake BUILDROOT=${BINDIR} install-data || die
132 mmake BUILDROOT=${BINDIR} install-exec || die
133
134 # provided by libcups
135 rm ${BINDIR}/usr/bin/cups-config || die
136
137 # gzip *all* ppd's not just few
138 find ${BINDIR}/usr/share/cups/model -name "*.ppd" | xargs gzip -n9f || die
139
140 # remove 32bit serverbins and co on 64bit multilib systems
141 if [[ ${ARCH} = x86_64 ]]
142 then
143 [[ -d ${BINDIR}/usr/lib/cups ]] && ( rm -rf ${BINDIR}/usr/lib/cups || die; )
144 fi
145
146 # remove possible installed backup configs
147 find ${BINDIR}/etc -name "*.O" | xargs rm -f || die
148 find ${BINDIR}/etc -name "*.N" | xargs rm -f || die
149
150 # removing cups created init-scripts
151 rm -rf ${BINDIR}/etc/rc*.d || die
152
153 # remove /etc/init.d too
154 rm -rf ${BINDIR}/etc/init.d || die
155
156 # tempfile creation
157 minstalltmp cups.conf.tmpd cups.conf || die
158
159 # install logrotate config
160 minstalllog cups.logrotate cups || die
161
162 # install pam config
163 minstallpam cups.pam-systemauth cups || die
164
165 # ship some config files to keep many apps happy (javapps nxnode etc)
166 memptyfile /etc/cups/printers.conf || die
167 memptyfile /etc/cups/classes.conf || die
168 memptyfile /etc/cups/client.conf || die
169 memptyfile /etc/cups/subscriptions.conf || die
170
171 # prevents uninstall from prior versions
172 mkeepdir /usr/share/cups/profiles || die
173 mkeepdir /usr/$(mlibdir)/cups/driver || die
174 mkeepdir /var/log/cups || die
175 mkeepdir /var/run/cups/certs || die
176 mkeepdir /var/spool/cups || die
177 mkeepdir /var/spool/cups/tmp || die
178
179 # create a rss feed directory
180 mkeepdir /var/cache/cups/rss || die
181 mchown lp.lp /var/cache/cups/rss || die
182 mchmod 0740 /var/cache/cups/rss || die
183
184 # create a ssl directory to store cacerts and to fix some samba issues
185 mkeepdir /etc/cups/ssl || die
186 mchown root:lp /etc/cups/ssl || die
187 mchmod 0700 /etc/cups/ssl || 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 }