Magellan Linux

Contents of /branches/magellan-next/core/cups/cups-1.4.7-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8403 - (show annotations) (download)
Mon Jul 18 13:17:53 2011 UTC (12 years, 10 months ago) by niro
File size: 3988 byte(s)
-fixed tmpfile
1 # $Id$
2
3 PNAME="cups"
4 PVER="1.4.7"
5 PBUILD="r1"
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}/${PNAME}-1.2.11-multilib.patch
42 mirror://${PNAME}/${PNAME}-1.4.1-backend-https.patch
43 mirror://${PNAME}/${PNAME}-1.4.7-systemd-socket.patch
44 )
45
46 UP2DATE="updatecmd ${HOMEPAGE} | grep 'Download CUPS' | grep v[0-9] | sed 's/.*v\([0-9].*\)\ (.*/\1/'"
47
48 src_prepare()
49 {
50 munpack ${SRCFILE} || die
51
52 # fix hardcoded /usr/lib in cups-directories.m4 to respect 64bit arches
53 mpatch ${PNAME}-1.2.11-multilib.patch || die
54
55 # create a missing symlink to allow https printing via IPP, bug #217293
56 mpatch ${PNAME}-1.4.1-backend-https.patch || die
57
58 # adds systemd socket activation support
59 mpatch ${PNAME}-1.4.7-systemd-socket.patch || die
60
61 # non standard configure
62 all-abis aclocal -I config-scripts || die
63 all-abis autoconf || die
64 }
65
66 src_compile()
67 {
68 mconfigure \
69 --localstatedir=/var \
70 --with-docdir=/usr/share/cups/html \
71 --with-systemdsystemunitdir=/lib/systemd/system \
72 --with-cups-user=lp \
73 --with-cups-group=lp \
74 --with-system-groups=lpadmin \
75 --enable-threads \
76 --enable-pam \
77 --enable-nls \
78 --enable-dbus \
79 --enable-png \
80 --enable-jpeg \
81 --enable-tiff \
82 --enable-libpaper \
83 --enable-dnssd \
84 --disable-slp \
85 --disable-php \
86 --disable-ldap \
87 || die
88
89 mmake || die
90 }
91
92 src_install()
93 {
94 mmake BUILDROOT=${BINDIR} install || die
95
96 # gzip *all* ppd's not just few
97 find ${BINDIR}/usr/share/cups/model -name "*.ppd" | xargs gzip -n9f || die
98
99 # remove 32bit serverbins and co on 64bit multilib systems
100 if [[ ${ARCH} = x86_64 ]]
101 then
102 [[ -d ${BINDIR}/usr/lib/cups ]] && ( rm -rf ${BINDIR}/usr/lib/cups || die; )
103 fi
104
105 # remove possible installed backup configs
106 find ${BINDIR}/etc -name "*.O" | xargs rm -f || die
107 find ${BINDIR}/etc -name "*.N" | xargs rm -f || die
108
109 # removing cups created init-scripts
110 rm -rf ${BINDIR}/etc/rc*.d || die
111
112 # remove /etc/init.d too
113 rm -rf ${BINDIR}/etc/init.d || die
114
115 # install our initscript
116 minstallrc cups.rc-${RC_CVS_REV} cups || die
117
118 # tempfile creation
119 minstalltmp cups.conf.tmpd cups.conf || die
120
121 # install logrotate config
122 minstalllog cups.logrotate cups || die
123
124 # ship some config files to keep many apps happy (javapps nxnode etc)
125 memptyfile /etc/cups/printers.conf || die
126 memptyfile /etc/cups/classes.conf || die
127 memptyfile /etc/cups/client.conf || die
128 memptyfile /etc/cups/subscriptions.conf || die
129
130 # prevents uninstall from prior versions
131 mkeepdir /usr/share/cups/profiles || die
132 mkeepdir /usr/$(mlibdir)/cups/driver || die
133 mkeepdir /var/log/cups || die
134 mkeepdir /var/run/cups/certs || die
135 mkeepdir /var/spool/cups || die
136 mkeepdir /var/spool/cups/tmp || die
137
138 # create a rss feed directory
139 mkeepdir /var/cache/cups/rss || die
140 mchown lp.lp /var/cache/cups/rss || die
141 mchmod 0740 /var/cache/cups/rss || die
142
143 # install missing docs
144 minstalldocs CHANGES* CREDITS* LICENSE* README* || die
145 }
146
147 preinstall()
148 {
149 ${MLIBDIR}/mgroupadd -o "-g 106" lpadmin
150 ${MLIBDIR}/mgroupadd -o "-g 9" lp
151 ${MLIBDIR}/museradd -o "-u 9 -g lp -d /var/spool/lpd -s /bin/false" lp
152 }
153
154 postinstall()
155 {
156 mstartunit cups.service cupsd
157 mstartunit cups.socket cupsd
158 }
159
160 postremove()
161 {
162 mstopunit cups.service cupsd
163 mstopunit cups.socket cupsd
164 }