Try use Mageia spec and add some pathch. Update iscan to 2.28.1

This commit is contained in:
akdengi 2014-02-04 16:28:49 +04:00
parent 802be07fc4
commit 4ff1612fdb
14 changed files with 428 additions and 101 deletions

View file

@ -1,7 +1,8 @@
sources: sources:
"iscan_2.24.0-4-free.tar.bz2": 8228edc1cfaa75fd0cfba631746376bf1f166f53 iscan-2.28.1-3-free.tar.bz2: e55ef6c94c49a877d7c41e74cfbd015448a7c5f4
"sane-backend-geniusvp2_1.0.16.1.tar.gz": 4af825c231c8c048f8145af26b8fda3b66cb8be8 iscan_2.24.0-4-free.tar.bz2: 8228edc1cfaa75fd0cfba631746376bf1f166f53
"sane-driver-0.2.tar.gz": 59fbb163d4c9eba89d6fa6c4f9dc5229fae2dbdf primaxscan-1.1.beta1.tar.gz: 374e2790fd6b3879835e10969dbe28aebe3025b7
"primaxscan-1.1.beta1.tar.gz": 374e2790fd6b3879835e10969dbe28aebe3025b7 sane-backend-geniusvp2_1.0.16.1.tar.gz: 4af825c231c8c048f8145af26b8fda3b66cb8be8
"sane_hp_rts88xx-0.18.tar.gz": 02ed0f305fe100ff234e9250cdc618eba4b19a16 sane-backends-1.0.24.tar.gz: c10bcb30a1b092b2c2fe5a86d6a5efc29123ccf9
"sane-backends-1.0.24.tar.gz": c10bcb30a1b092b2c2fe5a86d6a5efc29123ccf9 sane-driver-0.2.tar.gz: 59fbb163d4c9eba89d6fa6c4f9dc5229fae2dbdf
sane_hp_rts88xx-0.18.tar.gz: 02ed0f305fe100ff234e9250cdc618eba4b19a16

View file

@ -1,10 +0,0 @@
--- configure.ac 2009-07-22 02:50:46.000000000 +0200
+++ configure.ac.oden 2009-09-01 18:26:04.000000000 +0200
@@ -142,6 +142,7 @@
dnl checks for libraries
AC_CHECK_LIB([usb], [usb_get_busses])
+AC_CHECK_LIB([m], [floor])
AC_CHECK_LIB([sane], [sane_init])
AC_CHECK_LIB([rt], [clock_gettime], [HAVE_LIBRT=1])

View file

@ -0,0 +1,10 @@
--- configure.ac.iscan-2.10.0-1_fix_link 2011-12-01 02:30:53.000000000 +0100
+++ configure.ac 2011-12-23 07:11:25.448858406 +0100
@@ -168,6 +168,7 @@
PKG_CHECK_MODULES(XML, libxml-2.0)
AC_CHECK_LIB([usb], [usb_get_busses])
+AC_CHECK_LIB([m], [floor])
AC_CHECK_LIB([sane], [sane_init])
AC_CHECK_LIB([rt], [clock_gettime], [HAVE_LIBRT=1])

View file

@ -1,39 +1,43 @@
diff -p -up sane-backends-1.0.20/iscan-2.20.1/backend/Makefile.am.linkage_fix sane-backends-1.0.20/iscan-2.20.1/backend/Makefile.am --- sane-backends-1.0.22/iscan-2.28.1/backend/Makefile.am.linkage_fix 2011-12-01 02:30:53.000000000 +0100
--- sane-backends-1.0.20/iscan-2.20.1/backend/Makefile.am.linkage_fix 2009-07-22 02:50:45.000000000 +0200 +++ sane-backends-1.0.22/iscan-2.28.1/backend/Makefile.am 2011-12-23 07:15:10.770064595 +0100
+++ sane-backends-1.0.20/iscan-2.20.1/backend/Makefile.am 2009-09-28 16:14:53.000000000 +0200 @@ -33,6 +33,7 @@
@@ -30,6 +30,7 @@ AM_CPPFLAGS = \
-DPKGLIBDIR=\"$(pkglibdir)\" \
-DPKGLOCALSTATEDIR=\"$(localstatedir)/lib/$(PACKAGE_TARNAME)\" \
-DSYSCONFDIR=\"$(sysconfdir)\" \ -DSYSCONFDIR=\"$(sysconfdir)\" \
-DENABLE_DEBUG=1 \
-DMSG_MODULE=\"epkowa\" \
+ -I../$(top_srcdir)/include \ + -I../$(top_srcdir)/include \
-I$(top_srcdir) -I$(top_srcdir)
AM_CFLAGS = \ AM_CFLAGS = \
-fPIC -fPIC
@@ -113,18 +114,19 @@ EXTRA_DIST = \ @@ -121,21 +122,21 @@
epkowa.conf epkowa.conf
sane_backends_files = \ sane_backends_files = \
- ../include/sane/sanei.h \ - ../include/sane/sanei.h \
- ../include/sane/sanei_config.h \ - ../include/sane/sanei_config.h \
- ../include/sane/sanei_debug.h \ - ../include/sane/sanei_debug.h \
- ../include/sane/sanei_magic.h \
- ../include/sane/sanei_pio.h \ - ../include/sane/sanei_pio.h \
- ../include/sane/sanei_scsi.h \ - ../include/sane/sanei_scsi.h \
- ../include/sane/sanei_usb.h \ - ../include/sane/sanei_usb.h \
+ ../../include/sane/sanei.h \ + ../../include/sane/sanei.h \
+ ../../include/sane/sanei_config.h \ + ../../include/sane/sanei_config.h \
+ ../../include/sane/sanei_debug.h \ + ../../include/sane/sanei_debug.h \
+ ../../include/sane/sanei_magic.h \
+ ../../include/sane/sanei_pio.h \ + ../../include/sane/sanei_pio.h \
+ ../../include/sane/sanei_scsi.h \ + ../../include/sane/sanei_scsi.h \
+ ../../include/sane/sanei_usb.h \ + ../../include/sane/sanei_usb.h \
../sanei/linux_sg3_err.h \ ../sanei/linux_sg3_err.h \
- ../sanei/sanei_config.c \ - ../sanei/sanei_config.c \
- ../sanei/sanei_constrain_value.c \ - ../sanei/sanei_constrain_value.c \
- ../sanei/sanei_init_debug.c \
- ../sanei/sanei_magic.c \
- ../sanei/sanei_pio.c \ - ../sanei/sanei_pio.c \
- ../sanei/sanei_scsi.c \ - ../sanei/sanei_scsi.c \
- ../sanei/sanei_usb.c \ - ../sanei/sanei_usb.c \
+ ../../sanei/sanei_config.c \ + ../../sanei/sanei_config.c \
+ ../../sanei/sanei_init_debug.c \
+ ../../sanei/sanei_constrain_value.c \ + ../../sanei/sanei_constrain_value.c \
+ ../../sanei/sanei_init_debug.c \
+ ../../sanei/sanei_magic.c \
+ ../../sanei/sanei_pio.c \ + ../../sanei/sanei_pio.c \
+ ../../sanei/sanei_scsi.c \ + ../../sanei/sanei_scsi.c \
+ ../../sanei/sanei_usb.c \ + ../../sanei/sanei_usb.c \

