Magellan Linux

Annotation of /branches/magellan-next/core/cups/cups-1.4.7-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8837 - (hide annotations) (download)
Tue Aug 2 11:35:35 2011 UTC (12 years, 10 months ago) by niro
File size: 4095 byte(s)
-use new system-auth stack
1 niro 8837 # $Id$
2    
3     PNAME="cups"
4     PVER="1.4.7"
5     PBUILD="r2"
6    
7     PCATEGORIE="net-print"
8    
9     DESCRIPTION="cups: common unix printing system."
10     HOMEPAGE="http://www.cups.org/"
11    
12     DEPEND=">= virtual/glibc
13     >= dev-libs/openssl-1.0.0
14     >= media-libs/libpng-1.5
15     >= media-libs/libtiff-3.9
16     >= media-libs/libjpeg-8
17     >= sys-libs/pam-1.1
18     >= sys-apps/dbus-1.4
19     >= dev-libs/dbus-glib-0.92
20     >= app-text/libpaper-1.1.24
21     >= app-text/poppler-0.17
22     >= net-dns/avahi-0.6.30"
23    
24     SDEPEND=">= sys-dev/automake-4
25     >= sys-dev/autoconf-5"
26    
27     SRCFILE="${PNAME}-${PVER}-source.tar.bz2"
28     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
29    
30     # cups.rc cvs revision
31     RC_CVS_REV="1.2"
32    
33     sminclude mbuild mtools multilib
34    
35     SRC_URI=(
36     http://ftp.easysw.com/pub/${PNAME}/${PVER}/${SRCFILE}
37     mirror://${PNAME}/${SRCFILE}
38     mirror://${PNAME}/cups.rc-${RC_CVS_REV}
39     mirror://${PNAME}/cups.conf.tmpd
40     mirror://${PNAME}/cups.logrotate
41     mirror://${PNAME}/cups.pam-systemauth
42     mirror://${PNAME}/${PNAME}-1.2.11-multilib.patch
43     mirror://${PNAME}/${PNAME}-1.4.1-backend-https.patch
44     mirror://${PNAME}/${PNAME}-1.4.7-systemd-socket.patch
45     )
46    
47     UP2DATE="updatecmd ${HOMEPAGE} | grep 'Download CUPS' | grep v[0-9] | sed 's/.*v\([0-9].*\)\ (.*/\1/'"
48    
49     src_prepare()
50     {
51     munpack ${SRCFILE} || die
52    
53     # fix hardcoded /usr/lib in cups-directories.m4 to respect 64bit arches
54     mpatch ${PNAME}-1.2.11-multilib.patch || die
55    
56     # create a missing symlink to allow https printing via IPP, bug #217293
57     mpatch ${PNAME}-1.4.1-backend-https.patch || die
58    
59     # adds systemd socket activation support
60     mpatch ${PNAME}-1.4.7-systemd-socket.patch || die
61    
62     # non standard configure
63     all-abis aclocal -I config-scripts || die
64     all-abis autoconf || die
65     }
66    
67     src_compile()
68     {
69     mconfigure \
70     --localstatedir=/var \
71     --with-docdir=/usr/share/cups/html \
72     --with-systemdsystemunitdir=/lib/systemd/system \
73     --with-cups-user=lp \
74     --with-cups-group=lp \
75     --with-system-groups=lpadmin \
76     --enable-threads \
77     --enable-pam \
78     --enable-nls \
79     --enable-dbus \
80     --enable-png \
81     --enable-jpeg \
82     --enable-tiff \
83     --enable-libpaper \
84     --enable-dnssd \
85     --disable-slp \
86     --disable-php \
87     --disable-ldap \
88     || die
89    
90     mmake || die
91     }
92    
93     src_install()
94     {
95     mmake BUILDROOT=${BINDIR} install || die
96    
97     # gzip *all* ppd's not just few
98     find ${BINDIR}/usr/share/cups/model -name "*.ppd" | xargs gzip -n9f || die
99    
100     # remove 32bit serverbins and co on 64bit multilib systems
101     if [[ ${ARCH} = x86_64 ]]
102     then
103     [[ -d ${BINDIR}/usr/lib/cups ]] && ( rm -rf ${BINDIR}/usr/lib/cups || die; )
104     fi
105    
106     # remove possible installed backup configs
107     find ${BINDIR}/etc -name "*.O" | xargs rm -f || die
108     find ${BINDIR}/etc -name "*.N" | xargs rm -f || die
109    
110     # removing cups created init-scripts
111     rm -rf ${BINDIR}/etc/rc*.d || die
112    
113     # remove /etc/init.d too
114     rm -rf ${BINDIR}/etc/init.d || die
115    
116     # install our initscript
117     minstallrc cups.rc-${RC_CVS_REV} cups || die
118    
119     # tempfile creation
120     minstalltmp cups.conf.tmpd cups.conf || die
121    
122     # install logrotate config
123     minstalllog cups.logrotate cups || die
124    
125     # install pam config
126     minstallpam cups.pam-systemauth cups || die
127    
128     # ship some config files to keep many apps happy (javapps nxnode etc)
129     memptyfile /etc/cups/printers.conf || die
130     memptyfile /etc/cups/classes.conf || die
131     memptyfile /etc/cups/client.conf || die
132     memptyfile /etc/cups/subscriptions.conf || die
133    
134     # prevents uninstall from prior versions
135     mkeepdir /usr/share/cups/profiles || die
136     mkeepdir /usr/$(mlibdir)/cups/driver || die
137     mkeepdir /var/log/cups || die
138     mkeepdir /var/run/cups/certs || die
139     mkeepdir /var/spool/cups || die
140     mkeepdir /var/spool/cups/tmp || die
141    
142     # create a rss feed directory
143     mkeepdir /var/cache/cups/rss || die
144     mchown lp.lp /var/cache/cups/rss || die
145     mchmod 0740 /var/cache/cups/rss || die
146    
147     # install missing docs
148     minstalldocs CHANGES* CREDITS* LICENSE* README* || die
149     }
150    
151     preinstall()
152     {
153     ${MLIBDIR}/mgroupadd -o "-g 106" lpadmin
154     ${MLIBDIR}/mgroupadd -o "-g 9" lp
155     ${MLIBDIR}/museradd -o "-u 9 -g lp -d /var/spool/lpd -s /bin/false" lp
156     }
157    
158     postinstall()
159     {
160     mstartunit cups.service cupsd
161     mstartunit cups.socket cupsd
162     }
163    
164     postremove()
165     {
166     mstopunit cups.service cupsd
167     mstopunit cups.socket cupsd
168     }