Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > media > main-src > by-pkgid > 4f6f5c719b439f7bd7b571d484ae0f1d > files > 2

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

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

# Enable debug mode
%define debug 0

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:	libgimp-devel >= 2.0
Buildrequires:	libjpeg-devel 
Buildrequires:	libsane-devel >= %{version}
Buildrequires:	libusb-devel
Requires: 	gtk+, gimp >= 2.0, 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


%if %debug
export DONT_STRIP=1
CFLAGS="`echo %optflags |sed -e 's/-O3/-g/'`" CXXFLAGS="`echo %optflags |sed -e 's/-O3/-g/'`" \
%endif
%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
rm -rf $RPM_BUILD_ROOT
%if %debug
export DONT_STRIP=1
%endif

%makeinstall

%post
if [ -d /usr/lib/gimp ]; then
  GIMPDIR=`ls -d /usr/lib/gimp/[012]*`
  [ -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/[012]*`
	[ -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/sane-style.rc
%{_mandir}/man1/*


%changelog
* Mon Jan 24 2005 Till Kamppeter <till@mandrakesoft.com> 1.0.13-2mdk
- Fixed dependency on GIMP 2.x.

* Tue Nov  9 2004 Till Kamppeter <till@mandrakesoft.com> 1.0.13-1mdk
- Updated to version 1.0.13.

* Mon May  3 2004 Till Kamppeter <till@mandrakesoft.com> 1.0.12-1mdk
- Updated to version 1.0.12.
- GIMP plug-in built for GIMP 2.0 now.

* Fri Aug 22 2003 Damien Chaumette <dchaumette@mandrakesoft.com> 1.0.11-1mdk
- Updated to version 1.0.11

* Fri Jul 25 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 1.0.10-2mdk
- rebuild
- rm -rf $RPM_BUILD_ROOT at the beginning of %%install

* Sat Feb  1 2003 Till Kamppeter <till@mandrakesoft.com> 1.0.10-1mdk
- Updated to version 1.0.10 (bug fixes).

* Fri Jan  3 2003 Till Kamppeter <till@mandrakesoft.com> 1.0.9-1mdk
- Updated to version 1.0.9.

* Mon Oct 15 2002 Till Kamppeter <till@mandrakesoft.com> 1.0.8-2mdk
- Introduced and enabled debug mode (macro "%%debug").

* Sat Jun 01 2002 Yves Duret <yduret@mandrakesoft.com> 1.0.8-1mdk
- 1.0.8 version.

* Thu May 23 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.0.7-3mdk
- Automated rebuild with gcc 3.1-1mdk

* 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)