View file

@ -0,0 +1,60 @@
--- backend/avision.c.str 2009-04-06 14:51:43.000000000 +0200
+++ backend/avision.c 2009-04-06 14:52:28.000000000 +0200
@@ -1138,7 +1138,7 @@
{
size_t i;
- DBG (dbg_level, info);
+ DBG (dbg_level, "%s", info);
for (i = 0; i < count; ++ i) {
DBG (dbg_level, " [%lu] %1d%1d%1d%1d%1d%1d%1d%1db %3oo %3dd %2xx\n",
(u_long) i,
@@ -1154,7 +1154,7 @@
int address = 0;
char text [16*3+1];
- DBG (dbg_level, info);
+ DBG (dbg_level, "%s", info);
while (count) {
char* t = text;
int i = 0;
--- backend/niash.c.str 2009-04-06 14:55:27.000000000 +0200
+++ backend/niash.c 2009-04-06 14:55:47.000000000 +0200
@@ -1112,7 +1112,7 @@
if ((SANE_GAMMA_SIZE / 16) && (i % (SANE_GAMMA_SIZE / 16)) == 0)
{
strcat (szTable, "\n");
- DBG (DBG_MSG, szTable);
+ DBG (DBG_MSG, "%s", szTable);
strcpy (szTable, "");
}
/* test for number print */
@@ -1125,7 +1125,7 @@
if (strlen (szTable))
{
strcat (szTable, "\n");
- DBG (DBG_MSG, szTable);
+ DBG (DBG_MSG, "%s", szTable);
}
break;
--- frontend/scanimage.c.str 2009-04-06 14:57:54.000000000 +0200
+++ frontend/scanimage.c 2009-04-06 14:58:16.000000000 +0200
@@ -1790,7 +1790,7 @@
printf (start, int_arg);
break;
case 0:
- printf (start);
+ printf ("%s", start);
break;
}
*percent = cc;
@@ -1804,7 +1804,7 @@
}
}
if (*start)
- printf (start);
+ printf ("%s", start);
}
}
if (i == 0 && ch != 'f')

View file

@ -0,0 +1,12 @@
diff -p -up sane-backends-1.0.20/backend/rts8891.c.strformat sane-backends-1.0.20/backend/rts8891.c
--- sane-backends-1.0.20/backend/rts8891.c.strformat 2009-04-30 15:15:20.000000000 +0200
+++ sane-backends-1.0.20/backend/rts8891.c 2009-09-28 14:00:28.000000000 +0200
@@ -3751,7 +3751,7 @@ init_device (struct Rts8891_Device *dev)
for (i = 0; i < dev->reg_count; i++)
sprintf (message + strlen (message), "0x%02x ", dev->regs[i]);
sprintf (message + strlen (message), "\n");
- DBG (DBG_io2, message);
+ DBG (DBG_io2, "%s", message);
}
/* initial sensor guess */

View file

