Magellan Linux

Contents of /branches/magellan-next/core/cups/cups-1.5.0-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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