1# 2# "$Id: cups.spec.in 12078 2014-07-31 11:45:57Z msweet $" 3# 4# RPM "spec" file for CUPS. 5# 6# Original version by Jason McMullan <jmcc@ontv.com>. 7# 8# Copyright 2007-2014 by Apple Inc. 9# Copyright 1999-2007 by Easy Software Products, all rights reserved. 10# 11# These coded instructions, statements, and computer programs are the 12# property of Apple Inc. and are protected by Federal copyright 13# law. Distribution and use rights are outlined in the file "LICENSE.txt" 14# which should have been included with this file. If this file is 15# file is missing or damaged, see the license at "http://www.cups.org/". 16# 17 18# Conditional build options (--with name/--without name): 19# 20# dbus - Enable/disable DBUS support (default = enable) 21# dnssd - Enable/disable DNS-SD support (default = enable) 22# libusb1 - Enable/disable LIBUSB 1.0 support (default = enable) 23# static - Enable/disable static libraries (default = enable) 24 25%{!?_with_dbus: %{!?_without_dbus: %define _with_dbus --with-dbus}} 26%{?_with_dbus: %define _dbus --enable-dbus} 27%{!?_with_dbus: %define _dbus --disable-dbus} 28 29%{!?_with_dnssd: %{!?_without_dnssd: %define _with_dnssd --with-dnssd}} 30%{?_with_dnssd: %define _dnssd --enable-dnssd} 31%{!?_with_dnssd: %define _dnssd --disable-dnssd} 32 33%{!?_with_libusb1: %{!?_without_libusb1: %define _with_libusb1 --with-libusb1}} 34%{?_with_libusb1: %define _libusb1 --enable-libusb} 35%{!?_with_libusb1: %define _libusb1 --disable-libusb} 36 37%{!?_with_static: %{!?_without_static: %define _without_static --without-static}} 38%{?_with_static: %define _static --enable-static} 39%{!?_with_static: %define _static --disable-static} 40 41%{!?_with_systemd: %{!?_without_systemd: %define _with_systemd --with-systemd}} 42%{?_with_systemd: %define _systemd --enable-systemd} 43%{!?_with_systemd: %define _systemd --disable-systemd} 44 45Summary: CUPS 46Name: cups 47Version: @CUPS_VERSION@ 48Release: 0 49Epoch: 1 50License: GPL 51Group: System Environment/Daemons 52Source: http://ftp.cups.org/pub/cups/%{version}/cups-%{version}-source.tar.bz2 53Url: http://www.cups.org 54Packager: Anonymous <anonymous@foo.com> 55Vendor: Apple Inc. 56 57# Package names are as defined for Red Hat (and clone) distributions 58BuildRequires: gnutls-devel, pam-devel 59 60%if %{?_with_dbus:1}%{!?_with_dbus:0} 61BuildRequires: dbus-devel 62%endif 63 64%if %{?_with_dnssd:1}%{!?_with_dnssd:0} 65BuildRequires: avahi-devel 66%endif 67 68%if %{?_with_libusb1:1}%{!?_with_libusb1:0} 69BuildRequires: libusb-devel >= 1.0 70%endif 71 72%if %{?_with_systemd:1}%{!?_with_systemd:0} 73BuildRequires: systemd-devel 74%endif 75 76# Use buildroot so as not to disturb the version already installed 77BuildRoot: /tmp/%{name}-root 78 79# Dependencies... 80Requires: %{name}-libs = %{epoch}:%{version} 81Obsoletes: lpd, lpr, LPRng 82Provides: lpd, lpr, LPRng 83Obsoletes: cups-da, cups-de, cups-es, cups-et, cups-fi, cups-fr, cups-he 84Obsoletes: cups-id, cups-it, cups-ja, cups-ko, cups-nl, cups-no, cups-pl 85Obsoletes: cups-pt, cups-ru, cups-sv, cups-zh 86 87%package devel 88Summary: CUPS - development environment 89Group: Development/Libraries 90Requires: %{name}-libs = %{epoch}:%{version} 91 92%package libs 93Summary: CUPS - shared libraries 94Group: System Environment/Libraries 95Provides: libcups1 96 97%package lpd 98Summary: CUPS - LPD support 99Group: System Environment/Daemons 100Requires: %{name} = %{epoch}:%{version} xinetd 101 102%description 103CUPS is the standards-based, open source printing system developed by 104Apple Inc. for OS X and other UNIX®-like operating systems. 105 106%description devel 107This package provides the CUPS headers and development environment. 108 109%description libs 110This package provides the CUPS shared libraries. 111 112%description lpd 113This package provides LPD client support. 114 115%prep 116%setup 117 118%build 119CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" \ 120 ./configure %{_dbus} %{_dnssd} %{_libusb1} %{_static} 121# If we got this far, all prerequisite libraries must be here. 122make 123 124%install 125# Make sure the RPM_BUILD_ROOT directory exists. 126rm -rf $RPM_BUILD_ROOT 127 128make BUILDROOT=$RPM_BUILD_ROOT install 129rm -rf $RPM_BUILD_ROOT/usr/share/cups/banners $RPM_BUILD_ROOT/usr/share/cups/data 130 131%post 132/sbin/chkconfig --add cups 133/sbin/chkconfig cups on 134 135# Restart cupsd if we are upgrading... 136if test $1 -gt 1; then 137 /sbin/service cups stop 138 /sbin/service cups start 139fi 140 141%post libs 142/sbin/ldconfig 143 144%preun 145if test $1 = 0; then 146 /sbin/service cups stop 147 /sbin/chkconfig --del cups 148fi 149 150%postun 151if test $1 -ge 1; then 152 /sbin/service cups stop 153 /sbin/service cups start 154fi 155 156%postun libs 157/sbin/ldconfig 158 159%clean 160rm -rf $RPM_BUILD_ROOT 161 162%files 163%docdir /usr/share/doc/cups 164%defattr(-,root,root) 165%dir /etc/cups 166%config(noreplace) /etc/cups/*.conf 167/etc/cups/cupsd.conf.default 168%dir /etc/cups/interfaces 169%dir /etc/cups/ppd 170%attr(0700,root,root) %dir /etc/cups/ssl 171 172%if %{?_with_dbus:1}%{!?_with_dbus:0} 173# DBUS 174/etc/dbus-1/system.d/* 175%endif 176 177# PAM 178%dir /etc/pam.d 179/etc/pam.d/* 180 181%if %{?_with_systemd:1}%{!?_with_systemd:0} 182# SystemD 183/usr/lib/systemd/system/* 184 185%else 186# Legacy init support on Linux 187/etc/init.d/* 188/etc/rc0.d/* 189/etc/rc2.d/* 190/etc/rc3.d/* 191/etc/rc5.d/* 192%endif 193 194/usr/bin/cancel 195/usr/bin/cupstestdsc 196/usr/bin/cupstestppd 197/usr/bin/ippfind 198/usr/bin/ipptool 199/usr/bin/lp* 200%dir /usr/lib/cups 201%dir /usr/lib/cups/backend 202%if %{?_with_dnssd:1}%{!?_with_dnssd:0} 203# DNS-SD 204/usr/lib/cups/backend/dnssd 205%endif 206/usr/lib/cups/backend/http 207/usr/lib/cups/backend/https 208%attr(0700,root,root) /usr/lib/cups/backend/ipp 209/usr/lib/cups/backend/ipps 210%attr(0700,root,root) /usr/lib/cups/backend/lpd 211/usr/lib/cups/backend/snmp 212/usr/lib/cups/backend/socket 213/usr/lib/cups/backend/usb 214%dir /usr/lib/cups/cgi-bin 215/usr/lib/cups/cgi-bin/* 216%dir /usr/lib/cups/daemon 217/usr/lib/cups/daemon/cups-deviced 218/usr/lib/cups/daemon/cups-driverd 219/usr/lib/cups/daemon/cups-exec 220%dir /usr/lib/cups/driver 221%dir /usr/lib/cups/filter 222/usr/lib/cups/filter/* 223%dir /usr/lib/cups/monitor 224/usr/lib/cups/monitor/* 225%dir /usr/lib/cups/notifier 226/usr/lib/cups/notifier/* 227 228/usr/sbin/* 229%dir /usr/share/cups 230%dir /usr/share/cups/drv 231/usr/share/cups/drv/* 232%dir /usr/share/cups/ipptool 233/usr/share/cups/ipptool/* 234%dir /usr/share/cups/mime 235/usr/share/cups/mime/* 236%dir /usr/share/cups/model 237%dir /usr/share/cups/ppdc 238/usr/share/cups/ppdc/* 239%dir /usr/share/cups/templates 240/usr/share/cups/templates/* 241%if %{?_with_libusb1:1}%{!?_with_libusb1:0} 242# LIBUSB quirks files 243%dir /usr/share/cups/usb 244/usr/share/cups/usb/* 245%endif 246 247%dir /usr/share/doc/cups 248/usr/share/doc/cups/*.* 249%dir /usr/share/doc/cups/help 250/usr/share/doc/cups/help/accounting.html 251/usr/share/doc/cups/help/cgi.html 252/usr/share/doc/cups/help/glossary.html 253/usr/share/doc/cups/help/kerberos.html 254/usr/share/doc/cups/help/license.html 255/usr/share/doc/cups/help/man-*.html 256/usr/share/doc/cups/help/network.html 257/usr/share/doc/cups/help/options.html 258/usr/share/doc/cups/help/overview.html 259/usr/share/doc/cups/help/policies.html 260/usr/share/doc/cups/help/ref-*.html 261/usr/share/doc/cups/help/security.html 262/usr/share/doc/cups/help/sharing.html 263/usr/share/doc/cups/help/translation.html 264%dir /usr/share/doc/cups/images 265/usr/share/doc/cups/images/* 266 267#%dir /usr/share/doc/cups/ca 268#/usr/share/doc/cups/ca/* 269#%dir /usr/share/doc/cups/cs 270#/usr/share/doc/cups/cs/* 271#%dir /usr/share/doc/cups/es 272#/usr/share/doc/cups/es/* 273#%dir /usr/share/doc/cups/fr 274#/usr/share/doc/cups/fr/* 275#%dir /usr/share/doc/cups/ja 276#/usr/share/doc/cups/ja/* 277#%dir /usr/share/doc/cups/ru 278#/usr/share/doc/cups/ru/* 279 280%dir /usr/share/locale/ca 281/usr/share/locale/ca/cups_ca.po 282%dir /usr/share/locale/cs 283/usr/share/locale/cs/cups_cs.po 284%dir /usr/share/locale/es 285/usr/share/locale/es/cups_es.po 286%dir /usr/share/locale/fr 287/usr/share/locale/fr/cups_fr.po 288%dir /usr/share/locale/it 289/usr/share/locale/it/cups_it.po 290%dir /usr/share/locale/ja 291/usr/share/locale/ja/cups_ja.po 292%dir /usr/share/locale/ru 293/usr/share/locale/ru/cups_ru.po 294 295%dir /usr/share/man/man1 296/usr/share/man/man1/cancel.1.gz 297/usr/share/man/man1/cups.1.gz 298/usr/share/man/man1/cupstestdsc.1.gz 299/usr/share/man/man1/cupstestppd.1.gz 300/usr/share/man/man1/ippfind.1.gz 301/usr/share/man/man1/ipptool.1.gz 302/usr/share/man/man1/lp.1.gz 303/usr/share/man/man1/lpoptions.1.gz 304/usr/share/man/man1/lpq.1.gz 305/usr/share/man/man1/lpr.1.gz 306/usr/share/man/man1/lprm.1.gz 307/usr/share/man/man1/lpstat.1.gz 308%dir /usr/share/man/man5 309/usr/share/man/man5/*.conf.5.gz 310/usr/share/man/man5/ipptoolfile.5.gz 311/usr/share/man/man5/mime.*.5.gz 312%dir /usr/share/man/man8 313/usr/share/man/man8/accept.8.gz 314/usr/share/man/man8/cups-deviced.8.gz 315/usr/share/man/man8/cups-driverd.8.gz 316/usr/share/man/man8/cups-exec.8.gz 317/usr/share/man/man8/cups-snmp.8.gz 318/usr/share/man/man8/cupsaddsmb.8.gz 319/usr/share/man/man8/cupsaccept.8.gz 320/usr/share/man/man8/cupsctl.8.gz 321/usr/share/man/man8/cupsfilter.8.gz 322/usr/share/man/man8/cupsd.8.gz 323/usr/share/man/man8/cupsd-helper.8.gz 324/usr/share/man/man8/cupsd-logs.8.gz 325/usr/share/man/man8/cupsdisable.8.gz 326/usr/share/man/man8/cupsenable.8.gz 327/usr/share/man/man8/cupsreject.8.gz 328/usr/share/man/man8/lpadmin.8.gz 329/usr/share/man/man8/lpc.8.gz 330/usr/share/man/man8/lpinfo.8.gz 331/usr/share/man/man8/lpmove.8.gz 332/usr/share/man/man8/reject.8.gz 333 334%dir /var/cache/cups 335%attr(0775,root,sys) %dir /var/cache/cups/rss 336%dir /var/log/cups 337%dir /var/run/cups 338%attr(0711,lp,sys) %dir /var/run/cups/certs 339%attr(0710,lp,sys) %dir /var/spool/cups 340%attr(1770,lp,sys) %dir /var/spool/cups/tmp 341 342# Desktop files 343/usr/share/applications/* 344/usr/share/icons/* 345 346%files devel 347%defattr(-,root,root) 348%dir /usr/share/cups/examples 349/usr/share/cups/examples/* 350%dir /usr/share/man/man1 351/usr/share/man/man1/cups-config.1.gz 352/usr/share/man/man1/ppd*.1.gz 353%dir /usr/share/man/man5 354/usr/share/man/man5/ppdcfile.5.gz 355/usr/share/man/man7/backend.7.gz 356/usr/share/man/man7/filter.7.gz 357/usr/share/man/man7/notifier.7.gz 358 359/usr/bin/cups-config 360/usr/bin/ppd* 361%dir /usr/include/cups 362/usr/include/cups/* 363/usr/lib*/*.so 364 365%if %{?_with_static:1}%{!?_with_static:0} 366/usr/lib*/*.a 367%endif 368 369%dir /usr/share/doc/cups/help 370/usr/share/doc/cups/help/api*.html 371/usr/share/doc/cups/help/postscript-driver.html 372/usr/share/doc/cups/help/ppd-compiler.html 373/usr/share/doc/cups/help/raster-driver.html 374/usr/share/doc/cups/help/spec*.html 375 376%files libs 377%defattr(-,root,root) 378/usr/lib*/*.so.* 379 380%files lpd 381%defattr(-,root,root) 382/etc/xinetd.d/cups-lpd 383%dir /usr/lib/cups 384%dir /usr/lib/cups/daemon 385/usr/lib/cups/daemon/cups-lpd 386%dir /usr/share/man/man8 387/usr/share/man/man8/cups-lpd.8.gz 388 389 390# 391# End of "$Id: cups.spec.in 12078 2014-07-31 11:45:57Z msweet $". 392# 393