@ -0,0 +1,47 @@
From 305535e303032814b65bf6d889a95f00f08a9071 Mon Sep 17 00:00:00 2001
From: Nils Philippsen <nils@redhat.com>
Date: Wed, 5 May 2010 12:49:02 +0200
Subject: [PATCH] patch: epson-expression800
Squashed commit of the following:
commit 3b501d7499357438a1fbd63fefb2f977ae3051f5
Author: Nils Philippsen <nils@redhat.com>
Date: Wed May 5 12:14:23 2010 +0200
Improve Epson Expression 800
Epson Expression 800 models announce themselves as "processor", not
"scanner".
---
doc/descriptions/epson.desc | 1 +
doc/descriptions/epson2.desc | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/doc/descriptions/epson.desc b/doc/descriptions/epson.desc
index a22325c..55a0136 100644
--- a/doc/descriptions/epson.desc
+++ b/doc/descriptions/epson.desc
@@ -174,6 +174,7 @@
:model "Expression 800"
:interface "SCSI"
:status :complete
+:scsi "EPSON" "Expression800" "processor"
:model "Expression 1600"
:interface "SCSI USB IEEE-1394"
diff --git a/doc/descriptions/epson2.desc b/doc/descriptions/epson2.desc
index 9a14f4f..56cabcd 100644
--- a/doc/descriptions/epson2.desc
+++ b/doc/descriptions/epson2.desc
@@ -241,6 +241,7 @@
:model "Expression 800" ; command spec
:interface "SCSI"
:status :complete
+:scsi "EPSON" "Expression800" "processor"
:comment "overseas version of the GT-9600"
:model "Expression 836XL" ; command spec
--
1.6.6.1

View file

@ -0,0 +1,22 @@
--- backend/Makefile.am.link 2010-12-04 18:15:16.000000000 +0000
+++ backend/Makefile.am 2010-12-04 18:16:13.000000000 +0000
@@ -1089,7 +1089,7 @@
nodist_libsane_la_SOURCES = dll-s.c
libsane_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=dll
libsane_la_LDFLAGS = $(DIST_LIBS_LDFLAGS)
-libsane_la_LIBADD = $(COMMON_LIBS) @PRELOADABLE_BACKENDS_ENABLED@ libdll.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo $(DL_LIBS) $(LIBV4L_LIBS) $(MATH_LIB) $(IEEE1284_LIBS) $(TIFF_LIBS) $(JPEG_LIBS) $(GPHOTO2_LIBS) $(SOCKET_LIBS) $(USB_LIBS) $(AVAHI_LIBS) $(SCSI_LIBS) $(PTHREAD_LIBS) $(RESMGR_LIBS)
+libsane_la_LIBADD = $(COMMON_LIBS) @PRELOADABLE_BACKENDS_ENABLED@ libdll.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo $(DL_LIBS) $(IEEE1284_LIBS) $(USB_LIBS)
# WARNING: Automake is getting this wrong so have to do it ourselves.
libsane_la_DEPENDENCIES = $(COMMON_LIBS) @PRELOADABLE_BACKENDS_ENABLED@ libdll.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo @SANEI_SANEI_JPEG_LO@
--- tools/sane-config.in.orig 2010-12-04 19:18:07.000000000 +0000
+++ tools/sane-config.in 2010-12-04 19:19:22.000000000 +0000
@@ -13,7 +13,7 @@
exec_prefix="@exec_prefix@"
LDFLAGS="@LDFLAGS@ @GPHOTO2_LDFLAGS@"
-LIBS="@LIBS@ @DL_LIBS@ @LIBV4L_LIBS@ @MATH_LIB@ @TIFF_LIBS@ @JPEG_LIBS@ @GPHOTO2_LIBS@ @SOCKET_LIBS@ @AVAHI_LIBS@ @USB_LIBS@ @SCSI_LIBS@ @RESMGR_LIBS@"
+LIBS="@DL_LIBS@ @USB_LIBS@ @IEEE1284_LIBS@"
pkgincludedir="@pkgincludedir@"
pkglibdir="@pkglibdir@"
includedir="@includedir@"

View file

@ -0,0 +1,51 @@
Index: configure
===================================================================
--- configure
+++ configure 2011-03-17 11:50:22.929227833 +0100
@@ -16877,7 +16877,7 @@
pixma plustek plustek_pp qcam ricoh rts8891 s9036 \
sceptre sharp sm3600 sm3840 snapscan sp15c st400 \
stv680 tamarack teco1 teco2 teco3 test u12 umax
- umax_pp umax1220u v4l xerox_mfp p5"
+ umax_pp umax1220u v4l xerox_mfp p5 primascan"
# If user specifies backends manually then cause configure
# to fail if its detected it can't be compiled. If we
Index: backend/Makefile.am
===================================================================
--- backend/Makefile.am
+++ backend/Makefile.am 2011-03-17 11:52:09.793227833 +0100
@@ -191,7 +191,7 @@
libtamarack.la libtest.la libteco1.la \
libteco2.la libteco3.la libu12.la libumax.la \
libumax1220u.la libumax_pp.la libv4l.la \
- libxerox_mfp.la
+ libxerox_mfp.la libprimascan.la
# Each stand alone backend thats possible to be built should be listed
# here. There are the libraries that are installed under $(libdir)/sane.
@@ -224,7 +224,7 @@
libsane-tamarack.la libsane-test.la libsane-teco1.la \
libsane-teco2.la libsane-teco3.la libsane-u12.la libsane-umax.la \
libsane-umax1220u.la libsane-umax_pp.la libsane-v4l.la \
- libsane-xerox_mfp.la
+ libsane-xerox_mfp.la libsane-primascan.la
EXTRA_LTLIBRARIES = $(be_convenience_libs) $(be_dlopen_libs)
@@ -1064,6 +1064,15 @@
libsane_xerox_mfp_la_LIBADD = $(COMMON_LIBS) libxerox_mfp.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_tcp.lo $(MATH_LIB) $(SOCKET_LIBS) $(USB_LIBS) $(RESMGR_LIBS)
EXTRA_DIST += xerox_mfp.conf.in
+libprimascan_la_SOURCES = primascan.c primascan.h
+libprimascan_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=primascan
+
+nodist_libsane_primascan_la_SOURCES = primascan-s.c
+libsane_primascan_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=primascan
+libsane_primascan_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS)
+libsane_primascan_la_LIBADD = $(COMMON_LIBS) libprimascan.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo sane_strstatus.lo ../sanei/sanei_usb.lo $(MATH_LIB) $(USB_LIBS)
+
+
libdll_la_SOURCES = dll.c
BUILT_SOURCES = dll-preload.h
CLEANFILES += dll-preload.h

