Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37567864
en ru br
Репозитории ALT
S:2.4.7-alt1
5.1: 1.4.2-alt1.M51.2
4.1: 1.3.10-alt0.M41.4
+updates:1.3.9-alt1.M41.1
4.0: 1.2.12-alt6.M40.9
+updates:1.2.12-alt6.M40.8
3.0: 1.1.20-alt14.1
www.altlinux.org/Changes

Группа :: Система/Серверы
Пакет: cups

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Name: cups
Version: 1.4.2
Release: alt1.M51.2

Summary: Common Unix Printing System - server package
License: GPL
Group: System/Servers

Url: http://www.cups.org
Packager: Stanislav Ievlev <inger at altlinux.org>

Source: ftp://ftp.easysw.com/pub/cups/%version/%name-%{version}.tar

Source100:%name.control
Source101:%name.pam
Source102:%name.alternatives
Source103:%name.startup
Source104:%name.xinetd
Source105:%name.modprobe

Patch1: cups-1.4.0-debian-pidfile.patch
#Patch2: cups-1.4.0-asp-alt-texttops.patch
Patch3: cups-1.4.0-alt-hardening.patch
Patch4: cups-1.4.0-rh-lpr-help.patch
Patch5: cups-1.4.2-alt-i18n.patch

%define _compress_method gzip

Requires: printer-testpages
Requires(post,preun): service

PreReq: lib%name = %version-%release, control, ghostscript-cups
#PreReq: urw-fonts >= 1.0.7pre41-alt3
PreReq: alternatives >= 0.0.6

Provides: %_bindir/lpr, %_bindir/lpq, %_bindir/lprm, %_bindir/lp, %_bindir/cancel, %_bindir/lpstat, %_sbindir/lpc

Provides: %name-ppd = %version
Obsoletes: %name-ppd

Provides: %name-common = %version
Obsoletes: %name-common

#to made 48x48 icon

BuildPreReq: ImageMagick

BuildPreReq: rpm-build-php5
BuildPreReq: dbus libdbus-devel libusb-compat-devel libgnutls-devel xdg-utils

#use external pdftops filter

BuildPreReq: /usr/bin/pdftops
Requires: /usr/bin/pdftops

# Automatically added by buildreq on Tue Feb 26 2008 (-bi)

BuildRequires: gcc-c++ java-common libacl-devel libjpeg-devel libldap-devel libpam-devel libpng-devel libtiff-devel net-tools pam0_tcb php5-devel

%description
The Common Unix Printing System provides a portable printing layer for
UNIX(TM) 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.

This is the main package needed for CUPS servers (machines where a
printer is connected to or which host a queue for a network
printer). It can also be used on CUPS clients so that they simply pick
up broadcasted printer information from other CUPS servers and do not
need to be assigned to a specific CUPS server by an
/etc/cups/client.conf file.

%package ppd
Summary: ppd drivers for %name
License: GPL
Group: System/Servers
PreReq: %name = %version-%release

%description ppd
ppd drivers for %name

%package backend-serial
Summary: serial backend for %name
License: GPL
Group: System/Servers
PreReq: %name = %version-%release

%description backend-serial
serial backend for %name

%package backend-pdf
Summary: pdf backend for %name
License: GPL
Group: System/Servers
PreReq: %name = %version-%release

%description backend-pdf
pdf backend for %name, allows to create pdf files "on-fly"

%package -n lib%name
Summary: Common Unix Printing System - CUPS library
License: LGPL
Group: System/Servers

%description -n lib%name
The Common Unix Printing System provides a portable printing layer for
UNIX(TM) operating systems. This package contains the CUPS API library
which contains common functions used by both the CUPS daemon and all
CUPS frontends (lpr-cups, xpp, qtcups, kups, ...).

This package you need for both CUPS clients and servers. It is also
needed by Samba.

%package -n lib%name-devel
Summary: Common Unix Printing System - Development environment "libcups"
License: LGPL
Group: Development/C
Requires: lib%name = %version-%release
Provides: %name-devel = %version
Obsoletes: %name-devel
Provides: lib%name-devel-static = %version
Obsoletes: lib%name-devel-static
Provides: %name-ddk = %version
Obsoletes: %name-ddk
Requires: libssl-devel libgnutls-devel

%description -n lib%name-devel
The Common Unix Printing System provides a portable printing layer for
UNIX(TM) operating systems. This is the development package for
creating additional printer drivers, printing software, and other CUPS
services using the main CUPS library "libcups".

%package -n alterator-backend-%name
Summary: Alterator backend for the Common Unix Printing System
License: GPL
Group: System/Servers
Requires: %name = %version-%release
Requires: alterator > 1.99-alt14

%description -n alterator-backend-%name
Alterator backend for the Common Unix Printing System

%package -n php5-%name
Summary: PHP5 module for the Common Unix Printing System
License: GPL
Group: System/Servers
Requires: lib%name = %version-%release
BuildPreReq: php5-devel
BuildPreReq: rpm-build-php5
Source301: php-%name.ini
Source302: php-%name-params.sh

%description -n php5-%name
PHP5 module for the Common Unix Printing System

%define php5_extension %name

%prep
%setup -q

%patch1 -p1
#_patch2 -p1
#patch3 -p2
%patch4 -p1
%patch5 -p2

%build

%configure \
  --enable-pie \
  --enable-relro \
  --enable-dbus \
  --enable-libusb \
  --with-cups-user=lp \
  --with-cups-group=lp \
  --with-log-file-perm=0600 \
  --with-php \
  --with-docdir=%_datadir/doc/%name-%version \
   --localstatedir=%_var \
   #

