Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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