View file

@ -0,0 +1,49 @@
--- sane-backends-1.0.22/doc/descriptions-external/brother2.desc.brother2list 2010-12-01 23:49:58.000000000 +0000
+++ sane-backends-1.0.22/doc/descriptions-external/brother2.desc 2012-03-11 23:08:01.015751925 +0000
@@ -56,6 +56,21 @@
:interface "USB"
:usbid "0x04f9" "0x0190"
+:model "DCP-130C"
+:status :untested
+:interface "USB"
+:usbid "0x04f9" "0x01a8"
+
+:model "DCP-153C"
+:status :good
+:interface "USB"
+:usbid "0x04f9" "0x01e1"
+
+:model "DCP-195C"
+:status :untested
+:interface "USB"
+:usbid "0x04f9" "0x0222"
+
:model "DCP-310CN"
:status :untested
:interface "USB network"
@@ -96,6 +111,11 @@
:interface "USB"
:usbid "0x04f9" "0x0184"
+:model "DCP-J125"
+:status :good
+:interface "USB"
+:usbid "0x04f9" "0x0253"
+
:model "MFC-210C"
:status :good
:interface "USB"
@@ -113,6 +133,12 @@
:usbid "0x04f9" "0x01ab"
:comment "Reportedly working."
+:model "MFC-260C"
+:status :untested
+:interface "USB"
+:usbid "0x04f9" "0x01d6"
+:comment "brscan2 needed."
+
:model "MFC-3240C"
:status :untested
:interface "USB"

View file

@ -0,0 +1,22 @@
Index: frontend/scanimage.c
===================================================================
--- frontend/scanimage.c
+++ frontend/scanimage.c 2011-03-17 12:17:35.350469332 +0100
@@ -1891,7 +1891,7 @@
printf (start, int_arg);
break;
case 0:
- printf (start);
+ printf ("%s", start);
break;
}
*percent = cc;
@@ -1905,7 +1905,7 @@
}
}
if (*start)
- printf (start);
+ printf ("%s", start);
}
}
if (i == 0 && ch != 'f')

View file

@ -0,0 +1,29 @@
diff -p -up sane-backends-1.0.23/acinclude.m4.pthread sane-backends-1.0.23/acinclude.m4
--- sane-backends-1.0.23/acinclude.m4.pthread 2011-11-21 21:17:48.000000000 +0100
+++ sane-backends-1.0.23/acinclude.m4 2012-12-19 14:58:51.673675096 +0100
@@ -245,7 +245,6 @@ AC_DEFUN([SANE_CHECK_PTHREAD],
fi
])
- if test $use_pthread = yes ; then
AC_CHECK_HEADERS(pthread.h,
[
AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIBS="-lpthread")
@@ -256,16 +255,12 @@ AC_DEFUN([SANE_CHECK_PTHREAD],
,[ have_pthread=no; use_pthread=no ])
LIBS="$save_LIBS"
],)
- fi
if test $use_pthread = yes ; then
AC_DEFINE_UNQUOTED(USE_PTHREAD, "$use_pthread",
[Define if pthreads should be used instead of forked processes.])
- else
- dnl Reset library in case it was found but we are not going to use it.
- PTHREAD_LIBS=""
fi
- if test "$have_pthread" = "yes" ; then
+ if test "$use_pthread" = "yes" ; then
CPPFLAGS="${CPPFLAGS} -D_REENTRANT"
fi
AC_SUBST(PTHREAD_LIBS)

View file

