rpms/cups-pdf/devel INSTALL.cups-pdf, NONE, 1.1 INSTALL.fedora.cups-pdf, NONE, 1.1 cups-pdf-conf.patch, NONE, 1.1 cups-pdf.spec, NONE, 1.1 cups_pdf-2.4.2.te, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Remi Collet (remi) fedora-extras-commits at redhat.com
Tue Nov 14 05:46:55 UTC 2006


Author: remi

Update of /cvs/extras/rpms/cups-pdf/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14769/devel

Modified Files:
	.cvsignore sources 
Added Files:
	INSTALL.cups-pdf INSTALL.fedora.cups-pdf cups-pdf-conf.patch 
	cups-pdf.spec cups_pdf-2.4.2.te 
Log Message:
auto-import cups-pdf-2.4.2-2.fc7 on branch devel from cups-pdf-2.4.2-2.fc7.src.rpm


--- NEW FILE INSTALL.cups-pdf ---
# INSTALL instructions for the rpm version of cups-pdf

  Either you got a binary RPM "cups-pdf_version.ix86.rpm" or a Source RPM (SRPM) "cups-pdf-version.src.rpm"
  depending on this you have to proceed to the following steps.

# CONTENT

1) installing a binary RPM
2) installing a binary SRPM
3) restart CUPS and take a look at the logfiles


1) Installation of a binary RPM
  This package is build as relocatable RPM; this means, that you can set the path, where
  the binary of cups-pdf is installed. This is needed if you installed you CUPS e.g. with the prefix
  /usr/local and not in the standard path /usr/

  The RPM has to be installed with
  $ rpm -i cups-pdf-version.ix86.rpm
  (where "version" and the "x" have to be replaced with the real names)

  if you want to place the binary in an other path than /usr/libs/cups/backend, type
  $ rpm -i --prefix=/usr/local/ cups-pdf-version.ix86.rpm



2) Installation of a SRPM - "for the brave" of you
  First you have to recompile the SRPM with
  $ rpm --rebuild --target ix86 cups-pdf-version.src.rpm
  after successfull compilation you'll find the binaray RPM in you RPMdir
  e.g. under RedHat in /usr/src/redhat/RPMS/ix86/

  "for the brave" of you: passing compiler-flags to the SRPM is possible through
  $ rpm --rebuild --define "optflags -O3 -march=i686 -mcpu=i686" --target i686 cups-pdf-version.src.rpm
  for Redhat 9.0 you have to use
  $ rpmbuild --rebuild --define "optflags -O3 -march=i686 -mcpu=i686" --target i686 cups-pdf-version.src.rpm
  after successfull compilation you'll find the binaray RPM in you RPMdir
  e.g. under RedHat in /usr/src/redhat/RPMS/ix86/

  if you want to modify some paths, to have to extract the SPEC-File, then extract the Sources
  cups-pdf_version.tar.gz edit config.h then edit the same values in cups-pdf.spec, put the modified
  config.h in the archiv cups-pdf_version.tar.gz and recompile with
  $ rpm -ba --define "optflags -O3 -march=ix86 -mcpu=ix86" cups-pdf.spec

3) Restarting CUPS / Logfiles
  please restart CUPS and take a look into the cups-pdf error-log (usually located in /var/log/cups)
  you should see in the file cups-pdf_log something like
  Tue May 27 04:47:46 2003  [DEBUG] initialization finished
  Tue May 27 04:47:46 2003  [STATUS] identification string sent
  All right, you're ready to install a writer and ready to enjoy !

Please report all errors and suggestions around the RPM-Edition to the author of this document.

ver0.2 - 2003/09/09 Karlsruhe (Germany) Dirk Schwier <rpms at raumhochdrei.de>


--- NEW FILE INSTALL.fedora.cups-pdf ---
This cups-pdf RPM is designed to create a Cups-PDF virtual printer
during the installation, but only if cups is running.

You can create the virtual pinter using :
    /usr/sbin/lpadmin -p Cups-PDF -v cups-pdf:/ -m PostscriptColor.ppd -E

You can remove the virtual printer using
    /usr/sbin/lpadmin -x Cups-PDF


