Sophie

Sophie

distrib > Mandriva > 10.0 > i586 > by-pkgid > 2b03df3fbfb0ded8861d87e5702d71fd > files > 3

xsane-0.92-2mdk.src.rpm

%define	name	xsane
%define	version	0.92
%define	release	2mdk

Name:		%name
Version:	%version
Release:	%release
Summary:	Xsane is a frontend for the SANE scanner interface.
Group:		Graphics
URL:		http://www.xsane.org/
Source:		http://www.xsane.org/download/%name-%version.tar.bz2
Source1:	xsane16.png
Source2:	xsane32.png
Source3:	xsane48.png
Patch:		xsane-0.91-browser.patch.bz2
License:	GPL
Requires:	libsane >= 1.0.4
# This is for the drakxtools so that they can install a GUI for scanning
# but decide depending on the system environment which GUI actually to
# install
Provides:       scanner-gui
BuildRequires:	sane-devel gimp-devel libjpeg-devel libpng-devel libsane-devel libusb-devel
Buildroot:	%_tmppath/%name-%version-%release-root

%description
XSane is an X based interface for the SANE (Scanner Access Now Easy)
library, which provides access to scanners, digital cameras, and other
capture devices.  XSane is written in GTK+ and provides control for
performing the scan and then manipulating the captured image.

You may install xsane-gimp if you want the GIMP plug-in.

%package gimp
Summary: 	A GIMP plug-in which provides the SANE scanner interface.
Group: 		Graphics
Requires: 	sane >= 1.0, %{name} = %{version}-%{release}, gimp
 
%description gimp
This package provides the regular XSane frontend for the SANE scanner
nterface, but it works as a GIMP plug-in.  You must have GIMP
installed to use this package.


%prep
%setup -q
%patch -p1

%build
%configure2_5x --with-install-root=%{buildroot} 
perl -pi -e 's#LDFLAGS  =  -L/usr/lib -Wl,-rpath,/usr/lib#LDFLAGS  =  -L/usr/lib -Wl#' src/Makefile
##perl -pi -e 's#ja\.(po|gmo)##' po/Makefile
%make
mv src/xsane src/xsane-gimp

make clean
%configure --with-install-root=%{buildroot} --disable-gimp
perl -pi -e 's#LDFLAGS  =  -L/usr/lib -Wl,-rpath,/usr/lib#LDFLAGS  =  -L/usr/lib -Wl#' src/Makefile
##perl -pi -e 's#ja\.(po|gmo)##' po/Makefile
%make

%install
%makeinstall
install src/xsane-gimp %{buildroot}%{_bindir}
%find_lang %{name}

mkdir -p %{buildroot}/{%{_miconsdir},%{_liconsdir},%{_menudir}}
install -m 0644 %SOURCE1 %{buildroot}/%{_miconsdir}/xsane.png
install -m 0644 %SOURCE2 %{buildroot}/%{_iconsdir}/xsane.png
install -m 0644 %SOURCE3 %{buildroot}/%{_liconsdir}/xsane.png

cat > %buildroot/%{_menudir}/xsane << EOF
?package(%{name}): \
command="%{_bindir}/%{name}" \
icon="xsane.png" \
needs="X11" \
section="Multimedia/Graphics" \
title="XSane" \
longtitle="Xsane is a frontend for the scanner program sane"
EOF

# dynamic desktop support
%define launchers /etc/dynamic/launchers/scanner
mkdir -p $RPM_BUILD_ROOT%launchers
cat > $RPM_BUILD_ROOT%launchers/%name.desktop << EOF
[Desktop Entry]
Name=XSane \$device
Comment=XSane
Exec=%_bindir/xsane
Terminal=false
Icon=%name.png
Type=Application
EOF

%clean
rm -fr %buildroot