@ -1,41 +1,33 @@
From c7f5126447ed5335a54d9333ac37f35c2189fbf4 Mon Sep 17 00:00:00 2001 commit 2fd4ea713546ef0cb9f67ee7853e9b1d01f64071
From: Nils Philippsen <nils@redhat.com> Author: Nils Philippsen <nils@redhat.com>
Date: Mon, 10 Sep 2012 12:25:33 +0200 AuthorDate: Fri Aug 31 15:54:01 2012 +0200
Subject: [PATCH] patch: udev Commit: Nils Philippsen <nils@redhat.com>
CommitDate: Fri Aug 31 15:54:01 2012 +0200
Squashed commit of the following: patch: udev
Squashed commit of the following:
commit 99a4a33bd297f5b475ac610cf2d51385893596b9
Author: Nils Philippsen <nils@redhat.com>
Date: Fri Aug 31 15:51:55 2012 +0200
adapt generated udev rules for Fedora
commit 3d19b3eaf91fa8c3c2a78956f570d3e0f4c3f342
Author: Nils Philippsen <nils@redhat.com>
Date: Mon Sep 10 12:25:16 2012 +0200
adapt generated udev rules for Fedora
commit 7017c3ad1dadc27edd2c47ceec04f8648c839d53
Author: Nils Philippsen <nils@redhat.com>
Date: Mon Sep 10 12:20:43 2012 +0200
use group and mode macros consistently
---
tools/sane-desc.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/tools/sane-desc.c b/tools/sane-desc.c diff --git a/tools/sane-desc.c b/tools/sane-desc.c
index 7bbd012..5c5bbe9 100644 index 376e451..938f95e 100644
--- a/tools/sane-desc.c --- a/tools/sane-desc.c
+++ b/tools/sane-desc.c +++ b/tools/sane-desc.c
@@ -56,9 +56,9 @@ @@ -56,7 +56,7 @@
#define COLOR_NEW "\"#F00000\"" #define COLOR_NEW "\"#F00000\""
#define COLOR_UNKNOWN "\"#000000\"" #define COLOR_UNKNOWN "\"#000000\""
-#define DEVMODE "0664" -#define DEVMODE "0664"
+#define DEVMODE "0644" +#define DEVMODE "0644"
#define DEVOWNER "root" #define DEVOWNER "root"
-#define DEVGROUP "scanner" #define DEVGROUP "usb"
+#define DEVGROUP "root"
#ifndef PATH_MAX
# define PATH_MAX 1024
@@ -3543,7 +3543,8 @@ print_udev (void) @@ -3543,7 +3543,8 @@ print_udev (void)
} }
@ -46,19 +38,3 @@ index 7bbd012..5c5bbe9 100644
printf ("\nLABEL=\"libsane_usb_rules_end\"\n\n"); printf ("\nLABEL=\"libsane_usb_rules_end\"\n\n");
@@ -3619,10 +3620,8 @@ print_udev (void)
}
printf ("LABEL=\"libsane_scsi_rules_end\"\n");
- if (mode == output_mode_udevacl)
- printf("\nENV{libsane_matched}==\"yes\", RUN+=\"/bin/setfacl -m g:%s:rw $env{DEVNAME}\"\n", DEVGROUP);
- else
- printf ("\nENV{libsane_matched}==\"yes\", MODE=\"664\", GROUP=\"scanner\"\n");
+ if (mode != output_mode_udevacl)
+ printf ("\nENV{libsane_matched}==\"yes\", MODE=\"%s\", GROUP=\"%s\"\n", DEVMODE, DEVGROUP);
printf ("\nLABEL=\"libsane_rules_end\"\n");
}
--
1.7.11.4

126
sane.spec
View file

