Ok, Everyone bitching about the xpp spec file so I decided to give it a
shot.. I a still new to rpm's so I hhope this will
help someone.
----------------------------------------------------------------------
%define name     xpp
%define version  0.5
%define release  1mdk
%define prefix  /usr

Summary:         XPP for Common Unix Printing System
Name:            %{name}
Version:         %{version}
Release:         %{release}
Copyright:       GPL
Group:           Utilities/Printing
Source:          %{name}-%{version}.tar.bz2
Url:              http://www.phy.uni-bayreuth.de/till/xpp/
Packager:        John Johnson <[EMAIL PROTECTED]>
Requires:        cups
BuildRoot:     %{_tmppath}/%{name}-buildroot

%description
The X Printing Panel (XPP) is a completely free (under the GNU General
Public License - GPL) CUPS-tool for easy choosing of the desired
printer out of a list of all available printers and for setting
printer options by an easy-to-use graphical user interface.
One simply calls the program (xpp) instead of the usual utilities (lpr or
lp)
at the command line or out of applications.

If you have a remote cups server running on standard port (631)
then you don't need to install cups.
Only set the cups server name in /etc/cups/client.conf
( see /etc/cups/client.conf.sample )

static linked against: libcups and libfltk

%prep
%setup

%build
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix}
make

%install
rm -rf $RPM_BUILD_ROOT

install -d $RPM_BUILD_ROOT/usr/X11R6/bin
cp xpp $RPM_BUILD_ROOT/usr/X11R6/bin/xpp

cat << EOF > ./client.conf.sample

# This is the CUPS client configuration file.  This file is used to
# define client-specific parameters, such as the default server or
# default printer.
# ServerName: the hostname of your server.  By default CUPS will use the
# hostname of the system.
# ServerName myhost.domain.com

# DefaultPrinter: the default printer (or class) that clients should use.

#DefaultPrinter myprinter
#DefaultPrinter myprinter@host
EOF

install -d $RPM_BUILD_ROOT/etc/cups
cp ./client.conf.sample $RPM_BUILD_ROOT/etc/cups

# doc
install -d $RPM_BUILD_ROOT/usr/doc/xpp-%{version}
cp ChangeLog $RPM_BUILD_ROOT/usr/doc/xpp-%{version}
cp LICENSE $RPM_BUILD_ROOT/usr/doc/xpp-%{version}
cp README $RPM_BUILD_ROOT/usr/doc/xpp-%{version}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
/etc/cups/*
/usr/X11R6/bin/*
/usr/doc/xpp-%{version}/*

%changelog
* Wed Aug 16 2000 John Johnson <[EMAIL PROTECTED]> 0.5-1mdk
- Made first Mandrake rpm



Reply via email to