406 lines
15 KiB
RPMSpec
406 lines
15 KiB
RPMSpec
%define primaxscan_ver 1.1.beta1
|
|
%define gitver %(echo %version | tr . _)
|
|
%define saned_uid 65442
|
|
%define saned_gid 65442
|
|
|
|
Name: sane-backends
|
|
Version: 1.1.1
|
|
Release: 1mamba
|
|
Summary: SANE provides standardized access to any raster image scanner hardware
|
|
Group: System/Kernel and Hardware
|
|
Vendor: openmamba
|
|
Distribution: openmamba
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
URL: http://www.sane-project.org
|
|
Source: https://gitlab.com/sane-project/backends.git/%{version}/backends-%{version}.tar.bz2
|
|
#Source: https://alioth.debian.org/frs/download.php/file/4146/sane-backends-%{version}.tar.gz
|
|
#Source: http://alioth.debian.org/frs/download.php/3752/sane-backends-%{version}.tar.gz.1
|
|
#Source1: http://alioth.debian.org/frs/download.php/3752/sane-backends-%{version}.tar.gz.2
|
|
#Source2: http://alioth.debian.org/frs/download.php/3752/sane-backends-%{version}.tar.gz.3
|
|
#download the 3 sources above and then do a cat sane-backends-%{version}.tar.gz.[1-3] > sane-backends-%{version}.tar.gz
|
|
#Source: sane-backends-%{version}.tar.gz
|
|
Source3: sane-libusbscanner
|
|
Source4: saned.socket
|
|
Source5: saned@.service
|
|
Patch1: libsane-backends-1.0.23-disable_resmgr.patch
|
|
Patch2: libsane-backends-1.0.22-deconflict_v4l_headers.patch
|
|
Patch3: sane-backends-1.0.23-use_lp_group.patch
|
|
Patch4: libsane-backends-1.0.24-autoconf-2.70.patch
|
|
License: GPL
|
|
## AUTOBUILDREQ-BEGIN
|
|
BuildRequires: glibc-devel
|
|
BuildRequires: libatomic-devel
|
|
BuildRequires: libavahi-devel
|
|
BuildRequires: libbrotli-devel
|
|
BuildRequires: libcairo-devel
|
|
BuildRequires: libcares-devel
|
|
BuildRequires: libcurl-devel
|
|
BuildRequires: libdbus-devel
|
|
BuildRequires: libexif-devel
|
|
BuildRequires: libgcc
|
|
BuildRequires: libglib-devel
|
|
BuildRequires: libgphoto2-devel
|
|
BuildRequires: libgsasl-devel
|
|
BuildRequires: libgss-devel
|
|
BuildRequires: libidn-devel
|
|
BuildRequires: libidn2-devel
|
|
BuildRequires: libieee1284-devel
|
|
BuildRequires: libjbig-devel
|
|
BuildRequires: libjpeg-devel
|
|
BuildRequires: libltdl-devel
|
|
BuildRequires: liblzma-devel
|
|
BuildRequires: libnetsnmp-devel
|
|
BuildRequires: libnghttp2-devel
|
|
BuildRequires: libntlm-devel
|
|
BuildRequires: libopenldap-devel
|
|
BuildRequires: libopenssl-devel
|
|
BuildRequires: libpng-devel
|
|
BuildRequires: libpoppler-glib-devel
|
|
BuildRequires: libpsl-devel
|
|
BuildRequires: librtmp-devel
|
|
BuildRequires: libsasl2-devel
|
|
BuildRequires: libssh2-devel
|
|
BuildRequires: libssp-devel
|
|
BuildRequires: libstdc++6-devel
|
|
BuildRequires: libsystemd-devel
|
|
BuildRequires: libtiff-devel
|
|
BuildRequires: libudev-devel
|
|
BuildRequires: libunistring-devel
|
|
BuildRequires: libusb-devel
|
|
BuildRequires: libv4l-devel
|
|
BuildRequires: libwebp-devel
|
|
BuildRequires: libxml2-devel
|
|
BuildRequires: libz-devel
|
|
BuildRequires: libzstd-devel
|
|
## AUTOBUILDREQ-END
|
|
BuildRequires: libnetsnmp-devel >= 5.9-1mamba
|
|
BuildRequires: libgphoto2-devel >= 1:2.5.19-1mamba
|
|
BuildRequires: pkgconfig >= 0.15.0
|
|
Requires(pre): uucp
|
|
Requires: sane = %{?epoch:%epoch:}%{version}-%{release}
|
|
Provides: libsane-backends
|
|
Obsoletes: libsane-backends <= 1.0.31
|
|
%systemd_requires
|
|
|
|
# FIXME :
|
|
# *** disabling PINT backend (sys/scanio.h not found)
|
|
# *** disabling pnm backend (not selected manually)
|
|
|
|
%description
|
|
SANE stands for "Scanner Access Now Easy" and is an application programming interface (API) that provides standardized access to any raster image scanner hardware (flatbed scanner, hand-held scanner, video- and still-cameras, frame-grabbers, etc.).
|
|
The SANE API is public domain and its discussion and development is open to everybody.
|
|
The current source code is written for UNIX (including GNU/Linux) and is available under the GNU General Public License (the SANE API is available to proprietary applications and backends as well, however).
|
|
SANE is a universal scanner interface.
|
|
The value of such a universal interface is that it allows writing just one driver per image acquisition device rather than one driver for each device and application.
|
|
So, if you have three applications and four devices, traditionally you'd have had to write 12 different programs.
|
|
With SANE, this number is reduced to seven: the three applications plus the four drivers.
|
|
Of course, the savings get even bigger as more and more drivers and/or applications are added.
|
|
This is the libraries package.
|
|
|
|
%package devel
|
|
Summary: Devel files for sane-backends
|
|
Group: Development/Libraries
|
|
Requires: libsane-backends = %{version}-%{release}
|
|
Provides: libsane-backends-devel
|
|
Obsoletes: libsane-backends-devel <= 1.0.31
|
|
|
|
%description devel
|
|
SANE stands for "Scanner Access Now Easy" and is an application programming interface (API) that provides standardized access to any raster image scanner hardware (flatbed scanner, hand-held scanner, video- and still-cameras, frame-grabbers, etc.).
|
|
The SANE API is public domain and its discussion and development is open to everybody.
|
|
The current source code is written for UNIX (including GNU/Linux) and is available under the GNU General Public License (the SANE API is available to proprietary applications and backends as well, however).
|
|
SANE is a universal scanner interface.
|
|
The value of such a universal interface is that it allows writing just one driver per image acquisition device rather than one driver for each device and application.
|
|
So, if you have three applications and four devices, traditionally you'd have had to write 12 different programs.
|
|
With SANE, this number is reduced to seven: the three applications plus the four drivers.
|
|
Of course, the savings get even bigger as more and more drivers and/or applications are added.
|
|
This is the development package.
|
|
|
|
%package -n sane
|
|
Summary: SANE provides standardized access to any raster image scanner hardware
|
|
Group: System/Kernel and Hardware
|
|
Requires: sane-backends = %{?epoch:%epoch:}%{version}-%{release}
|
|
|
|
%description -n sane
|
|
SANE stands for "Scanner Access Now Easy" and is an application programming interface (API) that provides standardized access to any raster image scanner hardware (flatbed scanner, hand-held scanner, video- and still-cameras, frame-grabbers, etc.).
|
|
The SANE API is public domain and its discussion and development is open to everybody.
|
|
The current source code is written for UNIX (including GNU/Linux) and is available under the GNU General Public License (the SANE API is available to proprietary applications and backends as well, however).
|
|
SANE is a universal scanner interface.
|
|
The value of such a universal interface is that it allows writing just one driver per image acquisition device rather than one driver for each device and application.
|
|
So, if you have three applications and four devices, traditionally you'd have had to write 12 different programs.
|
|
With SANE, this number is reduced to seven: the three applications plus the four drivers.
|
|
Of course, the savings get even bigger as more and more drivers and/or applications are added.
|
|
|
|
%debug_package
|
|
|
|
%prep
|
|
%setup -q -n backends-%{version}
|
|
#-D -T
|
|
#:<< _EOF
|
|
%patch3 -p1
|
|
#%patch4 -p1
|
|
sed -i "s|m4_esyscmd_s.*|[%{version}],|" configure.ac
|
|
#sed -i "/AC_HEADER_STDC/d" configure.ac
|
|
#autoreconf -f -i
|
|
./autogen.sh
|
|
|
|
%build
|
|
#:<< _EOF
|
|
%configure \
|
|
--with-gphoto2 \
|
|
--enable-avahi \
|
|
--with-group=saned
|
|
|
|
# USB_LIBS="-lusb -lresmgr"
|
|
# FIXME: workaround to fix missing link library resmgr as of 1.0.21
|
|
|
|
%make
|
|
|
|
%install
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
%makeinstall DESTDIR=%{buildroot}
|
|
|
|
#install -d %{buildroot}%{_datadir}
|
|
#mv %{buildroot}%{_prefix}/doc %{buildroot}%{_datadir}
|
|
|
|
# add drivers to sane configuration
|
|
echo "\
|
|
hpaio
|
|
#primax" >> %{buildroot}%{_sysconfdir}/sane.d/dll.conf
|
|
|
|
install -d %{buildroot}%{_datadir}/sane
|
|
|
|
(cd tools/udev
|
|
#sh ../udev/convert-usermap.sh libsane.usermap
|
|
install -d %{buildroot}%{_sysconfdir}/udev/rules.d
|
|
install -m0644 libsane.rules %{buildroot}%{_sysconfdir}/udev/rules.d/55-libsane.rules
|
|
)
|
|
sed -i "s|\(^SYSFS{idVendor}.*\)|\1 RUN+=\"%{_sysconfdir}/udev/scripts/libusbscanner\"|" %{buildroot}%{_sysconfdir}/udev/rules.d/55-libsane.rules
|
|
install -D -m0755 %{SOURCE3} %{buildroot}%{_sysconfdir}/udev/scripts/libusbscanner
|
|
|
|
install -D -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/saned.socket
|
|
install -D -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/saned@.service
|
|
|
|
install -d %{buildroot}%{_sysconfdir}/default
|
|
cat > %{buildroot}%{_sysconfdir}/default/saned << _EOF
|
|
RUN=no
|
|
_EOF
|
|
|
|
install -d %{buildroot}%{_localstatedir}/lib/sane
|
|
|
|
%find_lang sane-backends
|
|
|
|
%clean
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
%pre -n sane
|
|
if [ $1 -ge 1 ]; then
|
|
/usr/sbin/groupadd saned -g %{saned_gid} &>/dev/null
|
|
/usr/sbin/useradd -u %{saned_uid} -c 'saned user' -d /dev/null \
|
|
-s /bin/false saned -g %{saned_gid} &>/dev/null
|
|
usermod -a -G lp saned &>/dev/null
|
|
systemctl -q daemon-reload
|
|
fi
|
|
:
|
|
|
|
%post -n sane
|
|
[ "`grep hpaio /etc/sane.d/dll.conf`" ] || echo "hpaio" >> /etc/sane.d/dll.conf
|
|
%systemd_post saned.socket
|
|
:
|
|
|
|
%preun -n sane
|
|
%systemd_preun saned.socket
|
|
# erase
|
|
if [ $1 -eq 0 ]; then
|
|
userdel saned || true
|
|
groupdel saned || true
|
|
fi
|
|
:
|
|
|
|
%postun -n sane
|
|
%systemd_postun_with_restart saned.socket
|
|
:
|
|
|
|
%post
|
|
/sbin/ldconfig
|
|
exit 0
|
|
|
|
%postun
|
|
/sbin/ldconfig
|
|
exit 0
|
|
|
|
%files -n sane
|
|
%defattr(-,root,root)
|
|
%dir %{_sysconfdir}/sane.d
|
|
%config %{_sysconfdir}/sane.d/*
|
|
%config(noreplace) %{_sysconfdir}/sane.d/saned.conf
|
|
%config(noreplace) %{_sysconfdir}/sane.d/net.conf
|
|
%config(noreplace) %{_sysconfdir}/default/saned
|
|
%config %{_sysconfdir}/udev/rules.d/55-libsane.rules
|
|
%{_sysconfdir}/udev/scripts/libusbscanner
|
|
%{_bindir}/gamma4scanimage
|
|
%{_bindir}/sane-find-scanner
|
|
%{_bindir}/scanimage
|
|
%{_bindir}/umax_pp
|
|
%{_sbindir}/saned
|
|
%{_unitdir}/saned.socket
|
|
%{_unitdir}/saned@.service
|
|
%{_datadir}/sane/*
|
|
%dir %attr(0755,saned,saned) %{_localstatedir}/lib/sane
|
|
%{_mandir}/man1/*
|
|
%{_mandir}/man5/*
|
|
%{_mandir}/man7/*
|
|
%{_mandir}/man8/*
|
|
|
|
%files -f sane-backends.lang
|
|
%defattr(-,root,root)
|
|
%{_libdir}/libsane.so.*
|
|
%dir %{_libdir}/sane
|
|
%{_libdir}/sane/libsane-*.la
|
|
%{_libdir}/sane/libsane-*.so*
|
|
%dir %{_datadir}/sane
|
|
#%dir %attr(0775,root,uucp) %{_localstatedir}/lock/sane
|
|
%doc AUTHORS COPYING LICENSE
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%{_bindir}/sane-config
|
|
%dir %{_includedir}/sane
|
|
%{_includedir}/sane/*
|
|
%{_libdir}/*.la
|
|
%{_libdir}/*.so
|
|
%{_libdir}/pkgconfig/sane-backends.pc
|
|
%dir %{_docdir}/sane-*
|
|
%{_docdir}/sane-*/*
|
|
%doc ChangeLog NEWS PROBLEMS PROJECTS README.linux
|
|
|
|
%changelog
|
|
* Fri Jun 24 2022 Automatic Build System <autodist@mambasoft.it> 1.1.1-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Thu Jun 23 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.32-1mamba
|
|
- update to 1.0.32
|
|
|
|
* Tue Dec 08 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.31-2mamba
|
|
- rebuilt by autoport with build requirements: libnetsnmp-devel>=5.9-1mamba
|
|
|
|
* Tue Aug 25 2020 Automatic Build System <autodist@mambasoft.it> 1.0.31-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Tue Jul 28 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.30-2mamba
|
|
- set saned.conf and net.conf as config(noreplace)
|
|
|
|
* Mon Jun 15 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.30-1mamba
|
|
- update to 1.0.30
|
|
|
|
* Tue Oct 09 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.27-3mamba
|
|
- rebuilt by autoport with build requirements: libgphoto2-devel>=2.5.19-1mamba
|
|
|
|
* Sat Aug 04 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.27-2mamba
|
|
- libsane-backends: require sane
|
|
|
|
* Wed Aug 01 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.27-1mamba
|
|
- update to 1.0.27
|
|
|
|
* Thu Mar 29 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.25-5mamba
|
|
- fix typo in saned@.service
|
|
|
|
* Sat Nov 25 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.25-4mamba
|
|
- add saned used to lp group for backends to work; own and set permissions to /var/lib/sane
|
|
|
|
* Mon Aug 21 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.25-3mamba
|
|
- added saned user and group and systemd socket and service
|
|
|
|
* Wed Apr 06 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.25-2mamba
|
|
- created sane package to split out libraries
|
|
|
|
* Fri Oct 09 2015 Automatic Build System <autodist@mambasoft.it> 1.0.25-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Sat Dec 20 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.24-2mamba
|
|
- rebuilt with libgphoto2 2.5.5.1
|
|
|
|
* Sat Oct 12 2013 Automatic Build System <autodist@mambasoft.it> 1.0.24-1mamba
|
|
- update to 1.0.24
|
|
|
|
* Wed Oct 31 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.23.20121031git-1mamba
|
|
- update to 1.0.23.20121031git
|
|
|
|
* Sat Sep 29 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.23-2mamba
|
|
- patch to set lp group instead of scanner for usb devices. fixes a conflict with cups for mfp (e.g. Canon)
|
|
|
|
* Thu Aug 30 2012 Automatic Build System <autodist@mambasoft.it> 1.0.23-1mamba
|
|
- update to 1.0.23
|
|
|
|
* Mon Aug 20 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.22-4mamba
|
|
- fixed autotools reconfiguration
|
|
- remove primaxscan; will make a separate package
|
|
- don't require libsane-backends-extras
|
|
|
|
* Wed Nov 02 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.22-3mamba
|
|
- added patch to build with current libv4l headers
|
|
- fixed disable_resmgr patch to remove RESMGR reference in sane-config --libs
|
|
|
|
* Tue Mar 29 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.22-2mamba
|
|
- added disable_resmgr patch
|
|
|
|
* Mon Mar 28 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.22-1mamba
|
|
- update to 1.0.22
|
|
- removed version requirement (>= 6b) for libjpeg-devel
|
|
- enabled avahi support
|
|
|
|
* Wed Jul 14 2010 Automatic Build System <autodist@mambasoft.it> 1.0.21-1mamba
|
|
- automatic update to 1.0.21 by autodist
|
|
|
|
* Wed May 06 2009 Automatic Build System <autodist@mambasoft.it> 1.0.20-1mamba
|
|
- automatic update to 1.0.20 by autodist
|
|
|
|
* Mon Jun 23 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.19-4mamba
|
|
- rebuild after libresmgr fix to relink against it
|
|
|
|
* Sun Jun 22 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.19-3mamba
|
|
- added uucp build requirement to add lock support
|
|
- removed build requirement for libsane-backends-extras
|
|
- libsane-backends-devel: added strict release requirement for libsane-backends
|
|
|
|
* Sun Jun 22 2008 Fabio Giani <fabio.giani@gmail.com> 1.0.19-2mamba
|
|
- update buildrequirements and rebuild
|
|
|
|
* Mon Apr 28 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.19-1mamba
|
|
- update to 1.0.19
|
|
|
|
* Mon Mar 20 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.17-5qilnx
|
|
- enable hpaio driver on default configuration
|
|
|
|
* Mon Mar 13 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.17-4qilnx
|
|
- execute libusbscanner to set proper permission on usbfs
|
|
|
|
* Wed Feb 22 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.17-3qilnx
|
|
- fixed udev rules generation
|
|
|
|
* Wed Feb 08 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.17-2qilnx
|
|
- comment out primax scanner
|
|
|
|
* Fri Feb 03 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.17-1qilnx
|
|
- update to version 1.0.17 by autospec
|
|
- added support for udev
|
|
|
|
* Wed Dec 07 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.16-3qilnx
|
|
- added hotplug support scripts
|
|
|
|
* Tue Dec 06 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.16-2qilnx
|
|
- added hpoj driver
|
|
|
|
* Wed Aug 10 2005 Davide Madrisan <davide.madrisan@qilinux.it> 1.0.16-1qilnx
|
|
- update to version 1.0.16 by autospec
|
|
- added missing %%post, %%postun scriptlets
|
|
|
|
* Thu Jan 22 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.13-2qilnx
|
|
- primax driver added
|
|
|
|
* Thu Jan 08 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.13-1qilnx
|
|
- new version rebuild
|
|
|
|
* Fri Aug 01 2003 Silvan Calarco <silvan.calarco@qinet.it> 1.0.12-1qilnx
|
|
- creation of sane package
|
|
|