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