File m2300w.spec of Package m2300w

#
# spec file for package m2300w (Version 0.51)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           m2300w
BuildRequires:  foomatic-filters ghostscript-library
Url:            http://sourceforge.net/projects/m2300w/
License:        GPLv2+
Group:          Hardware/Printing
Summary:        Konica Minolta magicolor 2300W and 2400W Printer Driver
Version:        0.51
Release:        1
Requires:       ghostscript-library >= 7.05, foomatic-filters
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        http://heanet.dl.sourceforge.net/sourceforge/m2300w/m2300w-%{version}.tar.bz2
# Patch100... is for openSUSE/Novell patches which which are not intended for upstream.
# The patches are not intended for upstream because the m2300w driver is no longer actively maintained.
Patch100:       m2300w-0.51-foomatic.patch
Patch101:       m2300w-0.51-resolution.patch
Patch102:       m2300w-0.51-disable_gs_test.patch
Patch103:       m2300w-fgets-overflow.patch

%description
This is an open source Linux printer driver for the Konica Minolta
magicolor 2300W and 2400W color laser printers. It requires Ghostscript
and foomatic-filters. It is recommended to use this driver with CUPS.

The current version 0.51 was released 2005-10-16 and
the m2300w driver is no longer actively maintained
which means that help, a workaround, or a bugfix
is rather unlikely if there are issues with this driver.


Authors:
--------
    Gerhard Fuernkranz
    Leif Birkenfeld
    Thomas Rohringer
    Rick Richardson
    

%prep
# Be quiet when unpacking:
%setup -q
%patch100 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1

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

%install
# Install m2300w:
make install INSTROOT=$RPM_BUILD_ROOT DOCDIR=$RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}
# Remove dispensable stuff (YaST2 printerdb files are obsolete since a longer time):
rm -rf $RPM_BUILD_ROOT/usr/share/YaST2
# Compress the PPDs:
gzip $RPM_BUILD_ROOT/usr/share/cups/model/Minolta/magicolor_*.ppd

%post
# send CUPS daemon SIGHUP to let it recognize new files:
if test -x /etc/init.d/cups && /etc/init.d/cups status >/dev/null
then /etc/init.d/cups reload >/dev/null || /bin/true
fi
# exit successfully in any case:
exit 0

%files
%defattr(-,root,root)
%{_bindir}/m2300w
%{_bindir}/m2400w
%{_bindir}/m2300w-wrapper
%dir /usr/share/cups
%dir /usr/share/cups/model
%dir /usr/share/cups/model/Minolta
/usr/share/cups/model/Minolta/magicolor_*.ppd.gz
%dir /usr/share/m2300w
/usr/share/m2300w/*
%doc %{_defaultdocdir}/%{name}

%changelog
openSUSE Build Service is sponsored by