Name: scanbuttond Version: 0.2.3 Release: 3%{?dist} Summary: Scanner Button tools to SANE Group: System Environment/Libraries License: GPL URL: http://scanbuttond.sf.net Source0: scanbuttond-0.2.3.tar.gz Source1: scanbuttond.init Source2: initscanner.sh Source3: buttonpressed.sh BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service Requires(postun):/sbin/service BuildRequires: libusb-devel #Requires: sane-backends evolution cups %description Modern scanners usually have several front panel buttons which are intended to trigger certain actions like copying, faxing or mailing the scanned document. This daemon monitors the scanner's buttons and runs a shell script whenever one of these buttons has been pressed. Because it is accessing the scanner directly via libusb, there should be no conflicts with SANE or other scanner drivers: scanbuttond simply won't touch the scanner hardware while you are using SANE. %package devel Summary: The Scanbuttonnd development toolkit Group: Development/Libraries Requires: scanbuttond = %{version}-%{release} %description devel Static libraries and header files for writing Scanbuttond modules. %prep %setup -q %build %configure make %{?_smp_mflags} %install rm -rf %{buildroot} make DESTDIR=%{buildroot} install rm -rf %{buildroot}%{_libdir}/*.la mkdir -p -m 755 %{buildroot}%{_initrddir} install -c -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/scanbuttond rm -rf %{buildroot}%{_sysconfdir}/scanbuttond/*.sh install -m 755 %{SOURCE2} %{buildroot}%{_sysconfdir}/scanbuttond/ install -m 755 %{SOURCE3} %{buildroot}%{_sysconfdir}/scanbuttond/ %clean rm -rf %{buildroot} %post /sbin/ldconfig /sbin/chkconfig --add scanbuttond %postun /sbin/ldconfig if [ "$1" -ge "1" ]; then /sbin/service scanbuttond condrestart >/dev/null 2>&1 || : fi %preun if [ $1 = 0 ]; then /sbin/service scanbuttond stop > /dev/null 2>&1 : /sbin/chkconfig --del scanbuttond fi %files %defattr(-,root,root) %doc README COPYING AUTHORS %{_bindir}/scanbuttond %{_libdir}/libscanbtnd*.so.* %config(noreplace) %{_sysconfdir}/scanbuttond/meta.conf %{_sysconfdir}/scanbuttond/ %{_initrddir}/scanbuttond %files devel %defattr(-,root,root) %doc ChangeLog %{_libdir}/libscanbtnd*.so %changelog * Tue Oct 03 2006 Patrick "Jima" Laughton 0.2.3-3 - Chmod'd Source1-3 644, to avoid rpmlint error on SRPM - Fixed error that installs Source1 *in* %%{_initrddir}/scannerbuttond/ - Renamed Source1 to scanbuttond.init * Tue Oct 03 2006 Parag Nemade - 0.2.3-2 - Initial Release