Magellan Linux

Contents of /trunk/extras/cups/cups-1.5.0-r4.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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