@ -1,4 +1,4 @@
%define iscanversion 2.24.0 %define iscanversion 2.28.1
%define beta %nil %define beta %nil
%define major 1 %define major 1
%define libname %mklibname %{name} %{major} %define libname %mklibname %{name} %{major}
@ -28,7 +28,7 @@
Summary: SANE - local and remote scanner access Summary: SANE - local and remote scanner access
Name: sane Name: sane
Version: 1.0.24 Version: 1.0.24
Release: 2 Release: 3
# lib/ is LGPLv2+, backends are GPLv2+ with exceptions # lib/ is LGPLv2+, backends are GPLv2+ with exceptions
# Tools are GPLv2+, docs are public domain # Tools are GPLv2+, docs are public domain
License: GPLv2+ and GPLv2+ with exceptions and Public Domain License: GPLv2+ and GPLv2+ with exceptions and Public Domain
@ -45,38 +45,45 @@ Source12: http://www.geocities.com/trsh0101/SANE/primascan.c
# downloaded from http://www.avasys.jp/english/linux_e/index.html # downloaded from http://www.avasys.jp/english/linux_e/index.html
# Non-free part stripped out with # Non-free part stripped out with
# mkdir x; cd x; tar -xvzf ../iscan_2.21.0-6.tar.gz; rm -f */non-free/EAPL*.txt */non-free/lib*.so; tar -cvjf ../iscan_2.21.0-6-free.tar.bz2 *; cd ..; rm -rf x # mkdir x; cd x; tar -xvzf ../iscan_2.21.0-6.tar.gz; rm -f */non-free/EAPL*.txt */non-free/lib*.so; tar -cvjf ../iscan_2.21.0-6-free.tar.bz2 *; cd ..; rm -rf x
Source13: iscan_%{iscanversion}-4-free.tar.bz2 Source13: iscan-%{iscanversion}-3-free.tar.bz2
Source14: http://downloads.sourceforge.net/project/geniusvp2/sane-backend-geniusvp2/1.0.16.1/sane-backend-geniusvp2_1.0.16.1.tar.gz Source14: http://downloads.sourceforge.net/project/geniusvp2/sane-backend-geniusvp2/1.0.16.1/sane-backend-geniusvp2_1.0.16.1.tar.gz
Source15: sane.rpmlintrc Source15: sane.rpmlintrc
Patch0: sane-backends-1.0.19-fix-str-fmt.patch
Patch1: sane-backends-1.0.18-plustek-s12.patch Patch1: sane-backends-1.0.18-plustek-s12.patch
Patch23: iscan-2.10.0-1_fix_link.patch Patch23: iscan-2.28.1-fix-link.patch
Patch24: sane-backends-1.0.21-link.patch
Patch26: iscan-2.20.1-no_non-free_please.diff Patch26: iscan-2.20.1-no_non-free_please.diff
Patch27: iscan-2.20.1-linkage_fix.patch Patch27: iscan-2.28.1-linkage_fix.patch
# (fc) 1.0.19-12mdv fix group for device # (fc) 1.0.19-12mdv fix group for device
Patch28: sane-backends-1.0.20-group.patch Patch28: sane-backends-1.0.20-group.patch
# (fc) 1.0.20-1mdv primascan build support # (fc) 1.0.20-1mdv primascan build support
Patch29: sane-backends-1.0.22-primascan.patch Patch29: sane-backends-1.0.21-primascan.patch
# (fc) list Brother MFC-260C, DCP130C as supported (Mdv bug # 52951) # (fc) list Brother MFC-260C, DCP130C as supported (Mdv bug # 52951)
Patch30: sane-backends-1.0.20-brother2list.patch Patch30: sane-backends-1.0.22-brother2list.patch
Patch31: sane-backends-1.0.22-strformat.patch Patch31: sane-backends-1.0.20-strformat.patch
Patch32: sane-backends-1.0.22-fix-str-fmt.patch
Patch33: sane-backends-1.0.23-have-pthread.patch
# Debian patches # Debian patches
# new build system breaks build when using pthreads. # new build system breaks build when using pthreads.
Patch101: 01_missing_pthreads.dpatch Patch101: 01_missing_pthreads.dpatch
# add back SANE_CAP_ALWAYS_SETTABLE which was mistakenly # add back SANE_CAP_ALWAYS_SETTABLE which was mistakenly
# removed from SANE 1.0.20 # removed from SANE 1.0.20
Patch106: 06_cap_always_settable.dpatch Patch106: 06_cap_always_settable.dpatch
# Update es translation and add new gl translation, courtesy of # Update es translation and add new gl translation, courtesy of
# Miguel Bouzada <mbouzada@gmail.com>.
Patch109: 09_po_update_es_add_gl.dpatch
# Use fedora's patch to remove rpath # Use fedora's patch to remove rpath
# Patch to the dll backend to look for pieces of dll.conf inside the # Patch to the dll backend to look for pieces of dll.conf inside the
# /etc/sane.d/dll.d/ directory. This is a facility for packages providing # /etc/sane.d/dll.d/ directory. This is a facility for packages providing
# external backends (like libsane-extras, hpoj and hplip). # external backends (like libsane-extras, hpoj and hplip).
Patch113: 22_dll_backend_conf.dpatch Patch113: 22_dll_backend_conf.dpatch
Patch115: 24_sane-desc.c_debian_mods.dpatch Patch115: 24_sane-desc.c_debian_mods.dpatch
# Fedora patches # Fedora patches
Patch202: sane-backends-1.0.20-open-macro.patch Patch202: sane-backends-1.0.20-open-macro.patch
Patch205: sane-backends-1.0.20-epson-expression800.patch Patch203: sane-backends-1.0.23-udev.patch
Patch206: sane-backends-1.0.23-udev.patch Patch204: sane-backends-1.0.21-epson-expression800.patch
BuildRequires: gettext BuildRequires: gettext
BuildRequires: gettext-devel BuildRequires: gettext-devel
@ -176,28 +183,61 @@ access image acquisition devices available on the local host.
%prep %prep
%setup -qn sane-backends-%{version}%{beta} %setup -qn sane-backends-%{version}%{beta}
%apply_patches
%patch1 -p1 -b .plusteks12 %patch1 -p1 -b .plusteks12
###%patch24 -p0 -b .link
%patch28 -p1 -b .group %patch28 -p1 -b .group
%patch30 -p1 -b .brother2list %patch30 -p1 -b .brother2list
%patch31 -p1 -b .strformat %patch31 -p1 -b .strformat
%patch32 -p0
%patch33 -p1 -b .pthread
%patch101 -p1 %patch101 -p1
%patch106 -p1 %patch106 -p1
#%patch109 -p1
%patch113 -p1 %patch113 -p1
%patch115 -p1 %patch115 -p1
# Fedora patches # Fedora patches
%patch202 -p1 -b .open-macro %patch202 -p1 -b .open-macro
%patch205 -p1 -b .epson-expression800 %patch203 -p1 -b .udev
%patch204 -p1 -b .epson-expression800
# Patches for non-x86 platforms
%ifarch sparc
%patch9 -p1 -b .sparc
%endif
# "geniusvp2" backend
#setup -q -T -D -a 14 -n sane-backends-%{version}
# "hp3500" backend
# Patch does not match on file unsupported.desc (change should not affect
# the backend itself), so we force it in
#bzcat %{PATCH20} | patch -p0 -b --suffix .hp3500 -f || :
# Fix parallel build (Gwenole)
#for a in `find . -name Makefile.in -print`; do \
# perl -p -i -e 's/^(\s*TARGETS\s+=\s+)(\S+)(\s+)(\$\(\S+_LTOBJS\))/$1$4$3$2/' $a; \
#done
# Patch for the HP ScanJet 44x0C scanners ("hp_rts88xx" backend)
#%setup -q -T -D -a 9 -n sane-backends-%{version}%{beta}
#cd sane_hp_rts88xx/sane_hp_rts88xx
#./patch-sane.sh $RPM_BUILD_DIR/sane-backends-%{version}%{beta}
#cd ../..
#patch21 -p1 -b .hp_rts88xx-0.18-fix_link
#echo 'hp_rts88xx' >> backend/dll.conf.in
# Primax parallel port scanners # Primax parallel port scanners
%if %{with primax} %if %{primax_support}
%setup -q -T -D -a 3 -n sane-backends-%{version}%{beta} %setup -q -T -D -a 3 -n sane-backends-%{version}%{beta}
%endif %endif
# "primascan" backend # "primascan" backend
# (commented out in dll.conf, as it claims to support every USB scanner) # (commented out in dll.conf, as it claims to support every USB scanner)
%patch29 -p1 -b .primascan ######%patch29 -p0 -b .primascan
cat %{SOURCE11} > backend/primascan.h cat %{SOURCE11} > backend/primascan.h
cat %{SOURCE12} > backend/primascan.c cat %{SOURCE12} > backend/primascan.c
##perl -p -i -e 's:(BACKENDS=\"):$1primascan :' configure.in ##perl -p -i -e 's:(BACKENDS=\"):$1primascan :' configure.in
@ -205,22 +245,24 @@ cat %{SOURCE12} > backend/primascan.c
##perl -p -i -e 's:(BACKENDS=\"):$1primascan :' configure ##perl -p -i -e 's:(BACKENDS=\"):$1primascan :' configure
##perl -p -i -e 's:(DISTFILES\s*=\s*):$1primascan.h primascan.c :' backend/Makefile.in ##perl -p -i -e 's:(DISTFILES\s*=\s*):$1primascan.h primascan.c :' backend/Makefile.in
echo '#primascan' >> backend/dll.conf.in echo '#primascan' >> backend/dll.conf.in
autoreconf -fi
# Scanners in some Brother MF devices
#setup -q -T -D -a 10 -n sane-backends-%{version}%{beta}
# Epson Avasys driver for Epson scanners # Epson Avasys driver for Epson scanners
%if %{with epkowa} %if %{epkowa_support}
%setup -q -T -D -a 13 -n sane-backends-%{version}%{beta} %setup -q -T -D -a 13 -n sane-backends-%{version}%{beta}
%endif %endif
# lib64 fixes (avoid patch) # lib64 fixes (avoid patch)
# NOTE: don't regenerate configure script past this line # NOTE: don't regenerate configure script past this line
perl -pi -e "s@/lib(\"|\b[^/])@/%{_lib}\1@g if /LDFLAGS=.*with_ptal/" configure perl -pi -e "s@/lib(\"|\b[^/])@/%_lib\1@g if /LDFLAGS=.*with_ptal/" configure
# Reduce number of retries done by the "snapscan" backend when accessing # Reduce number of retries done by the "snapscan" backend when accessing
# the scanner # the scanner
perl -p -i -e 's:for \(retries = 20; retries; retries--\):for (retries = 5; retries; retries--):' backend/snapscan-scsi.c perl -p -i -e 's:for \(retries = 20; retries; retries--\):for (retries = 5; retries; retries--):' backend/snapscan-scsi.c
%if %{with epkowa} %if %{epkowa_support}
pushd iscan-%{iscanversion} pushd iscan-%{iscanversion}
%patch23 -p0 -b .iscan-2.10.0-1_fix_link %patch23 -p0 -b .iscan-2.10.0-1_fix_link
%patch26 -p0 -b .no_non-free_please %patch26 -p0 -b .no_non-free_please
@ -278,6 +320,8 @@ cd ..
# Create missing lock dir # Create missing lock dir
install -d %{buildroot}/var/lib/lock/sane install -d %{buildroot}/var/lib/lock/sane
#mv %{buildroot}/%{_sbindir}/saned %{buildroot}/%{_sbindir}/in.saned
#install -m 755 tools/sane-find-scanner %{buildroot}/%{_bindir}
perl -pi -e "s/installed.*/installed=yes/g" %{buildroot}%{_libdir}/libsane.la perl -pi -e "s/installed.*/installed=yes/g" %{buildroot}%{_libdir}/libsane.la
/sbin/ldconfig -n %{buildroot}%{_libdir} %{buildroot}%{_libdir}/sane /sbin/ldconfig -n %{buildroot}%{_libdir} %{buildroot}%{_libdir}/sane
@ -296,7 +340,7 @@ perl -p -i -e 's/HP\s+OfficeJet/HPLIP/g' %{buildroot}%{_sysconfdir}/sane.d/dll.c
perl -p -i -e 's/hpoj.sf.net/hplip.sf.net/g' %{buildroot}%{_sysconfdir}/sane.d/dll.conf perl -p -i -e 's/hpoj.sf.net/hplip.sf.net/g' %{buildroot}%{_sysconfdir}/sane.d/dll.conf
perl -p -i -e 's/hpoj/hpaio/g' %{buildroot}%{_sysconfdir}/sane.d/dll.conf perl -p -i -e 's/hpoj/hpaio/g' %{buildroot}%{_sysconfdir}/sane.d/dll.conf
%if %{with empty_dll_conf} %if %{empty_dll_conf}
# The /etc/sane.d/dll.conf contains lines for every backend, so every # The /etc/sane.d/dll.conf contains lines for every backend, so every
# backend probes for a scanner when a SANE frontend (e. g. xsane) is # backend probes for a scanner when a SANE frontend (e. g. xsane) is
# started. With this the user has always to wait around one minute # started. With this the user has always to wait around one minute
@ -315,26 +359,25 @@ install -d %{buildroot}%{_docdir}/sane-backends-%{version}/
install -d %{buildroot}%{_docdir}/sane-backends-doc-%{version}/ install -d %{buildroot}%{_docdir}/sane-backends-doc-%{version}/
pushd %{buildroot}/usr/doc/sane-%{version} pushd %{buildroot}/usr/doc/sane-%{version}
#pushd %{buildroot}/usr/doc/sane-1.0.18-cvs #pushd %{buildroot}/usr/doc/sane-1.0.18-cvs
mv `find -mindepth 1 -type d` *.html *.txt %{buildroot}%{_docdir}/sane-backends-doc-%{version}/ mv `find -mindepth 1 -type d` *.html *.ps *.txt %{buildroot}%{_docdir}/sane-backends-doc-%{version}/
mv README README.linux %{buildroot}%{_docdir}/sane-backends-%{version}/ mv README README.linux %{buildroot}%{_docdir}/sane-backends-%{version}/
rm -f README.* rm -f README.*
mv * %{buildroot}%{_docdir}/sane-backends-%{version}/ mv * %{buildroot}%{_docdir}/sane-backends-%{version}/
popd popd
# Primax parallel port scanners # Primax parallel port scanners
%if %{with primax} %if %{primax_support}
cd primaxscan* cd primaxscan*
%makeinstall %makeinstall_std
rm -f %{buildroot}%{_libdir}/libsane-primax.a rm -f %{buildroot}%{_libdir}/libsane-primax.a %{buildroot}%{_prefix}/lib/sane/libsane-primax.a
mv %{buildroot}%{_libdir}/libsane-primax* %{buildroot}%{_libdir}/sane/
cp primax_scan %{buildroot}%{_bindir} cp primax_scan %{buildroot}%{_bindir}
cd .. cd ..
%endif %endif
# Epson Avasys driver for Epson scanners # Epson Avasys driver for Epson scanners
%if %{with epkowa} %if %{epkowa_support}
cd iscan-%{iscanversion} cd iscan-%{iscanversion}
%makeinstall %makeinstall_std
rm -f %{buildroot}%{_libdir}/sane/libsane-epkowa.a rm -f %{buildroot}%{_libdir}/sane/libsane-epkowa.a
rm -f %{buildroot}%{_mandir}/man1/iscan.1* rm -f %{buildroot}%{_mandir}/man1/iscan.1*
rm -rf %{buildroot}%{_libdir}/iscan rm -rf %{buildroot}%{_libdir}/iscan
@ -348,23 +391,28 @@ mkdir %{buildroot}/etc/xinetd.d
cat %{SOURCE5} > %{buildroot}/etc/xinetd.d/saned cat %{SOURCE5} > %{buildroot}/etc/xinetd.d/saned
# udev rules for libusb user support # udev rules for libusb user support
mkdir -p %{buildroot}/%{_sysconfdir}/udev/rules.d mkdir -p %{buildroot}/lib/udev/rules.d
install -m644 tools/udev/libsane.rules %{buildroot}/%{_sysconfdir}/udev/rules.d/60-libsane.rules install -m644 tools/udev/libsane.rules %{buildroot}/lib/udev/rules.d/60-libsane.rules
# Shorten too long comments # Shorten too long comments
perl -p -i -e 's/(\#.{500}).*$/$1 .../' %{buildroot}/%{_sysconfdir}/udev/rules.d/60-libsane.rules perl -p -i -e 's/(\#.{500}).*$/$1 .../' %{buildroot}/lib/udev/rules.d/60-libsane.rules
%find_lang sane-backends %find_lang sane-backends
%if %{epkowa_support}
%find_lang iscan
%endif
sed -i '/^%dir/d' sane-backends.lang sed -i '/^%dir/d' sane-backends.lang
%if %{epkowa_support}
sed -i '/^%dir/d' iscan.lang
%endif
%post -n saned %post -n saned
%_post_service saned %_post_service saned
%pre -n saned %pre -n saned
# Add saned to group cdwriter and ub for scanner access. # Add saned to group scanner, cdwriter and usb for scanner access.
#/usr/sbin/useradd -r -M -s /bin/false -c "system user for saned" saned -G cdwriter,usb || : /usr/sbin/useradd -r -M -s /bin/false -c "system user for saned" saned -G cdwriter,usb,scanner || :
%_pre_useradd saned /etc/sane.d /bin/false #%_pre_useradd saned /etc/sane.d /bin/false
/usr/sbin/usermod -G cdwriter,usb saned
%preun -n saned %preun -n saned
%_preun_service saned %_preun_service saned
@ -372,6 +420,12 @@ sed -i '/^%dir/d' sane-backends.lang
%postun -n saned %postun -n saned
%_postun_userdel saned %_postun_userdel saned
%pre backends
%_pre_groupadd scanner
%postun backends
%_postun_groupdel scanner
%files backends -f sane-backends.lang %files backends -f sane-backends.lang
%doc %{_docdir}/sane-backends-%{version} %doc %{_docdir}/sane-backends-%{version}
%{_bindir}/sane-find-scanner %{_bindir}/sane-find-scanner