%files -f %{name}.lang
%defattr(-,root,root)
%doc xsane*
%config(noreplace) %launchers/%name.desktop
%_bindir/xsane
%dir %_datadir/sane
%_datadir/sane/*
%_mandir/man1/*
%_menudir/*
%_iconsdir/*

%post
%update_menus
update-alternatives --install %{launchers}/kde.desktop scanner.kde.dynamic %launchers/%name.desktop 30
update-alternatives --install %{launchers}/gnome.desktop scanner.gnome.dynamic %launchers/%name.desktop 30

%postun
%update_menus

if [ $1 = 0 ]; then
  update-alternatives --remove scanner.kde.dynamic %launchers/%name.desktop
  update-alternatives --remove scanner.gnome.dynamic %launchers/%name.desktop
fi

%files gimp
%defattr(-,root,root)
%doc xsane*
%{_bindir}/xsane-gimp

%post gimp
if [ -d %_libdir/gimp ]; then
  GIMPDIR=`ls -d %_libdir/gimp/[01]*`
  [ -z "$GIMPDIR" ] && exit 0
  for i in $GIMPDIR;do
  [ -d $i/plug-ins ] || mkdir -p $i/plug-ins
  %{__ln_s} -f %_bindir/xsane-gimp $i/plug-ins/xsane
  done
fi
 
%postun gimp
if [ $1 = 0 ]; then
  if [ -d %_libdir/gimp ]; then
    GIMPDIR=`ls -d %_libdir/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/xsane
        done
  fi
fi

%changelog
* Fri Mar 12 2004 Till Kamppeter <till@mandrakesoft.com> 0.92-2mdk
- Added "Provides: scanner-gui" (For the drakxtools to install a GUI for
  scanning dependent on the system environment).

* Tue Dec 16 2003 Till Kamppeter <till@mandrakesoft.com> 0.92-1mdk
- Updated to version 0.92.

* Fri Sep 19 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.91-2mdk
- fix deps

* Thu Jul  3 2003 Daouda LO <daouda@mandrakesoft.com> 0.91-1mdk
- 0.91
- patch to replace netscape by $$BROWSER for doc(#2995) 

* Tue Apr 29 2003 Daouda LO <daouda@mandrakesoft.com> 0.90-3mdk
- Buildrequires

* Sat Feb  1 2003 Till Kamppeter <till@mandrakesoft.com> 0.90-2mdk
- Rebuilt against SANE 1.0.10.
- Removed obsolete "Packager:" tag.

* Thu Dec 26 2002 Daouda LO <daouda@mandrakesoft.com> 0.90-1mdk
- release 0.90 

* Mon Jul 15 2002 Yves Duret <yduret@mandrakesoft.com> 0.87-1mdk
- new upstream release.
- fix hardcoded-library-path.

* Wed May 22 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.86-2mdk
- Automated rebuild with gcc 3.1-1mdk

* Sat Apr 27 2002 Yves Duret <yduret@mandrakesoft.com> 0.86-1mdk
- version 0.86

* Tue Apr 16 2002 Yves Duret <yduret@mandrakesoft.com> 0.85-2mdk
- add patch0 to fix gtk crashes (Oliver Rauch)

* Sun Apr 14 2002 Yves Duret <yduret@mandrakesoft.com> 0.85-1mdk
- version 0.85

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

* Sat Mar 02 2002 David BAUDENS <baudens@mandrakesoft.com> 0.84-5mdk
- Don't use ugly icons in menu and dynamic entries
- Requires: %%version-%%release and not only %%version

* Sun Feb 17 2002 Yves Duret <yduret@mandrakesoft.com> 0.84-4mdk
- fix dynamic launcher entry

* Fri Feb 01 2002 Yves Duret <yduret@mandrakesoft.com> 0.84-3mdk
- added Packager: tag on myself

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

* Wed Jan 23 2002 Yves Duret <yduret@mandrakesoft.com> 0.84-1mdk
- version 0.84
- fix menu entry (png icons)

* Mon Jan 07 2002 Yves Duret <yduret@mandrakesoft.com> 0.83-1mdk
- version 0.83

* Sat Dec 08 2001 Yves Duret <yduret@mandrakesoft.com> 0.82-1mdk
- version 0.82 (add spanish l10n)
- put back jap l10n

* Wed Nov 28 2001 Yves Duret <yduret@mandrakesoft.com> 0.81-1mdk
- version 0.81
- rebuild with new sane & gimp

* Fri Oct 19 2001 Yves Duret <yduret@mandrakesoft.com> 0.80-2mdk
- rebuild with last gimp

* Tue Oct 09 2001 Yves Duret <yduret@mandrakesoft.com> 0.80-1mdk
- version 0.80
- remove buggy jap po

* Wed Sep 12 2001 Frederic Lepied <flepied@mandrakesoft.com> 0.79-5mdk
- added dynamic desktop entry

* Thu Aug 23 2001 Yves Duret <yduret@mandrakesoft.com> 0.79-4mdk
- final (i hope this time!) russian translation by John Profic <profic@lrn.ru>

* Thu Aug 16 2001 Yves Duret <yduret@mandrakesoft.com> 0.79-3mdk
- complete russian translation by John Profic <profic@lrn.ru>

* Tue Aug 14 2001 Yves Duret <yduret@mandrakesoft.com> 0.79-2mdk
- added ru translation from John Profic <profic@lrn.ru>

* Tue Jul 24 2001 Yves Duret <yduret@mandrakesoft.com> 0.79-1mdk
- version 0.79

* Mon Jul 23 2001 Stefan van der Eijk <stefan@eijk.nu> 0.78-3mdk
- BuildRequires:	libjpeg-devel libpng-devel libusb-devel
- Remove BuildRequires: gtk+

* Thu Jul 19 2001 Yves Duret <yduret@mandrakesoft.com> 0.78-2mdk
- corrected gimp dependencies
- removed rpath

* Sun Jun 10 2001 Yves Duret <yduret@mandrakesoft.com> 0.78-1mdk
- version 0.78 : some new features and bug fixes
   * scan & mail
   * function (pirate icon) to delete preview image cache
   * ...
   
* Sun Jun  3 2001 Yves Duret <yduret@mandrakesoft.com> 0.77-3mdk
- added xsane-gimp package. registerd itself as a gimp plug-in
- added menu & icons entries

* Mon May 28 2001 Yves Duret <yduret@mandrakesoft.com> 0.77-2mdk
- corrected BuildRequires tag

* Fri May 25 2001 Yves Duret <yduret@mandrakesoft.com> 0.77-1mdk
- version 0.77 : mainly  bug fixes

* Tue May  1 2001 Yves Duret <yduret@mandrakesoft.com> 0.76-1mdk
- version 0.76

* Tue Apr 24 2001 Yves Duret <yduret@mandrakesoft.com> 0.75-1mdk
- updated to version 0.75
- put back gimp plug-in

* Tue Mar 13 2001 Yves Duret <yduret@mandrakesoft.com> 0.72-1mdk
- use spec file from cvs since SRPMS disappear
- updated to version 0.72
- spec clean up
- fix buildRequires
- URL: tag updated
- added the local l10n files

* Sun Jan 07 2001 David BAUDENS <baudens@mandrakesoft.com> 0.69-2mdk
- Fix buildRequires
- Fix Requires
- Clean %%files section
- Spec clean up

* Mon Jan 01 2001 Daouda Lo <daouda@mandrakesoft.com> 0.69-1mdk
- release 

* Mon Dec 18 2000 Lenny Cartier <lenny@mandrakesoft.com> 0.68-1mdk
- updated to 0.68

* Fri Dec 08 2000 Lenny Cartier <lenny@mandrakesoft.com> 0.65-1mdk
- updated to 0.65

* Mon Nov 13 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 0.64-1mdk
- new and shiny version.

* Fri Nov 03 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 0.63-1mdk
- new and shiny version.

* Sat Jul 15 2000 Geoffrey Lee <snailtalk@linux-mandrake.com> 0.60-1mdk
- new version
- macrosifications

* Thu May 04 2000 Lenny Cartier <lenny@mandrakesoft.com> 0.57-2mdk
- fix group

* Thu Mar 16 2000 Geoffrey Lee <snailtalk@linux-mandrake.com>
- first release for mandrake