%define _libexecdir %{_libdir}
%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
%define initdir %{_sysconfdir}/rc.d/init.d
%define use_alternatives 1
%define use_dbus 1
%define use_avahi 1

Summary: Common Unix Printing System
Name: cups
Version: 1.4.8
Release: 6%{?_dist_release}
License: GPL
Group: System Environment/Daemons

Vendor: Project Vine
Distribution: Vine Linux
Packager: daisuke, tomop

Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
# Our initscript
Source1: cups.init
# Pixmap for desktop file
Source2: cupsprinter.png
# udev rules for libusb devices
Source3: cups-libusb.rules
# LSPP-required ps->pdf filter
Source4: pstopdf
# xinetd config file for cups-lpd service
Source5: cups-lpd
# Logrotate configuration
Source6: cups.logrotate
# Backend for NCP protocol
Source7: ncp.backend
# Cron-based tmpwatch for /var/spool/cups/tmp
Source8: cups.cron
# Filter and PPD for textonly printing
Source9: textonly.filter
Source10: textonly.ppd
Source11: macros.cups

Source101: http://www.openprinting.org/download/printing/dnssd
Source102: pstoraster
Source103: pstoraster.convs
Source104: postscript.ppd.gz
Source105: pdftops.conf

Source201: dvitops
Source202: dvitops.convs
Source203: dvitops.types
Source204: cjktexttops
Source206: pxlmono.ppd.gz
Source207: pxlcolor.ppd.gz
Source208: cups.conf

Patch1: cups-no-gzip-man.patch
Patch2: cups-1.1.16-system-auth.patch
Patch3: cups-multilib.patch
Patch4: cups-serial.patch
Patch5: cups-banners.patch
Patch6: cups-serverbin-compat.patch
Patch7: cups-no-export-ssllibs.patch
Patch8: cups-direct-usb.patch
Patch9: cups-lpr-help.patch
Patch10: cups-peercred.patch
Patch11: cups-pid.patch
Patch12: cups-page-label.patch
Patch13: cups-eggcups.patch
Patch14: cups-getpass.patch
Patch15: cups-driverd-timeout.patch
Patch16: cups-strict-ppd-line-length.patch
Patch17: cups-logrotate.patch
Patch18: cups-usb-paperout.patch
Patch19: cups-build.patch
Patch20: cups-res_init.patch
Patch21: cups-filter-debug.patch
Patch22: cups-uri-compat.patch
Patch23: cups-cups-get-classes.patch
Patch24: cups-str3382.patch
Patch25: cups-force-gnutls.patch
Patch26: cups-serialize-gnutls.patch
Patch27: cups-0755.patch
Patch28: cups-snmp-quirks.patch
Patch29: cups-hp-deviceid-oid.patch
Patch30: cups-dnssd-deviceid.patch
Patch31: cups-ricoh-deviceid-oid.patch
Patch32: cups-texttops-rotate-page.patch
Patch33: cups-usb-parallel.patch
Patch34: cups-str3535.patch
Patch35: cups-polld-busy-loop.patch
Patch36: cups-CVE-2011-2896.patch
Patch37: cups-str3947.patch

Patch40: cups-avahi-1-config.patch
Patch41: cups-avahi-2-backend.patch
Patch42: cups-avahi-3-timeouts.patch
Patch43: cups-avahi-4-poll.patch
Patch44: cups-avahi-5-services.patch

Patch45: cups-icc.patch

Patch100: cups-1.4.6-fix-template-ja.patch
Patch101: cups-1.4.6-pstext-utf8.patch
Patch102: cups-serverbin-compat2.patch
Patch103: cups-serverbin-compat3.patch
Patch104: cups-serverbin-compat4.patch

Url: http://www.cups.org/
BuildRoot: %{_tmppath}/%{name}-root
Requires(pre): chkconfig initscripts perl alternatives
Requires: %{name}-libs = %{version}-%{release}
Requires: tmpwatch
Requires: ghostscript >= 8.71-4
%if %use_alternatives
Provides: /usr/bin/lpq /usr/bin/lpr /usr/bin/lp /usr/bin/cancel /usr/bin/lprm /usr/bin/lpstat
Requires(pre): alternatives
%else
Obsoletes: lpd lpr LPRng printtool
Provides: lpd lpr LPRng
%endif
BuildRequires: pam-devel pkgconfig
BuildRequires: gnutls-devel
BuildRequires: libacl-devel
BuildRequires: openldap-devel
BuildRequires: aspell-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: krb5-devel
BuildRequires: e2fsprogs-devel
BuildRequires: poppler-utils
%if %use_dbus
BuildRequires: dbus-devel >= 0.90
Requires: dbus >= 0.90
%endif

%if %use_avahi
BuildRequires: avahi-devel >= 0.6.20
Requires: avahi >= 0.6.20
Requires: avahi-tools
%endif

Requires: poppler-utils

%package devel
Summary: Common Unix Printing System - development environment
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}
Requires: gnutls-devel
Requires: krb5-devel
Requires: zlib-devel
License: LGPL

%package libs
Summary: Common Unix Printing System - libraries
Group: System Environment/Libraries
License: LGPL

%package -n compat32-%{name}-libs
Summary: Common Unix Printing System - libraries
Group: System Environment/Libraries

%package -n compat32-%{name}-devel
Summary: Common Unix Printing System - development environment
Group: Development/Libraries
Requires: compat32-%{name}-libs = %{version}-%{release}
Requires: %{name}-devel = %{version}-%{release}
Requires: compat32-gnutls-devel
Requires: compat32-krb5-devel
Requires: compat32-zlib-devel

%description
The Common UNIX Printing System provides a portable printing layer for 
UNIX. operating systems. It has been developed by Easy Software Products 
to promote a standard printing solution for all UNIX vendors and users. 
CUPS provides the System V and Berkeley command-line interfaces. 

If you want to use CUPS on VineLinux, you should rebuild ghostscript package.
Please read README.vine in your CUPS's document dir.
#'

%description -l ja
Common UNIX Printing SystemはUNIX操作環境においてポータブルな印刷環境を提供します。CUPSは全てのUNIXベンダーやユーザのために標準的な印刷ソリューションを提供するためにEasy Software Productsで開発されました。CUPSはSystem VやBerkeleyコマンドラインなインターフェースを提供します。

