Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 514138ebd57314a30ba57323ebd3f33d > files > 7

xprint-1.0-0.009_20040707.4mdk.src.rpm

%define 	snapshot 009
%define		xprintdate 20040707
%define		nameinit xprint

Summary:	Xprint - An X11 print system
Name:		xprint
Version:	1.0
Release:	0.%{snapshot}_%{xprintdate}.4mdk
License:	MIT
Source0:	xprint_mozdev_org_source-2004-07-07-release_%{snapshot}_001.tar.bz2
Patch2:		xprint-binpath.patch.bz2
Patch3:		xprint_009_001-otherfontdirs.patch.bz2
Patch4:		xprint-initd-echo.patch.bz2
Patch5:		xprint-initd-level.patch.bz2
Patch6:		xprint-009_001-closestd.patch.bz2
Patch7:		xprint-009_001-fonts.patch.bz2
Patch8:		xprint-009_001-noshsuffix.patch.bz2

URL:		http://xprint.mozdev.org
Group:		System/Servers
BuildRequires:	XFree86-devel
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root
Requires:	cups
Requires:	XFree86-xfs

%description
Xprint is an advanced printing system which enables X11 applications
to use devices like printers, FAX or create documents in formats like
PostScript, PDF, PCL, etc.

%prep
%setup -q -n xprint
%patch2 -p1 -b .bin
%patch3 -p1 -b .other
%patch4 -p1 -b .echo
%patch5 -p1 -b .level
%patch6 -p1 -b .closestd
%patch7 -p1 -b .fonts
%patch8 -p1 -b .noshsuffix

%build
cd src/xprint_main/xc
make World

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
cd src/xprint_main/xc/packager
# ${XPDESTTARTFILE} is used by "make make_xprint_tarball"
XPDESTTARFILE="/tmp/xprint_rpm_`date +%y%m%d%H%M%S`.tar.gz"
export XPDESTTARFILE
make make_xprint_tarball

# Check if the temp. tarball was being build
if [ ! -f "${XPDESTTARFILE}" ] ; then
    echo "# temp. tarball missing."
    exit 1
fi

# ... and then unpack the temp. tarball in the ${RPM_BUILD_ROOT} dir
cd $RPM_BUILD_ROOT
gzip -cd ${XPDESTTARFILE} | tar -xvf -
rm -f ${XPDESTTARFILE}

