Magellan Linux

Annotation of /trunk/extras/cups/cups-2.2.9-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31699 - (hide annotations) (download)
Wed Dec 5 15:51:37 2018 UTC (5 years, 5 months ago) by niro
File size: 6280 byte(s)
-removed upstream patch
1 niro 31698 # $Id$
2    
3     PNAME="cups"
4     PVER="2.2.9"
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-3.6
14     >= media-libs/libpng-1.5
15     >= media-libs/libtiff-4
16     >= virtual/libjpeg
17     >= net-dns/avahi-0.7
18     >= sys-libs/zlib-1.2.5
19     >= sys-libs/libstdc++-8.2
20     >= sys-apps/systemd-238"
21    
22     CUPS_DEPEND=">= sys-libs/pam-1.1
23     >= sys-apps/acl-2.2
24     >= sys-apps/dbus-1.10
25     >= dev-libs/libusb-compat-0.1.3
26     >= dev-libs/dbus-glib-0.110
27     >= app-text/libpaper-1.1.24
28     >= app-text/poppler-0.71"
29    
30     SDEPEND="${LIB_DEPEND}
31     ${CUPS_DEPEND}
32     >= sys-dev/automake-9
33     >= sys-dev/autoconf-10"
34    
35     SRCFILE="${PNAME}-${PVER}-source.tar.gz"
36     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
37    
38     sminclude mtools multilib mbuild systemd
39     msetfeature "!check"
40    
41     SRC_URI=(
42     https://github.com/apple/${PNAME}/releases/download/v${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}-2.2.8-systemd-socket.patch
49     mirror://${PNAME}/${PNAME}-1.5.0-build-fix.patch
50     mirror://${PNAME}/${PNAME}-2.1.4-dnssd-deviceid.patch
51     mirror://${PNAME}/${PNAME}-2.0.3-no-export-ssllibs.patch
52     mirror://${PNAME}/${PNAME}-2.2.3-no-gzip-man.patch
53     mirror://${PNAME}/${PNAME}-2.0.3-statedir.patch
54     mirror://${PNAME}/${PNAME}-2.2.5-perms.patch
55     )
56    
57     # exclude beta versions
58     UP2EXCLUDE="b[0-9]"
59     UP2DATE="updatecmd https://github.com/apple/cups/releases | grep ${PNAME}- | sed 's:-source::g' | highesttarball gz"
60    
61     split_info_libcups()
62     {
63     DESCRIPTION="cups: common unix printing system - client libraries and headers"
64     DEPEND="${LIB_DEPEND}"
65     }
66    
67     split_info_cups()
68     {
69     DESCRIPTION="cups: common unix printing system - service daemons."
70     DEPEND="== net-print/libcups-${PVER}
71     ${CUPS_DEPEND}"
72     }
73    
74     pkg_setup()
75     {
76     preinstall_cups
77     }
78    
79     src_prepare()
80     {
81     munpack ${SRCFILE} || die
82    
83     # fix hardcoded /usr/lib in cups-directories.m4 to respect 64bit arches
84     mpatch ${PNAME}-1.2.11-multilib.patch || die
85    
86     # adds systemd socket activation support
87     mpatch ${PNAME}-2.2.8-systemd-socket.patch || die
88    
89     # fix build, adds missing -lrt
90     mpatch ${PNAME}-1.5.0-build-fix.patch || die
91    
92     # mark DNSSD device-ids that have been guessed at with "FZY:1;"
93     mpatch ${PNAME}-2.1.4-dnssd-deviceid.patch || die
94    
95     # do not export SSL libs in cups-config
96     mpatch ${PNAME}-2.0.3-no-export-ssllibs.patch || die
97    
98     # do not compress man pages
99     mpatch ${PNAME}-2.2.3-no-gzip-man.patch || die
100    
101     # move /var/run -> /run
102     mpatch ${PNAME}-2.0.3-statedir.patch || die
103    
104     # fix broken install permissions
105     mpatch ${PNAME}-2.2.5-perms.patch || die
106    
107     # set MaxLogSize to 0 to prevent using cups internal log rotation
108     sed -i -e '5i\ ' conf/cupsd.conf.in
109     sed -i -e '6i# Disable cups internal logging - use logrotate instead' conf/cupsd.conf.in
110     sed -i -e '7iMaxLogSize 0' conf/cupsd.conf.in
111    
112     # non standard configure
113     all-abis aclocal -I config-scripts --force || die
114     all-abis autoconf --force || die
115     }
116    
117     src_compile()
118     {
119     mconfigure \
120     --localstatedir=/var \
121     --with-docdir=/usr/share/cups/html \
122     --with-systemdsystemunitdir=$(mget-systemd-unit-dir) \
123     --with-cups-user=lp \
124     --with-cups-group=lp \
125     --with-system-groups=lpadmin \
126     --enable-threads \
127     --enable-pam \
128     --enable-nls \
129     --enable-dbus \
130     --enable-png \
131     --enable-jpeg \
132     --enable-tiff \
133     --enable-libpaper \
134     --enable-avahi \
135     --enable-ssl=yes \
136     --enable-gnutls \
137     --enable-raw-printing \
138     --disable-slp \
139     --disable-php \
140     --disable-ldap \
141     || die
142    
143     mmake || die
144     }
145    
146     src_install_libcups()
147     {
148     mmake BUILDROOT=${BINDIR} install-headers || die
149     mmake BUILDROOT=${BINDIR} install-libs || die
150     # install config utiliy so other packages can find the libs
151     # because there a no pkgconfig files
152     minstallexec cups-config || die
153     }
154    
155     src_install_cups()
156     {
157     mmake BUILDROOT=${BINDIR} install-data || die
158     mmake BUILDROOT=${BINDIR} install-exec || die
159    
160     # provided by libcups
161     mdelete /usr/bin/cups-config || die
162    
163     # gzip *all* ppd's not just few
164     find ${BINDIR}/usr/share/cups/model -name "*.ppd" | xargs gzip -n9f || die
165    
166     # remove 32bit serverbins and co on 64bit multilib systems
167     if [[ ${ARCH} = x86_64 ]]
168     then
169     if [[ -d ${BINDIR}/usr/lib/cups ]]
170     then
171     mdelete -r /usr/lib/cups || die
172     fi
173     fi
174    
175     # remove possible installed backup configs
176     find ${BINDIR}/etc -name "*.O" | xargs rm -f || die
177     find ${BINDIR}/etc -name "*.N" | xargs rm -f || die
178    
179     # tempfile creation
180     minstalltmp cups.conf.tmpd cups.conf || die
181    
182     # install logrotate config
183     minstalllog cups.logrotate cups || die
184    
185     # install pam config
186     minstallpam cups.pam-systemauth cups || die
187    
188     # ship some config files to keep many apps happy (javapps nxnode etc)
189     memptyfile /etc/cups/printers.conf || die
190     memptyfile /etc/cups/classes.conf || die
191     memptyfile /etc/cups/client.conf || die
192     memptyfile /etc/cups/subscriptions.conf || die
193    
194     # prevents uninstall from prior versions
195     mkeepdir /usr/share/cups/profiles || die
196     mkeepdir /usr/$(mlibdir)/cups/driver || die
197     mkeepdir /var/log/cups || die
198     mkeepdir /var/run/cups/certs || die
199     mkeepdir /var/spool/cups || die
200     mkeepdir /var/spool/cups/tmp || die
201    
202     # create a rss feed directory
203     mkeepdir /var/cache/cups/rss || die
204     mchown lp.lp /var/cache/cups/rss || die
205     mchmod 0740 /var/cache/cups/rss || die
206    
207     # create a ssl directory to store cacerts and to fix some samba issues
208     mkeepdir /etc/cups/ssl || die
209     mchown root:lp /etc/cups/ssl || die
210     mchmod 0700 /etc/cups/ssl || die
211    
212     # fix cupsd permisions
213     mchmod 0755 /usr/sbin/cupsd || die
214    
215     # install missing docs
216     minstalldocs CHANGES* CREDITS* LICENSE* README* || die
217     }
218    
219     preinstall_cups()
220     {
221     mgroupadd -o "-g 106" lpadmin
222     mgroupadd -o "-g 9" lp
223     museradd -o "-u 9 -g lp -d /var/spool/lpd -s /bin/false" lp
224     }
225    
226     postinstall_cups()
227     {
228     # renamed cups services
229     if systemctl is-enabled cups.service &> /dev/null
230     then
231     systemctl disable cups.service
232     fi
233     if systemctl is-enabled cups.socket &> /dev/null
234     then
235     systemctl disable cups.socket
236     fi
237     if systemctl is-enabled cups.path &> /dev/null
238     then
239     systemctl disable cups.path
240     fi
241    
242     mstartunit org.cups.cupsd.service cupsd
243     mstartunit org.cups.cupsd.socket cupsd
244     }
245    
246     postremove_cups()
247     {
248     mstopunit org.cups.cupsd.service cupsd
249     mstopunit org.cups.cupsd.socket cupsd
250     }