%description devel
The Common UNIX 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 devel -l ja
Common UNIX Printing SystemはUNIX操作環境においてポータブルな印刷環境を提供しま\す。このパッケージはプリンタドライバを追加したり他のCUPSサービスを開発するためのパッケージです。

%description libs
The Common UNIX Printing System provides a portable printing layer for 
UNIXョ operating systems. It has been developed by Easy Software Products 
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 libs -l ja
Common UNIX Printing SystemはUNIX操作環境においてポータブルな印刷環境を提供しま\す。CUPSは全てのUNIXベンダーやユーザのために標準的な印刷ソリューションを提供するためにEasy Software Productsで開発されました。CUPSはSystem VやBerkeleyコマンドラインなインターフェースを提供します。cups-libsパッケージはlp/lprコマンドを必要としないCUPSネイティブなアプリケーションから使われるライブラリ類です。

%description -n compat32-%{name}-libs
The Common UNIX Printing System provides a portable printing layer for 
UNIXョ operating systems. It has been developed by Easy Software Products 
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 -n compat32-%{name}-libs -l ja
Common UNIX Printing SystemはUNIX操作環境においてポータブルな印刷環境を提供しま\す。CUPSは全てのUNIXベンダーやユーザのために標準的な印刷ソリューションを提供するためにEasy Software Productsで開発されました。CUPSはSystem VやBerkeleyコマンドラインなインターフェースを提供します。cups-libsパッケージはlp/lprコマンドを必要としないCUPSネイティブなアプリケーションから使われるライブラリ類です。

%description -n compat32-%{name}-devel
The Common UNIX 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 -n compat32-%{name}-devel -l ja
Common UNIX Printing SystemはUNIX操作環境においてポータブルな印刷環境を提供しま\す。このパッケージはプリンタドライバを追加したり他のCUPSサービスを開発するためのパッケージです。

%prep
%setup -q -n %{name}-%{version}

# Don't gzip man pages in the Makefile, let rpmbuild do it.
%patch1 -p1 -b .no-gzip-man
# Use the system pam configuration.
%patch2 -p1 -b .system-auth
# Prevent multilib conflict in cups-config script.
%patch3 -p1 -b .multilib
# Fix compilation of serial backend.
%patch4 -p1 -b .serial
# Ignore rpm save/new files in the banners directory.
%patch5 -p1 -b .banners
# Use compatibility fallback path for ServerBin.
%patch6 -p1 -b .serverbin-compat
# Don't export SSLLIBS to cups-config.
%patch7 -p1 -b .no-export-ssllibs
# Allow file-based usb device URIs.
%patch8 -p1 -b .direct-usb
# Add --help option to lpr.
%patch9 -p1 -b .lpr-help
# Fix compilation of peer credentials support.
%patch10 -p1 -b .peercred
# Maintain a cupsd.pid file.
%patch11 -p1 -b .pid
# Fix orientation of page labels.
%patch12 -p1 -b .page-label
# Fix implementation of com.redhat.PrinterSpooler D-Bus object.
%patch13 -p1 -b .eggcups
# More sophisticated implementation of cupsGetPassword than getpass.
%patch14 -p1 -b .getpass
# Increase driverd timeout to 70s to accommodate foomatic.
%patch15 -p1 -b .driverd-timeout
# Only enforce maximum PPD line length when in strict mode.
%patch16 -p1 -b .strict-ppd-line-length
# Re-open the log if it has been logrotated under us.
%patch17 -p1 -b .logrotate
# Support for errno==ENOSPACE-based USB paper-out reporting.
%patch18 -p1 -b .usb-paperout
# Simplify the DNSSD parts so they can build using the compat library.
%patch19 -p1 -b .build
# Re-initialise the resolver on failure in httpAddrGetList().
%patch20 -p1 -b .res_init
# Log extra debugging information if no filters are available.
%patch21 -p1 -b .filter-debug
# Allow the usb backend to understand old-style URI formats.
%patch22 -p1 -b .uri-compat
# Fix support for older CUPS servers in cupsGetDests.
%patch23 -p1 -b .cups-get-classes
# Fix temporary filename creation.
%patch24 -p1 -b .str3382
# Force the use of gnutls despite thread-safety concerns (bug #607159).
%patch25 -p1 -b .force-gnutls
# Perform locking for gnutls and avoid libgcrypt's broken
# locking (bug #607159).
%patch26 -p1 -b .serialize-gnutls
# Use mode 0755 for binaries and libraries where appropriate.
%patch27 -p1 -b .0755
# Handle SNMP supply level quirks (bug #581825).
%patch28 -p1 -b .snmp-quirks
# Add an SNMP query for HP's device ID OID (STR #3552).
%patch29 -p1 -b .hp-deviceid-oid
# Mark DNS-SD Device IDs that have been guessed at with "FZY:1;".
%patch30 -p1 -b .dnssd-deviceid
# Add an SNMP query for Ricoh's device ID OID (STR #3552).
%patch31 -p1 -b .ricoh-deviceid-oid
# Adjust texttops output to be in natural orientation (STR #3563).
# This fixes page-label orientation when texttops is used in the
# filter chain (bug #572338).
%patch32 -p1 -b .texttops-rotate-page
# Use numeric addresses for interfaces unless HostNameLookups are
# turned on (bug #583054).
# Till's patch to fix USB-Parallel adapter cable problem (bug #624564).
%patch33 -p1 -b .usb-parallel
# Set the default RIPCache to 128m (STR #3535, bug #549901).
%patch34 -p1 -b .str3535
# Avoid busy loop in cups-polld (bug #720921).
%patch35 -p1 -b .polld-busy-loop
# Avoid GIF reader loop (CVE-2011-2896, STR #3914, bug #727800).
%patch36 -p1 -b .CVE-2011-2896
# Fixed string manipulation in the dbus notifier (STR #3947, bug #741833).
%patch37 -p1 -b .str3947

# Avahi support:
# - discovery in the dnssd backend
# - service announcement in the scheduler
%patch40 -p1 -b .avahi-1-config
%patch41 -p1 -b .avahi-2-backend
%patch42 -p1 -b .avahi-3-timeouts
%patch43 -p1 -b .avahi-4-poll
%patch44 -p1 -b .avahi-5-services