%make_build

%install
make BUILDROOT=$RPM_BUILD_ROOT install

install -Dpm 755 %SOURCE100 %buildroot%_sysconfdir/control.d/facilities/%name
install -Dpm 644 %SOURCE101 %buildroot%_sysconfdir/pam.d/%name
install -Dpm 644 %SOURCE102 %buildroot%_altdir/%name
install -Dpm 755 %SOURCE103 %buildroot%_initdir/%name
install -Dpm 644 %SOURCE104 %buildroot%_sysconfdir/xinetd.d/%name-lpd
install -Dpm 644 %SOURCE105 %buildroot%_sysconfdir/modprobe.d/blacklist-%name

# prepare the commands conflicting with LPD for the update-alternatives treatment

for i in lpr lpq lprm lp cancel lpstat
do
   mv $RPM_BUILD_ROOT%_bindir/$i $RPM_BUILD_ROOT%_bindir/$i-%name
   mv $RPM_BUILD_ROOT%_man1dir/$i.1.gz $RPM_BUILD_ROOT%_man1dir/$i-%name.1.gz
done
mv $RPM_BUILD_ROOT%_sbindir/lpc $RPM_BUILD_ROOT%_sbindir/lpc-%name
mv $RPM_BUILD_ROOT%_man8dir/lpc.8.gz $RPM_BUILD_ROOT%_man8dir/lpc-%name.8.gz

#link default fonts to URW

#rm -rf $RPM_BUILD_ROOT/%_datadir/%name/fonts/Monospace*
#ln -sf %_datadir/fonts/type1/urw/n022003l.pfb $RPM_BUILD_ROOT/%_datadir/%name/fonts/Monospace
#ln -sf %_datadir/fonts/type1/urw/n022004l.pfb $RPM_BUILD_ROOT/%_datadir/%name/fonts/Monospace-Bold
#ln -sf %_datadir/fonts/type1/urw/n022023l.pfb $RPM_BUILD_ROOT/%_datadir/%name/fonts/Monospace-Oblique
#ln -sf %_datadir/fonts/type1/urw/n022024l.pfb $RPM_BUILD_ROOT/%_datadir/%name/fonts/Monospace-BoldOblique

#create some empty config files to prevent .rpmsave on update from cups-1.1.x

touch %buildroot/%_sysconfdir/%name/printers.conf

#fix icons

convert -resize 48x48 desktop/cups-64.png  desktop/cups-48.png
%__install -Dpm 644 desktop/cups-48.png %buildroot%_liconsdir/cups.png

mv %buildroot/%php5_extdir/phpcups.so %buildroot/%php5_extdir/%name.so
install -D -m 644 %SOURCE301 %buildroot/%php5_extconf/%php5_extension/config
install -D -m 644 %SOURCE302 %buildroot/%php5_extconf/%php5_extension/params

%pre
%pre_control %name

%post
%post_control %name -s server
%post_service %name

%preun
%preun_service %name

%post -n php5-%name
%php5_extension_postin

%preun -n php5-%name
%php5_extension_preun

%files
%doc %_defaultdocdir/%name-%version

%config(noreplace) %_sysconfdir/%name
%config(noreplace) %_sysconfdir/modprobe.d/*
#special hack for snmp.conf
%config(noreplace) %attr(0640,root,lp) %_sysconfdir/%name/snmp.conf
%config(noreplace) %_sysconfdir/xinetd.d/%name-lpd
%config(noreplace) %_sysconfdir/pam.d/%name
%_sysconfdir/control.d/facilities/%name
%_initdir/%name
%_altdir/%name
%_sysconfdir/dbus-1/system.d/%name.conf

%_prefix/lib/%name
%exclude %_prefix/lib/cups/backend/serial

%_datadir/%name
%exclude %_datadir/%name/examples

%_logdir/%name
%dir %_spooldir/%name
%dir %_spooldir/%name/tmp
%dir %_cachedir/%name
%dir %_var/run/%name

%_iconsdir/hicolor/*/apps/*.png
%_desktopdir/%name.desktop

%_bindir/cupstestdsc
%_bindir/cupstestppd
%attr(02711,root,lp) %_bindir/cancel-cups
%attr(02711,root,lp) %_bindir/lp-cups
%attr(02711,root,lp) %_bindir/lpoptions
%attr(02711,root,lp) %_bindir/lppasswd
%attr(02711,root,lp) %_bindir/lpq-cups
%attr(02711,root,lp) %_bindir/lpr-cups
%attr(02711,root,lp) %_bindir/lprm-cups
%attr(02711,root,lp) %_bindir/lpstat-cups

%_sbindir/*

%_man1dir/*
%exclude %_man1dir/ppd*

%_man7dir/*

%_man5dir/*
%exclude %_man5dir/ppd*


%_man8dir/*

%_datadir/%name/model
%_datadir/locale/*/*.po

%files -n lib%name
%_libdir/*.so.*

%files -n lib%name-devel
%_bindir/%name-config
%_bindir/ppd*
%_includedir/%name
%_datadir/%name/examples
%_libdir/*.so
%_man1dir/ppd*
%_man5dir/ppd*

%files backend-serial
%_prefix/lib/cups/backend/serial

%files -n php5-%name
%php5_extdir/%name.so
%php5_extconf/%php5_extension

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin