Projects
home:pandora:RobinOS23
cups
_service:download_src_package:cups.spec
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:download_src_package:cups.spec of Package cups
%define anolis_release 1 %global use_alternatives 1 %global lspp 1 # {_exec_prefix}/lib/cups is correct, even on x86_64. # It is not used for shared objects but for executables. # It's more of a libexec-style ({_libexecdir}) usage, # but we use lib for compatibility with 3rd party drivers (at upstream request). %global cups_serverbin %{_exec_prefix}/lib/cups %global VERSION %{version} Summary: CUPS printing system Name: cups Epoch: 1 Version: 2.4.2 Release: %{anolis_release}%{dist} License: ASL 2.0 Url: https://openprinting.github.io/cups/ # Apple stopped uploading the new versions into github, use OpenPrinting fork Source0: https://github.com/OpenPrinting/cups/releases/download/v%{VERSION}/cups-%{VERSION}-source.tar.gz # Pixmap for desktop file Source1: cupsprinter.png # cups_serverbin macro definition for use during builds Source2: macros.cups ##### Patches removed because IMHO they aren't no longer needed ##### but still I'll leave them in git in case their removal ##### breaks something. BuildRequires: automake # gcc and gcc-c++ is no longer in buildroot by default # gcc for most of files BuildRequires: gcc # gcc-c++ for ppdc and cups-driverd Buildrequires: gcc-c++ BuildRequires: krb5-devel BuildRequires: libacl-devel # make is used for compilation BuildRequires: make BuildRequires: openldap-devel BuildRequires: pam-devel BuildRequires: pkgconf-pkg-config BuildRequires: pkgconfig(avahi-client) BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(gnutls) BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(libusb-1.0) # Make sure we get postscriptdriver tags. BuildRequires: python3-cups BuildRequires: systemd # needed for systemd rpm macros according FPG BuildRequires: systemd-rpm-macros # needed for decompressing functions when reading from gzipped ppds BuildRequires: zlib-devel %if %{lspp} BuildRequires: libselinux-devel BuildRequires: audit-libs-devel %endif Recommends: nss-mdns # avahi is needed for mDNS discovery and sharing queues Recommends: avahi # We ship udev rules which use setfacl. Requires: acl Requires: %{name}-client = %{epoch}:%{version}-%{release} Requires: %{name}-filesystem = %{epoch}:%{version}-%{release} # Make sure we have some filters for converting to raster format. Requires: cups-filters Requires: %{name}-libs = %{epoch}:%{version}-%{release} Requires: dbus Requires: systemd # Requires working PrivateTmp (bug #807672) Requires(pre): systemd Requires(post): systemd Requires(post): grep, sed Requires(preun): systemd Requires(postun): systemd %package doc Summary: Documentation files for %{name} Requires: %{name} = %{epoch}:%{version}-%{release} BuildArch: noarch %description doc The %{name}-doc package contains documentation files for %{name}. %package client Summary: CUPS printing system - client programs License: GPLv2 Requires: %{name}-libs = %{epoch}:%{version}-%{release} %if %{use_alternatives} Provides: /usr/bin/lpq /usr/bin/lpr /usr/bin/lp /usr/bin/cancel /usr/bin/lprm /usr/bin/lpstat Requires: /usr/sbin/alternatives %endif Provides: lpr %package devel Summary: CUPS printing system - development environment License: LGPLv2 Requires: %{name}-libs = %{epoch}:%{version}-%{release} Requires: gnutls-devel Requires: krb5-devel Requires: zlib-devel %package libs Summary: CUPS printing system - libraries License: LGPLv2 and zlib %package filesystem Summary: CUPS printing system - directory layout BuildArch: noarch %package lpd Summary: CUPS printing system - lpd emulation Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name}-libs = %{epoch}:%{version}-%{release} Provides: lpd %package ipptool Summary: CUPS printing system - tool for performing IPP requests Requires: %{name}-libs = %{epoch}:%{version}-%{release} # ippfind needs avahi for printer discovery Requires: avahi # mdns address resolver (nss-mdns or systemd-resolved) is needed too, # but don't require a specific package for now and let the user to choose # what to use Recommends: nss-mdns %package printerapp Summary: CUPS printing system - tools for printer application Requires: %{name}-libs = %{epoch}:%{version}-%{release} # ippeveprinter needs avahi for registering and sharing printer Requires: avahi # mdns address resolver (nss-mdns or systemd-resolved) is needed too, # but don't require a specific package for now and let the user to choose # what to use Recommends: nss-mdns %description CUPS printing system provides a portable printing layer for UNIX® operating systems. It has been developed by Apple Inc. to promote a standard printing solution for all UNIX vendors and users. CUPS provides the System V and Berkeley command-line interfaces. %description client CUPS printing system provides a portable printing layer for UNIX® operating systems. This package contains command-line client programs. %description devel CUPS printing system provides a portable printing layer for UNIX® operating systems. This is the development package for creating additional printer drivers, and other CUPS services. %description libs CUPS printing system provides a portable printing layer for UNIX® operating systems. It has been developed by Apple Inc. to promote a standard printing solution for all UNIX vendors and users. CUPS provides the System V and Berkeley command-line interfaces. The cups-libs package provides libraries used by applications to use CUPS natively, without needing the lp/lpr commands. %description filesystem CUPS printing system provides a portable printing layer for UNIX® operating systems. This package provides some directories which are required by other packages that add CUPS drivers (i.e. filters, backends etc.). %description lpd CUPS printing system provides a portable printing layer for UNIX® operating systems. This is the package that provides standard lpd emulation. %description ipptool Sends IPP requests to the specified URI and tests and/or displays the results. %description printerapp Provides IPP everywhere printer application ippeveprinter and tools for printing PostScript and HP PCL document formats - ippevepcl and ippeveps. The printer application enables older printers for IPP everywhere standard - so if older printer is installed with a printer application, its print queue acts as IPP everywhere printer to CUPS daemon. This solution will substitute printer drivers and raw queues in the future. %prep %setup -q -n cups-%{VERSION} # Log to the system journal by default (bug #1078781, bug #1519331). sed -i -e 's,^ErrorLog .*$,ErrorLog syslog,' conf/cups-files.conf.in sed -i -e 's,^AccessLog .*$,AccessLog syslog,' conf/cups-files.conf.in sed -i -e 's,^PageLog .*,PageLog syslog,' conf/cups-files.conf.in # Let's look at the compilation command lines. perl -pi -e "s,^.SILENT:,," Makedefs.in # remove this once we don't have any patches changing configure stuff aclocal -I config-scripts autoconf -f -I config-scripts %build # cups can use different compiler if it is installed, so set to GCC for to be sure export CC=%{__cc} export CXX=%{__cxx} export DSOFLAGS="$DSOFLAGS $RPM_LD_FLAGS" export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -DLDAP_DEPRECATED=1" export CXXFLAGS="$CXXFLAGS $RPM_OPT_FLAGS -DLDAP_DEPRECATED=1" export LDFLAGS="$LDFLAGS $RPM_LD_FLAGS -Wall -fstack-clash-protection -D_FORTIFY_SOURCE=2" # --enable-debug to avoid stripping binaries %configure --with-docdir=%{_datadir}/%{name}/www --enable-debug \ %if %{lspp} --enable-lspp \ %endif --with-exe-file-perm=0755 \ --with-cupsd-file-perm=0755 \ --with-log-file-perm=0600 \ --enable-relro \ --with-dbusdir=%{_sysconfdir}/dbus-1 \ --enable-avahi \ --enable-threads \ --enable-gnutls \ --enable-webif \ --with-xinetd=no \ --with-access-log-level=actions \ --enable-page-logging \ --with-rundir=%{_rundir}/cups \ --enable-sync-on-close \ localedir=%{_datadir}/locale # If we got this far, all prerequisite libraries must be here. %make_build %install # %%make_install macro results into permission error during install phase, # because it sets INSTALL env to 'install -p'. # use the old make invocation for now, fix this upstream when upstream will # have a time for github issues make install DESTDIR=%{buildroot} rm -rf %{buildroot}%{_initddir} \ %{buildroot}%{_sysconfdir}/init.d \ %{buildroot}%{_sysconfdir}/rc?.d mkdir -p %{buildroot}%{_unitdir} find %{buildroot}%{_datadir}/cups/model -name "*.ppd" |xargs gzip -n9f %if %{use_alternatives} pushd %{buildroot}%{_bindir} for i in cancel lp lpq lpr lprm lpstat; do mv $i $i.cups done cd %{buildroot}%{_sbindir} mv lpc lpc.cups cd %{buildroot}%{_mandir}/man1 for i in cancel lp lpq lpr lprm lpstat; do mv $i.1 $i-cups.1 done cd %{buildroot}%{_mandir}/man8 mv lpc.8 lpc-cups.8 popd %endif mkdir -p %{buildroot}%{_datadir}/pixmaps %{buildroot}%{_sysconfdir}/X11/sysconfig %{buildroot}%{_sysconfdir}/X11/applnk/System install -p -m 644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps # Ship an rpm macro for where to put driver executables. mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d install -m 0644 %{SOURCE2} %{buildroot}%{_rpmconfigdir}/macros.d # Ship a printers.conf file, and a client.conf file. That way, they get # their SELinux file contexts set correctly. touch %{buildroot}%{_sysconfdir}/cups/printers.conf touch %{buildroot}%{_sysconfdir}/cups/classes.conf touch %{buildroot}%{_sysconfdir}/cups/client.conf touch %{buildroot}%{_sysconfdir}/cups/subscriptions.conf touch %{buildroot}%{_sysconfdir}/cups/lpoptions # deny MD5 digest authentication by default in client.conf cat > %{buildroot}%{_sysconfdir}/cups/client.conf <<EOF # MD5 Digest authentication is turned off by default # because MD5 is marked as insecure for authentication. # # If you need MD5 Digest authentication and you are aware of # potential security risk, turn MD5 Digest authentication on # by changing the directive value to 'None'. DigestOptions DenyMD5 EOF # LSB 3.2 printer driver directory mkdir -p %{buildroot}%{_datadir}/ppd # Remove unshipped files. rm -rf %{buildroot}%{_mandir}/cat? %{buildroot}%{_mandir}/*/cat? rm -f %{buildroot}%{_datadir}/applications/cups.desktop rm -rf %{buildroot}%{_datadir}/icons # there are pdf-banners shipped with cups-filters (#919489) rm -rf %{buildroot}%{_datadir}/cups/banners rm -f %{buildroot}%{_datadir}/cups/data/testprint # install /usr/lib/tmpfiles.d/cups.conf (bug #656566, bug #893834) mkdir -p %{buildroot}%{_tmpfilesdir} cat > %{buildroot}%{_tmpfilesdir}/cups.conf <<EOF # See tmpfiles.d(5) for details d %{_rundir}/cups 0755 root lp - d %{_rundir}/cups/certs 0511 lp sys - d /var/spool/cups/tmp - - - 30d EOF # /usr/lib/tmpfiles.d/cups-lp.conf (bug #812641) cat > %{buildroot}%{_tmpfilesdir}/cups-lp.conf <<EOF # Legacy parallel port character device nodes, to trigger the # auto-loading of the kernel module on access. # # See tmpfiles.d(5) for details c /dev/lp0 0660 root lp - 6:0 c /dev/lp1 0660 root lp - 6:1 c /dev/lp2 0660 root lp - 6:2 c /dev/lp3 0660 root lp - 6:3 EOF find %{buildroot} -type f -o -type l | sed ' s:.*\('%{_datadir}'/\)\([^/_]\+\)\(.*\.po$\):%lang(\2) \1\2\3: /^%lang(C)/d /^\([^%].*\)/d ' > %{name}.lang %post %systemd_post %{name}.path %{name}.socket %{name}.service # remove this after F36 is EOL # - previously the file was empty by default, so check whether the directive exists # and if not, add the directive+value # - we don't check for directive value in case some users already know they need MD5 # Digest authentication, so we won't break their setup with every update # - ^\s* prevents matching comments and ignores whitespaces at the beginning grep '^\s*DigestOptions' %{_sysconfdir}/cups/client.conf &> /dev/null || echo 'DigestOptions DenyMD5' \ >> %{_sysconfdir}/cups/client.conf %post client %if %{use_alternatives} /usr/sbin/alternatives --install %{_bindir}/lpr print %{_bindir}/lpr.cups 40 \ --slave %{_bindir}/lp print-lp %{_bindir}/lp.cups \ --slave %{_bindir}/lpq print-lpq %{_bindir}/lpq.cups \ --slave %{_bindir}/lprm print-lprm %{_bindir}/lprm.cups \ --slave %{_bindir}/lpstat print-lpstat %{_bindir}/lpstat.cups \ --slave %{_bindir}/cancel print-cancel %{_bindir}/cancel.cups \ --slave %{_sbindir}/lpc print-lpc %{_sbindir}/lpc.cups \ --slave %{_mandir}/man1/cancel.1.gz print-cancelman %{_mandir}/man1/cancel-cups.1.gz \ --slave %{_mandir}/man1/lp.1.gz print-lpman %{_mandir}/man1/lp-cups.1.gz \ --slave %{_mandir}/man8/lpc.8.gz print-lpcman %{_mandir}/man8/lpc-cups.8.gz \ --slave %{_mandir}/man1/lpq.1.gz print-lpqman %{_mandir}/man1/lpq-cups.1.gz \ --slave %{_mandir}/man1/lpr.1.gz print-lprman %{_mandir}/man1/lpr-cups.1.gz \ --slave %{_mandir}/man1/lprm.1.gz print-lprmman %{_mandir}/man1/lprm-cups.1.gz \ --slave %{_mandir}/man1/lpstat.1.gz print-lpstatman %{_mandir}/man1/lpstat-cups.1.gz || : %endif %post lpd %systemd_post cups-lpd.socket %ldconfig_scriptlets libs %preun %systemd_preun %{name}.path %{name}.socket %{name}.service %preun client %if %{use_alternatives} if [ $1 -eq 0 ] ; then /usr/sbin/alternatives --remove print %{_bindir}/lpr.cups || : fi %endif %preun lpd %systemd_preun cups-lpd.socket %postun %systemd_postun_with_restart %{name}.path %{name}.socket %{name}.service %postun lpd %systemd_postun_with_restart cups-lpd.socket %triggerin -- samba-client ln -sf %{_libexecdir}/samba/cups_backend_smb %{cups_serverbin}/backend/smb || : %triggerun -- samba-client [ $2 = 0 ] || exit 0 rm -f %{cups_serverbin}/backend/smb %files -f %{name}.lang %{_bindir}/cupstestppd %{_bindir}/ppd* %{_sbindir}/* # client subpackage %exclude %{_sbindir}/lpc.cups %dir %{cups_serverbin}/daemon %{cups_serverbin}/daemon/cups-deviced %{cups_serverbin}/daemon/cups-driverd %{cups_serverbin}/daemon/cups-exec %{cups_serverbin}/backend/* %{cups_serverbin}/cgi-bin %{cups_serverbin}/filter/* %{cups_serverbin}/monitor %{cups_serverbin}/notifier %{_datadir}/cups/drv/sample.drv %{_datadir}/cups/examples %{_datadir}/cups/mime/mime.types %{_datadir}/cups/mime/mime.convs %{_datadir}/cups/ppdc/*.defs %{_datadir}/cups/ppdc/*.h %dir %{_datadir}/cups/templates %{_datadir}/cups/templates/*.tmpl %dir %{_datadir}/cups/templates/da %{_datadir}/cups/templates/da/*.tmpl %dir %{_datadir}/cups/templates/de %{_datadir}/cups/templates/de/*.tmpl %dir %{_datadir}/cups/templates/es %{_datadir}/cups/templates/es/*.tmpl %dir %{_datadir}/cups/templates/fr %{_datadir}/cups/templates/fr/*.tmpl %dir %{_datadir}/cups/templates/ja %{_datadir}/cups/templates/ja/*.tmpl %dir %{_datadir}/cups/templates/pt_BR %{_datadir}/cups/templates/pt_BR/*.tmpl %dir %{_datadir}/cups/templates/ru %{_datadir}/cups/templates/ru/*.tmpl %dir %{_datadir}/%{name}/usb %{_datadir}/%{name}/usb/org.cups.usb-quirks %dir %{_datadir}/%{name}/www %{_datadir}/%{name}/www/images %{_datadir}/%{name}/www/*.css %{_datadir}/%{name}/www/index.html %{_datadir}/%{name}/www/help %{_datadir}/%{name}/www/robots.txt %{_datadir}/%{name}/www/fr/index.html %{_datadir}/%{name}/www/da/index.html %{_datadir}/%{name}/www/de/index.html %{_datadir}/%{name}/www/es/index.html %{_datadir}/%{name}/www/ja/index.html %{_datadir}/%{name}/www/ru/index.html %{_datadir}/%{name}/www/pt_BR/index.html %{_datadir}/%{name}/www/apple-touch-icon.png %dir %{_datadir}/%{name}/www/de %dir %{_datadir}/%{name}/www/es %dir %{_datadir}/%{name}/www/ja %dir %{_datadir}/%{name}/www/pt_BR %dir %{_datadir}/%{name}/www/ru %{_datadir}/pixmaps/cupsprinter.png %dir %attr(1770,root,lp) %{_localstatedir}/spool/cups/tmp %dir %attr(0710,root,lp) %{_localstatedir}/spool/cups %dir %attr(0755,root,lp) %{_localstatedir}/log/cups %{_mandir}/man[1578]/* # client subpackage %exclude %{_mandir}/man1/lp*.1.gz %exclude %{_mandir}/man1/cancel-cups.1.gz %exclude %{_mandir}/man8/lpc-cups.8.gz # devel subpackage %exclude %{_mandir}/man1/cups-config.1.gz # ipptool subpackage %exclude %{_mandir}/man1/ipptool.1.gz %exclude %{_mandir}/man5/ipptoolfile.5.gz # lpd subpackage %exclude %{_mandir}/man8/cups-lpd.8.gz # printerapp %exclude %{_mandir}/man1/ippeveprinter.1.gz %exclude %{_mandir}/man7/ippevepcl.7.gz %exclude %{_mandir}/man7/ippeveps.7.gz %dir %attr(0755,root,lp) %{_rundir}/cups %dir %attr(0511,lp,sys) %{_rundir}/cups/certs %dir %attr(0755,root,lp) %{_sysconfdir}/cups %attr(0640,root,lp) %{_sysconfdir}/cups/cupsd.conf.default %verify(not md5 size mtime) %config(noreplace) %attr(0640,root,lp) %{_sysconfdir}/cups/cupsd.conf %verify(not md5 size mtime) %config(noreplace) %attr(0640,root,lp) %{_sysconfdir}/cups/cups-files.conf %attr(0640,root,lp) %{_sysconfdir}/cups/cups-files.conf.default %verify(not md5 size mtime) %config(noreplace) %attr(0644,root,lp) %{_sysconfdir}/cups/client.conf %verify(not md5 size mtime) %config(noreplace) %attr(0600,root,lp) %{_sysconfdir}/cups/classes.conf %verify(not md5 size mtime) %config(noreplace) %attr(0600,root,lp) %{_sysconfdir}/cups/printers.conf %verify(not md5 size mtime) %config(noreplace) %attr(0644,root,lp) %{_sysconfdir}/cups/snmp.conf %attr(0640,root,lp) %{_sysconfdir}/cups/snmp.conf.default %verify(not md5 size mtime) %config(noreplace) %attr(0640,root,lp) %{_sysconfdir}/cups/subscriptions.conf %verify(not md5 size mtime) %config(noreplace) %attr(0644,root,lp) %{_sysconfdir}/cups/lpoptions %dir %attr(0755,root,lp) %{_sysconfdir}/cups/ppd %dir %attr(0700,root,lp) %{_sysconfdir}/cups/ssl %config(noreplace) %{_sysconfdir}/dbus-1/system.d/cups.conf %config(noreplace) %{_sysconfdir}/pam.d/cups %{_tmpfilesdir}/cups.conf %{_tmpfilesdir}/cups-lp.conf %attr(0644, root, root)%{_unitdir}/%{name}.service %attr(0644, root, root)%{_unitdir}/%{name}.socket %attr(0644, root, root)%{_unitdir}/%{name}.path %files doc %doc README.md CREDITS.md CHANGES.md %files client %{_bindir}/cancel* %{_bindir}/lp* %{_sbindir}/lpc.cups %{_mandir}/man1/cancel-cups.1.gz %{_mandir}/man1/lp*.1.gz %{_mandir}/man8/lpc-cups.8.gz %files libs %{license} LICENSE %{license} NOTICE %{_libdir}/libcups.so.2 %{_libdir}/libcupsimage.so.2 /usr/lib/pkgconfig/cups.pc %files filesystem %dir %{cups_serverbin} %dir %{cups_serverbin}/backend %dir %{cups_serverbin}/driver %dir %{cups_serverbin}/filter %dir %{_datadir}/cups %dir %{_datadir}/cups/data %dir %{_datadir}/cups/drv %dir %{_datadir}/cups/mime %dir %{_datadir}/cups/model %dir %{_datadir}/cups/ppdc %dir %{_datadir}/ppd %files devel %{_bindir}/cups-config %{_includedir}/cups %{_libdir}/*.so %{_mandir}/man1/cups-config.1.gz %{_rpmconfigdir}/macros.d/macros.cups %files lpd %{cups_serverbin}/daemon/cups-lpd %{_mandir}/man8/cups-lpd.8.gz %attr(0644, root, root)%{_unitdir}/cups-lpd.socket %attr(0644, root, root)%{_unitdir}/cups-lpd@.service %files ipptool %{_bindir}/ippfind %{_bindir}/ipptool %dir %{_datadir}/cups/ipptool %{_datadir}/cups/ipptool/* %{_mandir}/man1/ipptool.1.gz %{_mandir}/man5/ipptoolfile.5.gz %files printerapp %{_bindir}/ippeveprinter %dir %{cups_serverbin}/command %{cups_serverbin}/command/ippevepcl %{cups_serverbin}/command/ippeveps %{_mandir}/man1/ippeveprinter.1.gz %{_mandir}/man7/ippevepcl.7.gz %{_mandir}/man7/ippeveps.7.gz %changelog * Fri Sep 23 2022 mgb01105731 <mgb01105731@alibaba-inc.com> - 2.4.2-1 - update to 2.4.2 * Mon Apr 11 2022 Zhongling He <zhonglingh@linux.alibaba.com> 2.4.1-1 - Init package from upstream v2.4.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2