# ICC colord support.
%patch45 -p1 -b .icc

%patch100 -p1 -b .template-ja
%patch101 -p1 -b .pstext
%patch102 -p0 -b .serverbin-compat2
%patch103 -p0 -b .serverbin-compat3
%patch104 -p1 -b .serverbin-compat4

# make to use cjktexttops instead texttops.
perl -pi -e 's/texttops$/cjktexttops/' conf/mime.convs.in


perl -pi -e 's,^#(DefaultCharset\s)utf-8,$1notused,' conf/cupsd.conf.in
perl -pi -e 's,^#(Printcap\s+/etc/printcap),$1,' conf/cupsd.conf.in
perl -pi -e 's,^#(MaxLogSize\s+0),$1,' conf/cupsd.conf.in
perl -pi -e 's,exec_prefix/lib/cups,exec_prefix/%{_lib}/cups,' config-scripts/cups-directories.m4
autoconf

cp %{SOURCE5} cups-lpd.real
perl -pi -e "s,\@LIBDIR\@,%{_libdir},g" cups-lpd.real

# Let's look at the compilation command lines.
perl -pi -e "s,^.SILENT:,," Makedefs.in

# Fix locale code for Norwegian (bug #520379).
mv locale/cups_no.po locale/cups_nb.po

f=CREDITS.txt
mv "$f" "$f"~
iconv -f MACINTOSH -t UTF-8 "$f"~ > "$f"
rm "$f"~

# Rebuild configure script for --enable-avahi.
aclocal -I config-scripts
autoconf -I config-scripts

%build

export CFLAGS="$RPM_OPT_FLAGS -fstack-protector-all -DLDAP_DEPRECATED=1"
# --enable-debug to avoid stripping binaries
%configure --with-docdir=%{_datadir}/%{name}/www --enable-debug \
	--with-log-file-perm=0600 --enable-relro \
	--with-pdftops=pdftops \
	--with-dbusdir=%{_sysconfdir}/dbus-1 \
	--enable-avahi \
	--enable-threads \
	--enable-gnutls \
	--disable-slp \
	localedir=%{_datadir}/locale

	##--enable-lspp \

perl -pi -e "s,^DSO	=.*,DSO=gcc -fpic," Makedefs

# If we got this far, all prerequisite libraries must be here.
make %{?_smp_mflags} OPTIM="$RPM_OPT_FLAGS -fpic"

%install
rm -rf $RPM_BUILD_ROOT

make BUILDROOT=$RPM_BUILD_ROOT install 

# Serial backend needs to run as root (bug #212577).
chmod 700 $RPM_BUILD_ROOT%{_libdir}/%{name}/backend/serial

rm -rf	$RPM_BUILD_ROOT%{initdir} \
	$RPM_BUILD_ROOT%{_sysconfdir}/init.d \
	$RPM_BUILD_ROOT%{_sysconfdir}/rc?.d
mkdir -p $RPM_BUILD_ROOT%{initdir}
install -m 755 $RPM_SOURCE_DIR/cups.init $RPM_BUILD_ROOT%{initdir}/cups

find $RPM_BUILD_ROOT%{_datadir}/cups/model -name "*.ppd" |xargs gzip -n9f

%if %use_alternatives
pushd $RPM_BUILD_ROOT%{_bindir}
for i in cancel lp lpq lpr lprm lpstat; do
	mv $i $i.cups
done
cd $RPM_BUILD_ROOT%{_sbindir}
mv lpc lpc.cups
cd $RPM_BUILD_ROOT%{_mandir}/man1
for i in cancel lp lpq lpr lprm lpstat; do
	mv $i.1 $i-cups.1
done

cd $RPM_BUILD_ROOT%{_mandir}/man8
mv lpc.8 lpc-cups.8
popd
%endif

mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps $RPM_BUILD_ROOT%{_sysconfdir}/X11/sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/X11/applnk/System $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily
install -c -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/pixmaps
install -c -m 644 cups-lpd.real $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/cups-lpd
install -c -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/cups
install -c -m 755 %{SOURCE7} $RPM_BUILD_ROOT%{_libdir}/cups/backend/ncp
install -c -m 755 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/cups
install -c -m 755 %{SOURCE9} $RPM_BUILD_ROOT%{_libdir}/cups/filter/textonly
install -c -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/cups/model/textonly.ppd

#install -c -m 644 %{SOURCE105} $RPM_BUILD_ROOT%{_sysconfdir}/cups/pdftops.conf

# Ship an rpm macro for where to put driver executables.
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm/
install -m 0644 %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/

# Ship a printers.conf file, and a client.conf file.  That way, they get
# their SELinux file contexts set correctly.
touch $RPM_BUILD_ROOT%{_sysconfdir}/cups/printers.conf
touch $RPM_BUILD_ROOT%{_sysconfdir}/cups/classes.conf
touch $RPM_BUILD_ROOT%{_sysconfdir}/cups/client.conf
touch $RPM_BUILD_ROOT%{_sysconfdir}/cups/subscriptions.conf

# This is %%ghost'ed, but needs to be created in %%install anyway.
touch $RPM_BUILD_ROOT%{_sysconfdir}/cups/lpoptions

# Tell portreserve which port we want it to protect.
# mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/portreserve
# echo ipp > $RPM_BUILD_ROOT%{_sysconfdir}/portreserve/%{name}

# LSB 3.2 printer driver directory
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ppd

# Handle https:// device URIs (bug #478677, STR #3122).
ln -s ipp $RPM_BUILD_ROOT%{_libdir}/cups/backend/https

