Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > main-src > by-pkgid > 97fbfc830d2852745771a3ea96831e7a > files > 2

sane-frontends-1.0.7-2mdk.src.rpm

%define name 	sane-frontends
%define version 1.0.7
%define release 2mdk
%define beta    %nil
#-beta1

Name:           %{name}
Version:        %{version}
Release:        %{release}
Summary: 	Graphical frontend to SANE
URL:       	http://www.mostang.com/sane/
Source:    	ftp://ftp.mostang.com/pub/sane/sane-%version/%{name}-%{version}%{beta}.tar.bz2
License: 	GPL
Group:		Graphics
BuildRequires:	gimp-devel libjpeg-devel libsane-devel >= %{version} libusb-devel
Requires: 	gtk+, gimp-libgimp, sane = %{version}
Buildroot: 	%{_tmppath}/%{name}-%{version}-root

%description
This is the xscanimage program, used to scan images using SANE, either
standalone or as a gimp plugin. Also includes xcam.

%prep
%setup -q -n sane-frontends-%{version}%{beta}

%build
%configure
perl -pi -e 's#,-rpath,/usr/lib##' src/Makefile #yves 1.0.5-4mdk
# glibc 2.1 has stpcpy, but sane's configure is apparently unable to detect it.
perl -p -i -e "s|\/\* #undef HAVE_STPCPY \*\/|#define HAVE_STPCPY 1|" include/sane/config.h
%make

%install
%makeinstall

%post
if [ -d /usr/lib/gimp ]; then
  GIMPDIR=`ls -d /usr/lib/gimp/[01]*`
  [ -z "$GIMPDIR" ] && exit 0
  for i in $GIMPDIR;do
  [ -d $i/plug-ins ] || mkdir -p $i/plug-ins
  %{__ln_s} -f /usr/bin/xscanimage $i/plug-ins/xscanimage
  done
fi

%preun
if [ $1 = 0 ]; then
  if [ -d /usr/lib/gimp ]; then
    GIMPDIR=`ls -d /usr/lib/gimp/[01]*`
	[ -z "$GIMPDIR" ] && exit 0
	for i in $GIMPDIR;do
    [ -d $i/plug-ins ] || mkdir -p $i/plug-ins
    %{__rm} -f $i/plug-ins/xscanimage
  	done
  fi
fi

%clean
rm -R $RPM_BUILD_ROOT

%files
%defattr(-,root,root,755)
%doc COPYING INSTALL NEWS README AUTHORS
%{_bindir}/*
%config(noreplace) %{_datadir}/sane-style.rc
%{_mandir}/man1/*


%changelog
* Sat Mar 09 2002 Yves Duret <yduret@mandrakesoft.com> 1.0.7-2mdk
- fix %%post (gimpdir/plug-ins) thanx Michael Reinsch <mr@uue.org>

* Tue Feb 05 2002 Yves Duret <yduret@mandrakesoft.com> 1.0.7-1mdk
- true version 1.0.7

* Thu Jan 31 2002 Yves Duret <yduret@mandrakesoft.com> 1.0.7-0.beta2.1mdk
- version 1.0.7-beta2

* Mon Jan 28 2002 Yves Duret <yduret@mandrakesoft.com> 1.0.7-0.beta1.2mdk
-  rebuild against libusb 0.1.4

* Tue Jan 22 2002 Yves Duret <yduret@mandrakesoft.com> 1.0.7-0.beta1.1mdk
- version 1.0.7-beta1

* Wed Nov 28 2001 Yves Duret <yduret@mandrakesoft.com> 1.0.6-1mdk
- version 1.0.6

* Fri Oct 19 2001 Yves Duret <yduret@mandrakesoft.com> 1.0.5-4mdk
- rebuild with latest gimp
- fix requires and build requires
- rpmlint will be a bit more my friend

* Thu Aug 30 2001 Till Kamppeter <till@mandrakesoft.com> 1.0.5-3mdk
- Added HP OfficeJet support

* Sat Jul 14 2001 Stefan van der Eijk <stefan@eijk.nu> 1.0.5-2mdk
- BuildRequires:	gimp-devel
- BuildRequires:	libusb-devel
- Remove BuildRequires:	gimp-libgimp
- Remove BuildRequires:	sane
- Remove BuildRequires:	XFree86-devel

* Fri Jul  6 2001 Yves Duret <yduret@mandrakesoft.com> 1.0.5-1mdk
- verson 1.0.5

* Thu Jun 14 2001 Yves Duret <yduret@mandrakesoft.com> 1.0.5-0.20010610.1mdk
- pre-1.0.5, CVS snapshot 2001 10 06
- macros, spec clean up

* Mon Jan 08 2001 Francis Galiegue <fg@mandrakesoft.com> 1.0.4-2mdk
- Summary now capitalised
- BuildRequires: sane (for sane-config)