cups-pdf-conf.patch:

--- NEW FILE cups-pdf-conf.patch ---
--- extra/cups-pdf.conf.orig	2005-12-23 18:28:15.000000000 +0100
+++ extra/cups-pdf.conf	2005-12-23 23:07:22.000000000 +0100
@@ -41,6 +41,7 @@
 ### Default: /var/spool/cups-pdf/${USER}
 
 #Out /var/spool/cups-pdf/${USER}
+Out ${HOME}/Desktop
 
 ### Key: AnonDirName
 ##  ABSOLUTE path for anonymously created PDF files


--- NEW FILE cups-pdf.spec ---
# Module SElinux
%define module cups_pdf

Summary:        Extension for creating pdf-Files with CUPS
Summary(fr):    Extension de CUPS pour créer des fichiers PDF
Name:           cups-pdf
Version:        2.4.2
Release:        2%{?dist}
Group:          Applications/Publishing
Source0:        http://www.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/src/%{name}_%{version}.tar.gz
Source1:        INSTALL.cups-pdf
Source2:        INSTALL.fedora.cups-pdf
Source3:        %{module}-%{version}.te
Patch1:         cups-pdf-conf.patch
URL:            http://cip.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/
License:        GPL
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires:       ghostscript, cups, policycoreutils
BuildRequires:  selinux-policy-devel, checkpolicy, cups-devel

# These are the defaults paths defined in config.h
# CUPS-PDF spool directory
%define CPSPOOL   %{_localstatedir}/spool/cups-pdf/SPOOL

# CUPS-PDF output directory
%define CPOUT     %{_localstatedir}/spool/cups-pdf

# CUPS-PDF log directory
%define CPLOG     %{_localstatedir}/log/cups

# CUPS-PDF cups-pdf.conf config file
%define ETCCUPS   %(cups-config --serverroot 2>/dev/null || echo %{_sysconfdir}/cups)

# Additional path to backend directory
%define CPBACKEND %(cups-config --serverbin  2>/dev/null || echo %{_libdir}/cups)/backend


%description
"cups-pdf" is a backend script for use with CUPS - the "Common UNIX Printing
System" (see more for CUPS under http://www.cups.org/). 
"cups-pdf" uses the ghostscript pdfwrite device to produce PDF Files.

This version has been modified to store the PDF files on the Desktop of the 
user. This behavior can be changed by editing the configuration file.