# Remove unshipped files.
rm -rf $RPM_BUILD_ROOT%{_mandir}/cat? $RPM_BUILD_ROOT%{_mandir}/*/cat?
rm -f $RPM_BUILD_ROOT%{_datadir}/applications/cups.desktop
rm -rf $RPM_BUILD_ROOT%{_datadir}/icons

# Install the udev rules.
%{__mkdir_p} %{buildroot}/lib/udev/rules.d
install -m644 %{SOURCE3} \
	%{buildroot}/lib/udev/rules.d/70-cups-libusb.rules

# install /etc/tmpfiles.d/cups.conf (bug #656566)
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/tmpfiles.d
cat > ${RPM_BUILD_ROOT}%{_sysconfdir}/tmpfiles.d/cups.conf <<EOF
d %{_localstatedir}/run/cups 0755 root lp -
d %{_localstatedir}/run/cups/certs 0511 lp sys -
EOF

# Ship a PCL XL/PCL 6 filter file from ESP gs-7.07.1
install -c -m 644 %{SOURCE206} $RPM_BUILD_ROOT%{_datadir}/cups/model
install -c -m 644 %{SOURCE207} $RPM_BUILD_ROOT%{_datadir}/cups/model

# Ship a dvitops
install -c -m 755 %{SOURCE201} $RPM_BUILD_ROOT%{_libdir}/cups/filter
install -c -m 644 %{SOURCE202} $RPM_BUILD_ROOT%{_sysconfdir}/cups
install -c -m 644 %{SOURCE203} $RPM_BUILD_ROOT%{_sysconfdir}/cups

# Ship a cjktexttops (import from mdv)
install -c -m 755 %{SOURCE204} $RPM_BUILD_ROOT%{_libdir}/cups/filter/

# disable imagetoraster.
perl -pi -e 's/^(image.+imagetoraster)/#$1/g' %{buildroot}/usr/share/cups/mime/mime.convs

#install -c -m 644 conf/mime.types $RPM_BUILD_ROOT%{_sysconfdir}/cups/mime.types
#install -c -m 644 conf/mime.convs $RPM_BUILD_ROOT%{_sysconfdir}/cups/mime.convs

# create directories for 32bit drivers on x86_64.
%ifarch x86_64
mkdir -p %{buildroot}/usr/lib/cups/{backend,cgi-bin,daemon,driver,filter,monitor,notifier}
%endif

%triggerpostun -- cups < 1.4.8
%ifarch x86_64

echo "moving 32bit binaries to /usr/lib ..."

if [ "$1" -gt 1 ]; then
  for f in `find /usr/lib64/cups/ -type f`; do
    file $f | grep ' ELF 32-bit ' >/dev/null 2>&1
    if [ "$?" = "0" ]; then
      DEST=`echo $f | sed -e 's/^\/usr\/lib64/\/usr\/lib/'`
      mv -f $f $DEST
    fi
  done
fi

%endif

%pre
%ifarch x86_64
if [ -L /usr/lib/cups ]; then
  rm -f /usr/lib/cups
fi
%endif


%post
/sbin/chkconfig --del cupsd 2>/dev/null || true # Make sure old versions aren't there anymore
/sbin/chkconfig --add cups || true
# Remove old-style certs directory; new-style is /var/run
# (see bug #194581 for why this is necessary).
/bin/rm -rf /etc/cups/certs
%if %use_alternatives
/sbin/update-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
if [ $1 -eq 1 ]; then
  # First install.  Build ppds.dat.
  /sbin/service cups reload >/dev/null 2>&1 || :
fi
exit 0

%post libs -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig

%post -n compat32-%{name}-libs -p /sbin/ldconfig

%postun -n compat32-%{name}-libs -p /sbin/ldconfig

%preun
if [ "$1" = "0" ]; then
	/sbin/service cups stop > /dev/null 2>&1
	/sbin/chkconfig --del cups
%if %use_alternatives
        /sbin/update-alternatives --remove print %{_bindir}/lpr.cups
%endif
fi
exit 0

%postun
if [ "$1" -ge "1" ]; then
	/sbin/service cups condrestart > /dev/null 2>&1
fi
exit 0

%triggerin -- samba-client
ln -sf ../../../bin/smbspool %{_libdir}/cups/backend/smb || :
exit 0

%triggerun -- samba-client
[ $2 = 0 ] || exit 0
rm -f %{_libdir}/cups/backend/smb

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc LICENSE.txt README.txt CREDITS.txt CHANGES.txt
%attr(0660,root,lp) %dev(char,6,0) /lib/udev/devices/lp0
%attr(0660,root,lp) %dev(char,6,1) /lib/udev/devices/lp1
%attr(0660,root,lp) %dev(char,6,2) /lib/udev/devices/lp2
%attr(0660,root,lp) %dev(char,6,3) /lib/udev/devices/lp3
/lib/udev/rules.d/70-cups-libusb.rules
%dir %attr(0755,root,lp) %{_sysconfdir}/cups
%dir %attr(0755,root,lp) /var/run/cups
%dir %attr(0511,lp,sys) /var/run/cups/certs
%config(noreplace) %{_sysconfdir}/tmpfiles.d/cups.conf
%config(noreplace) %attr(0640,root,lp) %{_sysconfdir}/cups/cupsd.conf
%attr(0640,root,lp) %{_sysconfdir}/cups/cupsd.conf.default
%config(noreplace) %attr(0644,root,lp) %{_sysconfdir}/cups/client.conf
%config(noreplace) %attr(0600,root,lp) %{_sysconfdir}/cups/classes.conf
%config(noreplace) %attr(0600,root,lp) %{_sysconfdir}/cups/printers.conf
#%config(noreplace) %attr(0644,root,lp) %{_sysconfdir}/cups/pdftops.conf
%config(noreplace) %attr(0644,root,lp) %{_sysconfdir}/cups/snmp.conf
%config(noreplace) %attr(0644,root,lp) %{_sysconfdir}/cups/subscriptions.conf
%{_sysconfdir}/cups/interfaces
#config(noreplace) %{_sysconfdir}/cups/mime.types
#config(noreplace) %{_sysconfdir}/cups/mime.convs
#%config(noreplace) %{_sysconfdir}/cups/pstoraster.convs
%config(noreplace) %{_sysconfdir}/cups/dvitops.types
%config(noreplace) %{_sysconfdir}/cups/dvitops.convs
%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}/pam.d/cups
%config(noreplace) %{_sysconfdir}/logrotate.d/cups
%config(noreplace) %{_sysconfdir}/xinetd.d/cups-lpd
%dir %{_datadir}/%{name}/www
%dir %{_datadir}/%{name}/www/es
%dir %{_datadir}/%{name}/www/eu
%dir %{_datadir}/%{name}/www/ja
%dir %{_datadir}/%{name}/www/pl
%dir %{_datadir}/%{name}/www/ru
%{_datadir}/%{name}/www/images
%{_datadir}/%{name}/www/*.css
%doc %{_datadir}/%{name}/www/index.html
%doc %{_datadir}/%{name}/www/help
%doc %{_datadir}/%{name}/www/robots.txt
%doc %{_datadir}/%{name}/www/de/index.html
%doc %{_datadir}/%{name}/www/es/index.html
%doc %{_datadir}/%{name}/www/eu/index.html
%doc %{_datadir}/%{name}/www/id/index.html
%doc %{_datadir}/%{name}/www/it/index.html
%doc %{_datadir}/%{name}/www/ja/index.html
%doc %{_datadir}/%{name}/www/pl/index.html
%doc %{_datadir}/%{name}/www/ru/index.html
%config(noreplace) %{initdir}/cups
%{_bindir}/cupstestppd
%{_bindir}/cupstestdsc
%{_bindir}/cancel*
%{_bindir}/lp.cups
%{_bindir}/lpoptions
%attr(4755,root,root) %{_bindir}/lppasswd
%{_bindir}/lpq.cups
%{_bindir}/lpr.cups
%{_bindir}/lprm.cups
%{_bindir}/lpstat.cups
%{_bindir}/ppd*
%dir %{_libdir}/cups
%{_libdir}/cups/backend
%{_libdir}/cups/cgi-bin
%dir %{_libdir}/cups/daemon
%{_libdir}/cups/daemon/cups-polld
%{_libdir}/cups/daemon/cups-deviced
%{_libdir}/cups/daemon/cups-driverd
%{_libdir}/cups/daemon/cups-lpd
%{_libdir}/cups/notifier
%{_libdir}/cups/filter
%{_libdir}/cups/monitor
%{_libdir}/cups/driver
%ifarch x86_64
%dir %{_prefix}/lib/cups
%dir %{_prefix}/lib/cups/*
%endif
%{_mandir}/man1/cancel*
%{_mandir}/man1/cupstest*
%{_mandir}/man1/lp*
%{_mandir}/man1/ppd*
%{_mandir}/man[578]/*
%{_sbindir}/*
%dir %{_datadir}/cups
%dir %{_datadir}/cups/banners
%config(noreplace) %{_datadir}/cups/banners/*
%{_datadir}/cups/charsets
%{_datadir}/cups/charmaps
%{_datadir}/cups/data
%{_datadir}/cups/fonts
%{_datadir}/cups/model
%{_datadir}/cups/templates
%{_datadir}/locale/*/*
%{_datadir}/ppd
%dir %attr(1770,root,lp) /var/spool/cups/tmp
%dir %attr(0710,root,lp) /var/spool/cups
%dir %attr(0755,lp,sys) /var/log/cups
%{_datadir}/pixmaps/cupsprinter.png
%{_sysconfdir}/cron.daily/cups
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/cups.conf
%{_datadir}/cups/drv
%{_datadir}/cups/examples
%dir %{_datadir}/cups/mime
%{_datadir}/cups/mime/mime.types
%{_datadir}/cups/mime/mime.convs
%dir %{_datadir}/cups/ppdc
%{_datadir}/cups/ppdc/*.defs
%{_datadir}/cups/ppdc/*.h

%files libs
%defattr(-,root,root)
%doc LICENSE.txt
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root)
%{_bindir}/cups-config
%{_libdir}/*.so
%{_includedir}/cups
%{_mandir}/man1/cups-config.1*
%{_sysconfdir}/rpm/macros.cups

%if %{build_compat32}
%files -n compat32-%{name}-devel
%defattr(-,root,root)
%{_libdir}/*.so

%files -n compat32-%{name}-libs
%doc LICENSE.txt
%defattr(-,root,root)
%{_libdir}/*.so.*
%endif

%changelog
* Tue Apr 17 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.8-6
- modified initscript and added Patch104 to deal with wrong drivers.

* Sun Feb 12 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.8-5
- fixed %%changelog.

* Sun Feb 12 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.8-4
- removed /etc/cups/mime.{convs,types}.

* Fri Feb 10 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.8-3
- replaced some patches.
- fixed to print splitted images (BTS:1217).

* Sat Sep 10 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.8-2
- added Patch103 to detect printers with 32bit drivers.

* Thu Sep 08 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.8-1
- new upstream release (against CVE-2011-2896).
- added str3914.patch (against CVE-2011-3170).
- updated patches.

* Sun May 29 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.6-2
- added Patch101.

* Tue Mar 22 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.6-1
- new upstream release.
- dropped old patches.
- shipped some patches from fedora development.

* Sun Jul  4 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.3.11-6
- add --disable-slp option in configure

* Sun Jul  4 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.3.11-5
- add Patch340 for fix CVE-2009-2820
- add Patch350 for fix CVE-2009-3553
- patch340,350 are from rhel5

* Sun Jul  4 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.3.11-4
- fix changelog typo
- add Patch310 for fix CVE-2010-0540 (texttop)
- add Patch320 for fix CVE-2010-0542 (web IF CSRF)
- add Patch330 for fix CVE-2010-1748 (web IF uninit memory read)

* Sun Mar  7 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.3.11-3
- setuid 0 to lppasswd binary

* Sat Mar  6 2010 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.3.11-2
- add Patch300 for fix CVE-2010-0393 (lppasswd)

* Fri Jul 10 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.11-1
- new upstream release

* Sun Jun 28 2009 NAKAMURA Kenta <kenta@vinelinux.org> 1.3.10-2
- Build requires krb5-devel.
- The devel sub-package requires krb5-devel.

* Thu Jun 04 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.3.10-1
- new upstream release
- remove LC_ALL from cjktexttops

* Sat Apr 04 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.3.9-4
- rebuild with openldap-2.4.11

* Mon Mar 23 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.9-3
- add /usr/lib/cups for 32bit binary drivers on x86_64.

* Sat Jan 17 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.3.9-2
- rebuild with gnutls-2.6.3

* Wed Oct 29 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.3.9-1
- new upstream release
- renumber fedora patches
- remove hal patch, hal backend module is now provided by hal-cups-utils

* Mon Apr 21 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 1.3.7-2
- remove libacl from dependency.

* Fri Apr 18 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 1.3.7-1
- new upstream release.
- ship some patches from Fedora development.

* Sun Aug 26 2007 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.1.23-0vl13
- add Patch300 and Patch310 for CVE-2007-0104 and CVE-2007-3387 respectively
  (same fixes for 1.1.23-0vl7.1 for Vine-4.1)

* Sat May 26 2007 NAKAMURA Kenta <kenta@vinelinux.org> 1.1.23-0vl12
- enabled Patch20: cups-gcc4.patch

* Mon May 21 2007 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.1.23-0vl11
- always do %%configure on all archs (due to autoconf upgrade)

* Thu May 17 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.1.23-0vl10
- rebuild with new openssl

* Thu May 03 2007 NAKAMURA Kenta <kenta@vinelinux.org> 1.1.23-0vl9
- added compat32 subpackage for x86_64 arch support.

* Sat Apr 28 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.1.23-0vl8
- rebuild with dbus-1.0

* Fri Oct 27 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.1.23-0vl7
- add Patch50, Source20 to support hal backend.

* Thu Jun 29 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.1.23-0vl6
- add cjktexttops to use mpage for text-ps filter
  (Source18, Patch210)
- mark mime.convs and mime.types as config file

* Sat Mar 11 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.1.23-0vl5
- add Patch43 for dbus support
- add Patch200 to support UTF-8 ppd files

* Wed Feb 15 2006 Shu KONNO <owa@bg.wakwak.com> 1.1.23-0vl4
- fixed cups-link.patch of missing "-L../cups"
- added %%configure for x86_64 architecture support

* Sat Jan 28 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.1.23-0vl3
- import some FC patches
  - fix several security bugs
    - CVS-2005-3625,CVS-2005-3626,CVS-2005-3627
    - CAN-2005-2097
    - CAN-2004-0888
    - CAN-2005-0064
  - apply upstream patches

* Sun Mar 27 2005 Satoshi MACHINO <machino@vinelinux.org> 1.1.23-0vl2
- added dvitops, dvitops.convs and dvitops.types

* Tue Jan 04 2005 Satoshi MACHINO <machino@vinelinux.org> 1.1.23-0vl1
- new upstream version(cups-1.1.23)
- removed unused patches

* Fri Dec 31 2004 Satoshi MACHINO <machino@vinelinux.org> 1.1.23-0vl0.1rc1
- added cups-1.1.23rc1-scheduler_client.patch
	-- special thanks to kmuto@debian.org

* Mon Dec 20 2004 Satoshi MACHINO <machino@vinelinux.org> 1.1.23-0vl0.0rc1
- new upstream version (cups-1.1.23rc1)

* Wed Nov 03 2004 Satoshi MACHINO <machino@vinelinux.org> 1.1.22-0vl1
- new upstream version (cups-1.1.22)
	-- updated cups-resource-ja-1.1.22

* Sun Oct 17 2004 Satoshi MACHINO <machino@vinelinux.org> 1.1.22-0vl0.0rc2
- new upstream version (cups-1.1.22rc2)

* Wed Oct 06 2004 Satoshi MACHINO <machino@vinelinux.org> 1.1.22-0vl0.0rc1
- new upstream version (cups-1.1.22rc1)

* Thu Sep 16 2004 Satoshi MACHINO <machino@vinelinux.org> 1.1.21-0vl1
- new upstream version (cups-1.1.21)

* Thu Aug 26 2004 Satoshi MACHINO <machino@vinelinux.org> 1.1.21-0vl0.1rc2
- added some txt files in docdir

* Wed Aug 25 2004 Satoshi MACHINO <machino@vinelinux.org> 1.1.21-0vl0.0rc2
- new upstream version (cups-1.1.21rc2)
- updated to cups-1.1.21rc2-makefile.patch(patch11)

* Sun May 30 2004 Satoshi MACHINO <machino@vinelinux.org> 1.1.21-0vl0.0rc1
- new upstream version (cups-1.1.21rc1)
- updated cups-resource-ja-1.1.21.tar.bz2
- updated ppdsdat.patch
- dropped system-auth.patch

* Fri Apr 23 2004 Satoshi MACHINO <machino@vinelinux.org> 1.1.20-0vl6
- updated pstorater to v1.6

* Sun Apr 18 2004 Satoshi MACHINO <machino@vinelinux.org> 1.1.20-0vl5
- removed README.vine

* Thu Apr 15 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 1.1.20-0vl4
- rebuild

* Wed Dec 10 2003 Satoshi MACHINO <machino@vinelinux.org> 1.1.20-0vl3
- fixed DefaultCharset in cupsd.conf

* Mon Dec 08 2003 Satoshi MACHINO <machino@vinelinux.org> 1.1.20-0vl2
- added PCL XL/PCL 6 PPD and filter from ESP gs-7.07.1
- updated pstoraster

* Sun Dec 07 2003 Satoshi MACHINO <machino@vinelinux.org> 1.1.20-0vl1
- new upstream version (cups-1.1.20)
	-- fixed resource-ja
	-- changed DefaultCharset in cupsd.conf
	-- removed patch100
- raised update-alternatives's priority to 50

* Sat Nov 15 2003 Satoshi MACHINO <machino@vinelinux.org> 1.1.19-0vl6
- added Patch11 (cups-1.1.19-makefile.patch)
	-- fixed makefile
- added resource-ja (imported from cups-1.2.x)
- added Patch100(cups-1.1.19-lang-adhoc.patch)
	-- fixed "DefaultCharset EUC-JP" in cupsd.conf
	-- Don't fallback to C locale in setlocale()

* Fri Nov 14 2003 Satoshi MACHINO <machino@vinelinux.org> 1.1.19-0vl5
- merged to 1.1.20rc6 patch
- dropped patches
	--cups-idefense-v2.patch, cups-1.1.17-sanity.patch
- deleted needless dependence in Obsoletes

* Thu Nov 13 2003 Satoshi MACHINO <machino@vinelinux.org> 1.1.19-0vl4
- fixed init script for logrotation

* Sun Oct 26 2003 Satoshi MACHINO <machino@vinelinux.org> 1.1.19-0vl3
- fixed coding system in spec file
- updated README.vine

* Mon Jul 07 2003 Satoshi MACHINO <machino@vinelinux.org> 1.1.19-0vl2
- added cups-1.1.17-sanity.patch
- added Japanese descriptions

* Sat Jun 06 2003 Satoshi MACHINO <machino@vinelinux.org> 1.1.19-0vl1
- fixed spec file

* Fri Jun 05 2003 Satoshi MACHINO <machino@vinelinux.org> 1.1.19-0vl0.1
- new upstream vrsion
- remade spec file

* Sun May 18 2003 Satoshi MACHINO <machino@vinelinux.org> 1.1.19-0.rc5vl1
	-- disable D-BUS.
- new upstream version
- added some fixes. from cups-1.1.19-0.rc5.2
	-- disable D-BUS. 
	-- Fix option parsing in lpq (bug #90823).
	-- No longer need error, sigchld patches.
	-- Ship cupstestppd.
	-- Mark banners as config files (bug #89069).

* Fri Apr 18 2003 Satoshi MACHINO <machino@vinelinux.org> 1.1.18-0vl2
- imported some patches from rawhide (cups-1.1.18-2)
	-- added cups-idefense-v2.patch
	-- added cups-1.1.17-pdftops.patch
	-- added cups-1.1.17-error.patch
	-- added cups-1.1.17-rcp.patch
	-- added cups-1.1.17-ppdsdat.patch
	-- added cups-1.1.17-sigchld.patch
- Fix translation in the init script
- Build ppds.dat on first install.
- Use pkg-config information to find SSL libraries
- Make 'service cups reload' update the configuration first
- added README.vine

* Sun Jan 05 2003 Satoshi MACHINO <machino@vinelinux.org> 1.1.18-0vl1
- fixed alternative path

* Fri Dec 27 2002 Satoshi MACHINO <machino@vinelinux.org> 1.1.18-0vl0
- New upstream version
- dropped patch4 (merged cups-1.1.18)
- dropped epoch tag

* Thu Dec 26 2002 Satoshi MACHINO <machino@vinelinux.org> 1.1.17-3vl0
- build on Vine Linux

* Tue Dec 10 2002 Tim Waugh <twaugh@redhat.com> 1.1.17-3
- Fix cupsd startup hang (bug #79346).

* Mon Dec  9 2002 Tim Waugh <twaugh@redhat.com> 1.1.17-2
- Fix parallel backend behaviour when cancelling jobs.

* Mon Dec  9 2002 Tim Waugh <twaugh@redhat.com> 1.1.17-1
- 1.1.17.
- No longer need libdir patch.
- Fix logrotate script (bug #76791).

* Wed Nov 20 2002 Tim Waugh <twaugh@redhat.com>
- Build requires XFree86-devel (bug #78362).

* Wed Nov 20 2002 Tim Waugh <twaugh@redhat.com>
- 1.1.16.
- Updated system-auth patch.
- Add ncp backend script.

* Wed Nov 13 2002 Tim Waugh <twaugh@redhat.com> 1.1.15-15
- Set alternatives priority to 40.

* Mon Nov 11 2002 Nalin Dahyabhai <nalin@redhat.com> 1.1.15-14
- Buildrequire pam-devel.
- Patch default PAM config file to remove directory names from module paths,
  allowing the configuration files to work equally well on multilib systems.
- Patch default PAM config file to use system-auth, require the file at build-
  time because that's what data/Makefile checks for.

* Fri Nov  8 2002 Tim Waugh <twaugh@redhat.com> 1.1.15-13
- Use logrotate for log rotation (bug #76791).
- No longer need cups.desktop, since redhat-config-printer handles it.

* Thu Oct 17 2002 Tim Waugh <twaugh@redhat.com> 1.1.15-12
- Revert to libdir for CUPS_SERVERBIN.

* Thu Oct 17 2002 Tim Waugh <twaugh@redhat.com> 1.1.15-11
- Use %%configure for multilib correctness.
- Use libexec instead of lib for CUPS_SERVERBIN.
- Ship translated man pages.
- Remove unshipped files.
- Fix file list permissions (bug #59021, bug #74738).
- Fix messy initscript output (bug #65857).
- Add 'reload' to initscript (bug #76114).

* Fri Aug 30 2002 Bernhard Rosenkraenzer <bero@redhat.de> 1.1.15-10
- Add generic postscript PPD file (#73061)

* Mon Aug 19 2002 Tim Waugh <twaugh@redhat.com> 1.1.15-9
- Fix prefix in pstoraster (bug #69573).

* Mon Aug 19 2002 Tim Waugh <twaugh@redhat.com> 1.1.15-8
- Disable cups-lpd by default (bug #71712).
- No need for fread patch now that glibc is fixed.

* Thu Aug 15 2002 Tim Waugh <twaugh@redhat.com> 1.1.15-7
- Really add cups-lpd xinetd file (bug #63919).
- Ship pstoraster (bug #69573).
- Prevent fread from trying to read from beyond EOF (fixes a segfault
  with new glibc).

* Sat Aug 10 2002 Elliot Lee <sopwith@redhat.com> 1.1.15-6
- rebuilt with gcc-3.2 (we hope)

* Mon Aug  5 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.1.15-5
- Add cups-lpd xinetd file (#63919)

* Tue Jul 23 2002 Florian La Roche <Florian.LaRoche@redhat.de> 1.1.15-4
- add a "exit 0" to postun script

* Tue Jul  2 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.1.15-3
- Add a symlink /usr/share/cups/doc -> /usr/share/doc/cups-devel-1.1.15
  because some applications expect to find the cups docs in
  /usr/share/cups/doc

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Fri Jun 21 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.1.15-1
- 1.1.15-1
- Fix up smb printing trigger (samba-client, not samba-clients)
- Start cupsd earlier, apparently it needs to be running before samba
  starts up for smb printing to work.

* Thu May 23 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Tue May  7 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.1.14-17
- Rebuild in current environment
- [-16 never existed because of build system breakage]

* Wed Apr 17 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.1.14-15
- Fix bug #63387

* Mon Apr 15 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.1.14-14
- Fix dangling symlink created by samba-clients trigger

* Wed Apr 10 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.1.14-13
- Add desktop file and icon for CUPS configuration

* Wed Apr  3 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.1.14-12
- Support SMB printing (#62407)
- Add HTML redirections to doc files to work around users mistaking
  /usr/share/doc/cups-1.1.14 for the web frontend (#62405)

* Tue Apr  2 2002 Bill Nottingham <notting@redhat.com> 1.1.14-11
- fix subsys in initscript (#59206)
- don't strip binaries

* Mon Mar 11 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.1.14-10
- Make initscript use killproc instead of killall

* Fri Mar  8 2002 Bill Nottingham <notting@redhat.com> 1.1.14-9
- use alternatives --initscript support

* Mon Mar  4 2002 Bill Nottingham <notting@redhat.com> 1.1.14-8
- use the right path for the lpc man page, duh

* Thu Feb 28 2002 Bill Nottingham <notting@redhat.com> 1.1.14-7
- lpc man page is alternative too
- run ldconfig in -libs %post/%postun, not main
- remove alternatives in %preun

* Wed Feb 27 2002 Bill Nottingham <notting@redhat.com> 1.1.14-6
- don't source /etc/sysconfig/network in cups.init, we don't use any
  values from it

* Tue Feb 26 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.1.14-4
- Fix bugs #60220 and #60352

* Thu Feb 21 2002 Tim Powers <timp@redhat.com>
- rebuild against correct version of openssl (0.9.6b)

* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.1.14-2
- Add all man pages to alternatives (#59943)
- Update to real 1.1.14

* Tue Feb 12 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.1.14-1
- Update to almost-1.1.14

* Mon Feb 11 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.1.13-5
- Move cups-config to cups-devel subpackage
- Make alternatives usage a %%define to simplify builds for earlier
  releases
- Explicitly provide things we're supplying through alternatives
  to shut up kdeutils dependencies

* Tue Feb  5 2002 Tim Powers <timp@redhat.com>
- shut the alternatives stuff up for good

* Fri Feb  1 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.1.13-3
- Fix alternatives stuff
- Don't display error messages in %%post

* Wed Jan 30 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.1.13-2
- alternatives stuff

* Tue Jan 29 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.1.13-1
- 1.1.13
- Add patch for koi8-{r,u} and iso8859-8 encodings (#59018)
- Rename init scripts so we can safely "killall cupsd" from there

* Sat Jan 26 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.1.12-1
- Initial (conflicting, since alternatives isn't there yet) packaging for
  Red Hat Linux

* Sat Jan 19 2002 Bernhard Rosenkraenzer <bero@redhat.com>
- 1.1.12

* Mon Nov  5 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.1.10-3
- Compress PPD files
- Fix build with gcc 3.1
- Fix init script

* Tue Sep  4 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.1.10-2
- Fix URL
- Generate printcap
- s/Copyright/License/g

* Tue Sep  4 2001 Than Ngo <than@redhat.com> 1.1.10-1
- update to 1.1.10-1 for ExtraBinge 7.2

* Tue May 29 2001 Michael Stefaniuc <mstefani@redhat.com>
- update to 1.1.8
- changed cupsd.conf to generate /etc/printcap

* Tue May 15 2001 Than Ngo <than@redhat.com>
- update to 1.1.7, bugfixes

* Thu Dec 14 2000 Than Ngo <than@redhat.com>
- fixed package dependency with lpr and LPRng

* Wed Oct 25 2000 Than Ngo <than@redhat.com>
- remove man/cat

* Tue Oct 24 2000 Than Ngo <than@redhat.com>
- don't start cupsd service in level 0, fixed

* Thu Oct 19 2000 Than Ngo <than@redhat.com>
- update to 1.1.4
- fix CUPS_DOCROOT (Bug #18717)

* Fri Aug 11 2000 Than Ngo <than@redhat.de>
- update to 1.1.2 (Bugfix release)

* Fri Aug 4 2000 Than Ngo <than@redhat.de>
- fix, cupsd read config file under /etc/cups (Bug #15432)
- add missing cups filters

* Wed Aug 2 2000 Tim Powers <timp@redhat.com>
- rebuilt against libpng-1.0.8

* Tue Aug 01 2000 Than Ngo <than@redhat.de>
- fix permission, add missing ldconfig in %post and %postun (Bug #14963)

* Sat Jul 29 2000 Bernhard Rosenkraenzer <bero@redhat.com>
- 1.1.1 (this has some major bugfixes)
- Fix a typo in initscript (it's $?, not ?$)
- Fix /usr/etc vs. /etc trouble, don't insist on /usr/var (YUCK!)
- Create the spool dir

* Fri Jul 28 2000 Than Ngo <than@redhat.de>
- fix unclean code for building against gcc-2.96
- add missing restart function in startup script

* Fri Jul 28 2000 Tim Powers <timp@redhat.com>
- fixed initscript so that conrestart doesn't return 1 if the test fails

* Mon Jul 24 2000 Prospector <prospector@redhat.com>
- rebuilt

* Wed Jul 19 2000 Than Ngo <than@redhat.de>
- using service to fire them up
- fix Prereq section

* Mon Jul 17 2000 Tim Powers <timp@redhat.com>
- added defattr to the devel package

* Sun Jul 16 2000 Than Ngo <than@redhat.de>
- add cups config files

* Sat Jul 15 2000 Than Ngo <than@redhat.de>
- update to 1.1 release
- move back to /etc/rc.d/init.d
- fix cupsd.init to work with /etc/init.d and /etc/rc.d/init.d
- split cups

* Wed Jul 12 2000 Than Ngo <than@redhat.de>
- rebuilt

* Thu Jul 06 2000 Tim Powers <timp@redhat.com>
- fixed broken PreReq to now require /etc/init.d

* Tue Jun 27 2000 Tim Powers <timp@redhat.com>
- PreReq initscripts >= 5.20

* Mon Jun 26 2000 Tim Powers <timp@redhat.com>
- started changelog 
- fixed init.d script location
- changed script in init.d quite a bit and made more like the rest of our
  startup scripts 