# the tarball generation script puts the files which should be installed
# in the "install/" subdir. we strip the tarball README and the
# tarball-specific "run_xprint_from_tarball.sh" and then move all stuff
# in install/* to $PWD
rm -f xprint/run_xprint_from_tarball.sh
rm -f xprint/README
mv xprint/install/* .
rmdir xprint/install
rmdir xprint

# remove obsolete README and SECURITY extension config "SecurityPolicy"
rm -f $RPM_BUILD_ROOT/usr/X11R6/lib/X11/xserver/README
rm -f $RPM_BUILD_ROOT/usr/X11R6/lib/X11/xserver/SecurityPolicy

# Renamed Xprt to avoid RPM conflicts with Xprt provided in X11R6.
mv $RPM_BUILD_ROOT/usr/X11R6/bin/Xprt $RPM_BUILD_ROOT/usr/X11R6/bin/Xprt_xprint_org

# Linux doesn't have Xsession.d
rm -rf $RPM_BUILD_ROOT/etc/X11/Xsession.d

# /etc/init.d is a link to /etc/rc.d/init.d
mkdir -p $RPM_BUILD_ROOT/etc/rc.d
mv -f $RPM_BUILD_ROOT/etc/init.d $RPM_BUILD_ROOT/etc/rc.d

# copy startup script to /usr/X11R6/lib/X11/xserver
# (so that /etc/profile.d/xprint scripts could executes in the case
# /etc/init.d/xprint is made readable only by root by some safety daemon).
cp $RPM_BUILD_ROOT/etc/rc.d/init.d/xprint $RPM_BUILD_ROOT/usr/X11R6/lib/X11/xserver/xprint-startup
chmod 755 $RPM_BUILD_ROOT/usr/X11R6/lib/X11/xserver/xprint-startup
perl -pi -e 's@/etc/init.d/xprint@/usr/X11R6/lib/X11/xserver/xprint-startup@g' \
	$RPM_BUILD_ROOT/etc/profile.d/xprint.*
mkdir -p $RPM_BUILD_ROOT/usr/X11R6/lib/X11/xserver/C/print/fonts
export DONT_GPRINTIFY=1

%clean
rm -rf $RPM_BUILD_ROOT

%post
%_post_service xprint

%preun
%_preun_service xprint

%files
%defattr(-,root,root)
%attr(755,root,root) %config(noreplace) %{_sysconfdir}/profile.d/*
%attr(755,root,root) %config %{_initrddir}/xprint
%{_sysconfdir}/X11/xinit/xinitrc.d/92xprint-xpserverlist
/usr/X11R6/bin/Xprt_xprint_org
/usr/X11R6/bin/xplsprinters
/usr/X11R6/bin/xphelloworld
/usr/X11R6/bin/xpxthelloworld
/usr/X11R6/bin/xprehashprinterlist
/usr/X11R6/bin/xpsimplehelloworld
/usr/X11R6/lib/X11/xserver/*
/usr/X11R6/man/man1/*
/usr/X11R6/man/man7/*

%changelog
* Mon Dec 13 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.009_20040707.4mdk
- Added Patch6 (to close standard file descriptor).
- Added Patch7 (to improve TTF font handling, merged from Debian).
- Added Patch8 (to avoid .sh suffix in Xsession script).

* Sat Sep 26 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.009_20040707.3mdk
- Move killing init level from 61 to 16.

* Sat Sep 11 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.009_20040707.2mdk
- Rebuilt Patch3 for adding a font path (MathML).
- Added cups XFree86-xfs to Requires.
- Removed Patch0 (merged upstream).
- Added Patch4 (fix bug #11325).
- Don't gprintify initscripts otherwise break startup script (fix bug #10854).

* Thu Aug 05 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.009_20040707.1mdk
- Release 009_001.

* Wed Feb 18 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.009_20040216.1mdk
- Release 2004-02-16-release_009.

* Thu Jan 29 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.009_20040114.1mdk
- Release 2004-01-14-trunk_009.

* Tue Sep 09 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.008_20030508.2mdk
- Added missed /usr/X11R6/lib/X11/xserver/C/print/fonts dir.

* Mon Sep 08 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.008_20030508.1mdk
- Release: 2003-05-08-008.
- Removed foomatic from Requires.
- add /usr/X11R6/lib/X11/xserver/C/print/fonts to the scanned fontpath of init
  script.

* Mon Aug 25 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.008_20030416.1mdk
- Release: 2003-04-16-008 (more stable).
- Added Patch2, 3 (add /usr/share/fonts to xprint font path).
- Package numbering using %%{xprintdate}.

* Wed Mar 26 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.007.10mdk
- run footmatic-configure non interactively in
  xprint-mozdev.{sh,csh}.

* Mon Mar 18 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.007.9mdk
- Modify profile.d/xprint-mozdev.{sh,csh} scripts to
  avoid warning messages in shells when cups is stopped.

* Thu Mar 13 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.007.8mdk
- set XPRINTER env var to default user printer queue.

* Tue Mar 11 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.007.7mdk
- snapshot 2002-12-03.

* Mon Sep 09 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.007.6mdk
- Rebuilt with latest XFree86 4.2.1.

* Mon Sep 01 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.007.5mdk
- added Requirements.
- removed not available font dirs from the Xprt -fp path.

* Sun Sep 01 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.007.4mdk
- added missed xserver files in filelist.

* Sun Sep 01 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.007.3mdk
- fixed lpr call.

* Sun Sep 01 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.007.3mdk
- fixed lpr call.

* Sun Sep 01 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 1.0-0.007.2mdk
- fixed version number.
- removed SecurityPolicy file (already provided in XFree86).

* Sun Sep 01 2002 Giuseppe ghibò <ghibo@mandrakesoft.com>
- initial release.