Magellan Linux

Annotation of /branches/R11-stable/extras/cups/cups-1.6.2-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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