%description -l fr
"cups-pdf" est un script de traitement CUPS - le "Common UNIX Printing System"
(plus d'informations sur CUPS à l'adresse http://www.cups.org/). 
"cups-pdf" utilise ghostscript pour construire des fichiers au format PDF.

Cette version a été modifiée pour produire les fichiers PDF sur le bureau
de l'utilisateur (dossier Desktop du répertoire d'accueil de l'utilisateur).
Ce comportement peut être modifié en éditant le fichier de configuration.

%prep
echo CIBLE = %{name}-%{version}-%{release}
%setup -q -n %{name}-%{version}
%{__cp} %{SOURCE1} INSTALL
%{__cp} %{SOURCE2} INSTALL.fedora

# Relocate output on user's Desktop
%patch1 -p0

%build
pushd src
%{__cc} $RPM_OPT_FLAGS -o cups-pdf cups-pdf.c
popd

# SElinux 
%{__mkdir} selinux
pushd selinux
%{__cp} %{SOURCE3} %{module}.te
echo "%{CPOUT}   system_u:object_r:print_spool_t:s0"  >%{module}.fc
echo "%{CPSPOOL} system_u:object_r:print_spool_t:s0" >>%{module}.fc
make -f %{_datadir}/selinux/devel/Makefile
popd

# Avoid perl dependencies
%{__chmod} -x contrib/pstitleiconv-0.2/pstitleiconv
%{__chmod} -x contrib/cups-pdf-dispatch-0.1/cups-pdf-dispatch

%install
rm -rf %{buildroot}
%{__mkdir_p} %{buildroot}%{CPBACKEND}
%{__mkdir_p} %{buildroot}%{CPSPOOL}
%{__mkdir_p} %{buildroot}%{CPOUT}
%{__mkdir_p} %{buildroot}%{CPLOG}
%{__mkdir_p} %{buildroot}%{CPBACKEND}
%{__mkdir_p} %{buildroot}%{ETCCUPS}
%{__mkdir_p} %{buildroot}%{_datadir}/cups/model/
%{__install} -m644 extra/PostscriptColor.ppd %{buildroot}%{_datadir}/cups/model/PostscriptColor.ppd
# %{__gzip} -d %{buildroot}%{_datadir}/cups/model/PostscriptColor.ppd.gz
%{__install} -m644 extra/cups-pdf.conf %{buildroot}%{ETCCUPS}/cups-pdf.conf
%{__install} -m755 src/cups-pdf %{buildroot}%{CPBACKEND}

# SElinux 
%{__mkdir_p} %{buildroot}%{_datadir}/selinux/packages/%{name}
%{__install} -m644 selinux/%{module}.pp %{buildroot}%{_datadir}/selinux/packages/%{name}/%{module}.pp

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc ChangeLog COPYING README INSTALL INSTALL.fedora contrib/
%dir %{CPSPOOL}
%dir %{CPOUT}
%attr(700, root, root) %{CPBACKEND}/cups-pdf
%config(noreplace) %{ETCCUPS}/cups-pdf.conf
%{_datadir}/cups/model/PostscriptColor.ppd
%{_datadir}/selinux/packages/%{name}/%{module}.pp

%post
# Install/update Selinux policy
semodule -i %{_datadir}/selinux/packages/%{name}/%{module}.pp || :
fixfiles -R %{name} restore

# First install : create the printer if cupsd is running
if [ "$1" -eq "1" -a -f "%{_var}/run/cupsd.pid" ]
then
    if [ -d /proc/$(cat %{_var}/run/cupsd.pid) ]
    then
        /usr/sbin/lpadmin -p Cups-PDF -v cups-pdf:/ -m PostscriptColor.ppd -E || :
    fi
fi

%postun
if [ "$1" -eq "0" ]; then
    # Delete the printer
    /usr/sbin/lpadmin -x Cups-PDF || :

    # Remove the SElinux policy.
    semodule -r %{module} || :
fi

%changelog
* Mon Nov 13 2006 Remi Collet <Fedora at FamilleCollet.com> 2.4.2-2
- review comments (URL, INSTALL.fedora as Source2, descr. rewrap)

* Mon Nov 13 2006 Remi Collet <Fedora at FamilleCollet.com> 2.4.2-1
- clean spec for Extras
- don't use "service cups restart", only test if cups is running

* Tue Oct 24 2006 Remi Collet <rpms at FamilleCollet.com> 2.4.2-1.fc6.remi
- FC6 build

* Sat Oct  7 2006 Remi Collet <rpms at FamilleCollet.com> 2.4.2-1.fc5.remi
- update to 2.4.2

* Tue May 16 2006 Remi Collet <rpms at FamilleCollet.com> 2.4.0-1.fc{3,4,5}.remi
- update to 2.4.0
- add SElinux module
- spec cleanning

* Tue May 16 2006 Remi Collet <rpms at FamilleCollet.com> 2.3.0-1.fc{3,4,5}.remi
- update to 2.3.0
- chmod 700 on %%{CPBACKEND}/cups-pdf for cups-1.2.0 on FC5

* Fri Apr 14 2006 Remi Collet <rpms at FamilleCollet.com> 2.2.0-1.fc{3,4,5}.remi
- update to 2.2.0

* Sat Apr  8 2006 Remi Collet <rpms at FamilleCollet.com> 2.1.1-1.fc{3,4,5}.remi
- update to 2.1.1

* Sun Mar 26 2006 Remi Collet <RPMS at FamilleCollet.com> 2.1.0-1.fc{3,4,5}.remi
- update to 2.1.0

* Sun Jan 29 2006 Remi Collet <RPMS at FamilleCollet.com> 2.0.5-1.fc{3,4}.remi
- update to 2.0.5

* Sun Jan 29 2006 Remi Collet <remi.collet at univ-reims.fr> 2.0.4-1.fc{3,4}.remi
- update to 2.0.4

* Sat Jan  7 2006 Remi Collet <remi.collet at univ-reims.fr> 2.0.3-1.fc{3,4}.remi
- update to 2.0.3

* Wed Jan  4 2006 Remi Collet <remi.collet at univ-reims.fr> 2.0.1-1.fc{3,4}.remi
- update to 2.0.1

* Tue Jan  3 2006 Remi Collet <remi.collet at univ-reims.fr> 2.0.0-2.fc#.remi
- output to Desktop
- defattr

* Fri Dec 23 2005 Remi Collet <remi.collet at univ-reims.fr> 2.0.0-1.fc4.remi
- update to 2.0.0 final

* Sat Nov  5 2005 Remi Collet <remi.collet at univ-reims.fr> 2.0-0.1.fc3.remi
- rebuild for FC3

* Sat Nov  5 2005 Remi Collet <remi.collet at univ-reims.fr> 2.0-0.1.fc4.remi
- update to 2.0 beta2
- rebuild for FC4
- conditionnal "post" and "postun" script, more robust
- cups-pdf-conf.patch (Out in $HOME)

* Mon Sep 26 2005 Christian Ellsworth C. <k.ellsworth at gmail.com>
- adapted to fit the new runtime config file of version 2.0

* Sat Sep 10 2005 Remi Collet <remi.collet at univ-reims.fr> 1.7.4-1.fc4.remi
- adapted to cups-pdf 1.7.4
- added auto remove a cups-pdf printer in "postun"
- added CHANGELOG, COPYING, README
- creating cups-pdf-home.patch

* Sat Mar 05 2005 Christian Ellsworth C. <k.ellsworth at gmail.com>
- adapted to cups-pdf 1.7.0
- added auto configure a cups-pdf printer

* Tue Feb 22 2005 Christian Ellsworth C. <k.ellsworth at gmail.com>
- adapted to cups-pdf 1.6.6

* Thu Aug 12 2004 Volker Behr <vrbehr at cip.physik.uni-wuerzburg.de>
- adapted to cups-pdf 1.5.2 

* Sat Jan 31 2004 Volker Behr <vrbehr at cip.physik.uni-wuerzburg.de>
- adapetd to cups-pdf 1.4.0 and new building environment

* Wed Jan 14 2004 Mark Lane <harddata.com>
- fixed the specfile so that x86_64 version installs the filter
- in /usr/lib64 instead of /usr/lib

* Sun Nov 02 2003 Volker Behr <vrbehr at cip.physik.uni-wuerzburg.de>
- third release of cups-pdf, RPM-Edition for cups-pdf 1.3

* Tue Sep 09 2003 Dirk Schwier <rpms at raumhochdrei.de>
- second Release of cups-pdf, RPM-Edition for cups-pdf 1.1

* Tue May 27 2003 Dirk Schwier <rpms at raumhochdrei.de>
- we're proud to present the first version of cups-pdf, RPM-Edition


--- NEW FILE cups_pdf-2.4.2.te ---
policy_module(cups_pdf,2.4.2)

require {
    class dir { add_name create getattr remove_name search setattr write };
    class file { create getattr read setattr unlink write };

    type cupsd_t;
    type home_root_t;
    type user_home_dir_t;
    type user_home_t;
    type print_spool_t;
}

allow cupsd_t home_root_t:dir { getattr search };
allow cupsd_t user_home_dir_t:dir { getattr search };
allow cupsd_t user_home_t:dir { add_name create getattr remove_name search setattr write };
allow cupsd_t user_home_t:file { create getattr read setattr unlink write };


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/cups-pdf/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	14 Nov 2006 05:45:28 -0000	1.1
+++ .cvsignore	14 Nov 2006 05:46:25 -0000	1.2
@@ -0,0 +1 @@
+cups-pdf_2.4.2.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/cups-pdf/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	14 Nov 2006 05:45:28 -0000	1.1
+++ sources	14 Nov 2006 05:46:25 -0000	1.2
@@ -0,0 +1 @@
+97b21ab9dc98659bfce17da921ee2790  cups-pdf_2.4.2.tar.gz




More information about the scm-commits mailing list