|
@@ -0,0 +1,356 @@
|
|
1
|
+#
|
|
2
|
+# Copyright (C) 2006-2015 OpenWrt.org
|
|
3
|
+#
|
|
4
|
+# This is free software, licensed under the GNU General Public License v2.
|
|
5
|
+# See /LICENSE for more information.
|
|
6
|
+#
|
|
7
|
+
|
|
8
|
+include $(TOPDIR)/rules.mk
|
|
9
|
+
|
|
10
|
+PKG_NAME:=sane-backends
|
|
11
|
+PKG_VERSION:=1.0.25
|
|
12
|
+PKG_RELEASE:=1
|
|
13
|
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
14
|
+PKG_SOURCE_URL:=http://fossies.org/linux/misc \
|
|
15
|
+ https://alioth.debian.org/frs/download.php/file/4146/
|
|
16
|
+PKG_MD5SUM:=f9ed5405b3c12f07c6ca51ee60225fe7
|
|
17
|
+PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
|
18
|
+PKG_LICENSE:=GPL-2.0 GPL-2.0+
|
|
19
|
+PKG_LICENSE_FILES:=COPYING LICENSE
|
|
20
|
+
|
|
21
|
+PKG_FIXUP:=autoreconf
|
|
22
|
+PKG_REMOVE_FILES:=aclocal.m4
|
|
23
|
+
|
|
24
|
+PKG_INSTALL:=1
|
|
25
|
+
|
|
26
|
+include $(INCLUDE_DIR)/package.mk
|
|
27
|
+
|
|
28
|
+SANE_BACKENDS:=
|
|
29
|
+
|
|
30
|
+define Package/sane-backends/Default
|
|
31
|
+ TITLE:=Scanner Access Now Easy
|
|
32
|
+ URL:=http://www.sane-project.org/
|
|
33
|
+endef
|
|
34
|
+
|
|
35
|
+define Package/sane-backends/Default/description
|
|
36
|
+ SANE (Scanner Access Now Easy) is a universal scanner interface.
|
|
37
|
+endef
|
|
38
|
+
|
|
39
|
+define Package/sane-backends
|
|
40
|
+$(call Package/sane-backends/Default)
|
|
41
|
+ SECTION:=utils
|
|
42
|
+ CATEGORY:=Utilities
|
|
43
|
+ TITLE+= (drivers)
|
|
44
|
+endef
|
|
45
|
+
|
|
46
|
+define Package/sane-backends/description
|
|
47
|
+$(call Package/sane-backends/Default/description)
|
|
48
|
+.
|
|
49
|
+This
|
|
50
|
+endef
|
|
51
|
+
|
|
52
|
+define Package/sane-backends/config
|
|
53
|
+ menu "Select SANE backends"
|
|
54
|
+ depends on PACKAGE_sane-backends
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+ config PACKAGE_sane-backends-all
|
|
58
|
+ depends on PACKAGE_sane-backends
|
|
59
|
+ prompt "Include all SANE backends (sane-backends-all)"
|
|
60
|
+
|
|
61
|
+ comment "Modules"
|
|
62
|
+
|
|
63
|
+$(foreach backend,$(SANE_BACKENDS), \
|
|
64
|
+ $(eval \
|
|
65
|
+ $(call Package/Default)
|
|
66
|
+ $(call Package/sane-$(backend))
|
|
67
|
+ )\
|
|
68
|
+ config PACKAGE_sane-$(backend)
|
|
69
|
+ prompt "$(TITLE)"
|
|
70
|
+ $(foreach config_dep,\
|
|
71
|
+ $(filter @%,
|
|
72
|
+ $(foreach v, $(DEPENDS), $(if $(findstring :,$v),,$v))
|
|
73
|
+ ),\
|
|
74
|
+ depends on $(strip $(subst @,,$(config_dep)))
|
|
75
|
+ )
|
|
76
|
+)
|
|
77
|
+ endmenu
|
|
78
|
+
|
|
79
|
+endef
|
|
80
|
+
|
|
81
|
+# returns conditional dependency on sane backend
|
|
82
|
+# 1: backend name
|
|
83
|
+#
|
|
84
|
+# If there is no config deps on $(1), returns +sane-$(1).
|
|
85
|
+# Otherwise, +(CONFIG1&&CONFIG2&&..):sane-$(1)
|
|
86
|
+define SaneBackendDependency
|
|
87
|
+ $(eval \
|
|
88
|
+ $(call Package/Default)
|
|
89
|
+ $(call Package/sane-$(1))
|
|
90
|
+ FILTER_CONFIG:=$$(strip \
|
|
91
|
+ $$(foreach config_dep, \
|
|
92
|
+ $$(filter @%, \
|
|
93
|
+ $$(foreach v, \
|
|
94
|
+ $$(DEPENDS), \
|
|
95
|
+ $$(if $$(findstring :,$$v),,$$v) \
|
|
96
|
+ ) \
|
|
97
|
+ ), \
|
|
98
|
+ $$(subst @,,$$(config_dep)) \
|
|
99
|
+ ) \
|
|
100
|
+ )
|
|
101
|
+ ifneq (,$$(FILTER_CONFIG))
|
|
102
|
+ FILTER_CONFIG:=($$(subst $$(space),&&,$$(FILTER_CONFIG))):
|
|
103
|
+ endif
|
|
104
|
+ ) \
|
|
105
|
+ +$(FILTER_CONFIG)sane-$(1)
|
|
106
|
+endef
|
|
107
|
+
|
|
108
|
+define Package/sane-backends-all
|
|
109
|
+$(call Package/sane-backends/Default)
|
|
110
|
+ SECTION:=utils
|
|
111
|
+ CATEGORY:=Utilities
|
|
112
|
+ TITLE+= (all backends)
|
|
113
|
+ DEPENDS:=$(foreach backend,$(SANE_BACKENDS),$(strip $(call SaneBackendDependency,$(backend))))
|
|
114
|
+ HIDDEN:=1
|
|
115
|
+endef
|
|
116
|
+
|
|
117
|
+define Package/sane-backends/description
|
|
118
|
+$(call Package/sane-backends/Default/description)
|
|
119
|
+.
|
|
120
|
+Metapackage for selecting all SANE Backends
|
|
121
|
+endef
|
|
122
|
+
|
|
123
|
+define Package/sane-daemon
|
|
124
|
+$(call Package/sane-backends/Default)
|
|
125
|
+ SECTION:=utils
|
|
126
|
+ CATEGORY:=Utilities
|
|
127
|
+ DEPENDS:=+libsane
|
|
128
|
+ TITLE+= (network daemon)
|
|
129
|
+endef
|
|
130
|
+
|
|
131
|
+define Package/sane-daemon/description
|
|
132
|
+$(call Package/sane-backends/Default/description)
|
|
133
|
+This package contains the SANE daemon.
|
|
134
|
+endef
|
|
135
|
+
|
|
136
|
+define Package/libsane
|
|
137
|
+ $(call Package/sane-backends/Default)
|
|
138
|
+ SECTION:=libs
|
|
139
|
+ CATEGORY:=Libraries
|
|
140
|
+ DEPENDS:=+libusb-compat
|
|
141
|
+ TITLE+= (libraries)
|
|
142
|
+endef
|
|
143
|
+
|
|
144
|
+define Package/libsane/description
|
|
145
|
+$(call Package/sane-backends/Default/description)
|
|
146
|
+This package contains the SANE shared libraries.
|
|
147
|
+endef
|
|
148
|
+
|
|
149
|
+define Package/sane-frontends
|
|
150
|
+ $(call Package/sane-backends/Default)
|
|
151
|
+ SECTION:=utils
|
|
152
|
+ CATEGORY:=Utilities
|
|
153
|
+ DEPENDS:=+libsane +libjpeg +libpng
|
|
154
|
+ TITLE+= (frontends)
|
|
155
|
+endef
|
|
156
|
+
|
|
157
|
+define Package/sane-frontends/description
|
|
158
|
+$(call Package/sane-backends/Default/description)
|
|
159
|
+This package contains the SANE frontends.
|
|
160
|
+endef
|
|
161
|
+
|
|
162
|
+TARGET_LDFLAGS += \
|
|
163
|
+ -Wl,-rpath-link $(STAGING_DIR)/usr/lib \
|
|
164
|
+ -Wl,-rpath-link $(PKG_BUILD_DIR)/backend/.libs
|
|
165
|
+
|
|
166
|
+CONFIGURE_ARGS+= \
|
|
167
|
+ --enable-shared \
|
|
168
|
+ --enable-static \
|
|
169
|
+ --disable-translations \
|
|
170
|
+ --disable-latex \
|
|
171
|
+ --without-gphoto2 \
|
|
172
|
+ --without-snmp
|
|
173
|
+
|
|
174
|
+CONFIGURE_VARS+= \
|
|
175
|
+ ac_cv_func_mmap_fixed_mapped="yes" \
|
|
176
|
+
|
|
177
|
+define Build/Configure
|
|
178
|
+ mkdir -p $(PKG_BUILD_DIR)/backend/.libs
|
|
179
|
+ $(Build/Configure/Default)
|
|
180
|
+endef
|
|
181
|
+
|
|
182
|
+define Package/libsane/install
|
|
183
|
+ $(INSTALL_DIR) $(1)/usr/lib/sane/
|
|
184
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsane.so.* $(1)/usr/lib/
|
|
185
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/sane/libsane-dll.so.* $(1)/usr/lib/sane/
|
|
186
|
+ $(INSTALL_DIR) $(1)/etc/sane.d/dll.d
|
|
187
|
+ $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/sane.d/dll.conf $(1)/etc/sane.d/
|
|
188
|
+endef
|
|
189
|
+
|
|
190
|
+define Package/libsane/conffiles
|
|
191
|
+/etc/sane.d/dll.conf
|
|
192
|
+endef
|
|
193
|
+
|
|
194
|
+define Package/sane-daemon/install
|
|
195
|
+ $(INSTALL_DIR) $(1)/etc/sane.d
|
|
196
|
+ $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/sane.d/saned.conf $(1)/etc/sane.d/
|
|
197
|
+ $(INSTALL_DIR) $(1)/usr/sbin
|
|
198
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
|
|
199
|
+ $(INSTALL_DIR) $(1)/etc/xinetd.d
|
|
200
|
+ $(CP) ./files/xinet.d_sane-port $(1)/etc/xinetd.d/sane-port
|
|
201
|
+endef
|
|
202
|
+
|
|
203
|
+define Package/sane-daemon/conffiles
|
|
204
|
+/etc/sane.d/saned.conf
|
|
205
|
+endef
|
|
206
|
+
|
|
207
|
+define Package/sane-frontends/install
|
|
208
|
+ $(INSTALL_DIR) $(1)/usr/bin
|
|
209
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
|
|
210
|
+endef
|
|
211
|
+
|
|
212
|
+define Package/sane-backends-all/install
|
|
213
|
+ /bin/true
|
|
214
|
+endef
|
|
215
|
+
|
|
216
|
+define Build/InstallDev
|
|
217
|
+ $(INSTALL_DIR) $(1)/usr/include
|
|
218
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/sane $(1)/usr/include/
|
|
219
|
+ $(INSTALL_DIR) $(1)/usr/lib
|
|
220
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsane.{a,so*} $(1)/usr/lib/
|
|
221
|
+endef
|
|
222
|
+
|
|
223
|
+# 1: short name
|
|
224
|
+# 2: description
|
|
225
|
+# 3: dependencies on other packages
|
|
226
|
+define SaneBackend
|
|
227
|
+ SANE_BACKENDS+= $(1)
|
|
228
|
+
|
|
229
|
+ define Package/sane-$(1)
|
|
230
|
+ $(call Package/sane-backends/Default)
|
|
231
|
+ TITLE:=SANE backend (sane-$(1)) for $(2)
|
|
232
|
+ DEPENDS+= +libsane $(3)
|
|
233
|
+ HIDDEN:=1
|
|
234
|
+ endef
|
|
235
|
+
|
|
236
|
+ define Package/sane-$(1)/description
|
|
237
|
+ $(call Package/sane-backends/Default/description)
|
|
238
|
+.
|
|
239
|
+This package contains the SANE backend for $(2).
|
|
240
|
+ endef
|
|
241
|
+
|
|
242
|
+ define Package/sane-$(1)/install
|
|
243
|
+ if [ -f "$(PKG_INSTALL_DIR)/etc/sane.d/$(1).conf" ]; then \
|
|
244
|
+ $(INSTALL_DIR) $$(1)/etc/sane.d ; \
|
|
245
|
+ $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/sane.d/$(1).conf $$(1)/etc/sane.d/; \
|
|
246
|
+ fi
|
|
247
|
+ $(INSTALL_DIR) $$(1)/usr/lib/sane
|
|
248
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/sane/libsane-$(1).so.* $$(1)/usr/lib/sane/
|
|
249
|
+ if [ -d "$(PKG_INSTALL_DIR)/usr/share/sane/$(1)" ]; then \
|
|
250
|
+ $(INSTALL_DIR) $$(1)/usr/share/sane/ ; \
|
|
251
|
+ $(CP) -a $(PKG_INSTALL_DIR)/usr/share/sane/$(1) $$(1)/usr/share/sane/ ; \
|
|
252
|
+ fi
|
|
253
|
+ endef
|
|
254
|
+
|
|
255
|
+ define Package/sane-$(1)/conffiles
|
|
256
|
+ /etc/sane.d/$(1).conf
|
|
257
|
+ endef
|
|
258
|
+
|
|
259
|
+ $$(eval $$(call BuildPackage,sane-$(1)))
|
|
260
|
+endef
|
|
261
|
+
|
|
262
|
+$(eval $(call BuildPackage,libsane))
|
|
263
|
+$(eval $(call BuildPackage,sane-daemon))
|
|
264
|
+$(eval $(call SaneBackend,abaton,Abaton flatbed scanners))
|
|
265
|
+$(eval $(call SaneBackend,agfafocus,AGFA Focus flatbed scanners))
|
|
266
|
+$(eval $(call SaneBackend,apple,Apple flatbed scanners))
|
|
267
|
+$(eval $(call SaneBackend,artec,Artec flatbed scanners))
|
|
268
|
+$(eval $(call SaneBackend,artec_eplus48u,Artec E+ 48U and re-badged models))
|
|
269
|
+$(eval $(call SaneBackend,as6e,Artec AS6E parallel port interface scanner))
|
|
270
|
+$(eval $(call SaneBackend,avision,Avision and Avision OEM scanners and possibly more flatbed and film scanners))
|
|
271
|
+$(eval $(call SaneBackend,bh,Bell+Howell Copiscan II series document scanners))
|
|
272
|
+$(eval $(call SaneBackend,canon,Canon SCSI scanners))
|
|
273
|
+$(eval $(call SaneBackend,canon630u,the Canon 630u USB flatbed scanner))
|
|
274
|
+$(eval $(call SaneBackend,canon_dr,Canon DR-series scanners))
|
|
275
|
+# Depends on libieee1284
|
|
276
|
+#$(eval $(call SaneBackend,canon_pp,Canon CanoScan Parallel Port flatbed scanners,+libieee1284))
|
|
277
|
+$(eval $(call SaneBackend,cardscan,Corex CardScan usb scanners))
|
|
278
|
+$(eval $(call SaneBackend,coolscan,Nikon film-scanners))
|
|
279
|
+$(eval $(call SaneBackend,coolscan2,Nikon Coolscan film scanners))
|
|
280
|
+$(eval $(call SaneBackend,coolscan3,Nikon Coolscan film scanners))
|
|
281
|
+$(eval $(call SaneBackend,dc210,Kodak DC210 Digital Camera,+libjpeg))
|
|
282
|
+$(eval $(call SaneBackend,dc240,Kodak DC240 Digital Camera,+libjpeg))
|
|
283
|
+$(eval $(call SaneBackend,dc25,Kodak DC20/DC25 Digital Cameras))
|
|
284
|
+$(eval $(call SaneBackend,dell1600n_net,Dell 1600n,+libtiff))
|
|
285
|
+$(eval $(call SaneBackend,dmc,Polaroid Digital Microscope Camera))
|
|
286
|
+$(eval $(call SaneBackend,epjitsu,Epson-based Fujitsu USB scanners))
|
|
287
|
+$(eval $(call SaneBackend,epson,EPSON scanners))
|
|
288
|
+$(eval $(call SaneBackend,epsonds,EPSON scanners,+libjpeg)) ####
|
|
289
|
+$(eval $(call SaneBackend,epson2,EPSON scanners))
|
|
290
|
+$(eval $(call SaneBackend,fujitsu,Fujitsu flatbed and ADF scanners))
|
|
291
|
+$(eval $(call SaneBackend,genesys,GL646 GL841 GL843 GL847 and GL124 based USB flatbed scanners))
|
|
292
|
+#$(eval $(call SaneBackend,gphoto2,digital cameras supported by gphoto2,+libjpeg))
|
|
293
|
+$(eval $(call SaneBackend,gt68xx,GT-68XX based USB flatbed scanners))
|
|
294
|
+$(eval $(call SaneBackend,hp,HP ScanJet scanners))
|
|
295
|
+$(eval $(call SaneBackend,hp3500,Hewlett-Packard ScanJet 3500 series scanners))
|
|
296
|
+$(eval $(call SaneBackend,hp3900,RTS8822 chipset based scanners,+libtiff))
|
|
297
|
+$(eval $(call SaneBackend,hp4200,Hewlett-Packard 4200 scanners))
|
|
298
|
+$(eval $(call SaneBackend,hp5400,Hewlett-Packard 54XX scanners))
|
|
299
|
+$(eval $(call SaneBackend,hp5590,Hewlett-Packard 4500C/4570C/5500C/5550C/5590/7650 Workgroup/Document scanners))
|
|
300
|
+$(eval $(call SaneBackend,hpljm1005,Hewlett-Packard LaserJet M1005 MFP Scanner))
|
|
301
|
+# Depends on libieee1284
|
|
302
|
+#$(eval $(call SaneBackend,hpsj5s,HP ScanJet 5S sheet-fed scanner,+libieee1284))
|
|
303
|
+$(eval $(call SaneBackend,hs2p,Ricoh SCSI flatbed/ADF scanners))
|
|
304
|
+$(eval $(call SaneBackend,ibm,IBM and Ricoh SCSI flatbed scanners))
|
|
305
|
+$(eval $(call SaneBackend,kodak,big Kodak flatbed and ADF scanners))
|
|
306
|
+$(eval $(call SaneBackend,kodakaio,Kodak aio printer / scanners))
|
|
307
|
+$(eval $(call SaneBackend,kvs20xx,Panasonic KV-S20xxC USB/SCSI ADF scanners))
|
|
308
|
+$(eval $(call SaneBackend,kvs40xx,Panasonic KV-S40xxC USB/SCSI ADF scanners))
|
|
309
|
+$(eval $(call SaneBackend,kvs1025,Panasonic KV-S102xC USB ADF scanners))
|
|
310
|
+$(eval $(call SaneBackend,leo,LEO Technologies scanners))
|
|
311
|
+$(eval $(call SaneBackend,lexmark,Lexmark X1100/X1200 Series scanners))
|
|
312
|
+$(eval $(call SaneBackend,ma1509,Mustek BearPaw 1200F USB scanner))
|
|
313
|
+$(eval $(call SaneBackend,magicolor,KONICA MINOLTA magicolor scanners))
|
|
314
|
+$(eval $(call SaneBackend,matsushita,Panasonic KV-SS high speed scanners))
|
|
315
|
+$(eval $(call SaneBackend,microtek,Microtek scanners))
|
|
316
|
+$(eval $(call SaneBackend,microtek2,Microtek scanners with SCSI-2 command set))
|
|
317
|
+$(eval $(call SaneBackend,mustek,Mustek SCSI flatbed scanners and some other devices))
|
|
318
|
+# Depends on libieee1284
|
|
319
|
+#$(eval $(call SaneBackend,mustek_pp,Mustek parallel port flatbed scanners,+libieee1284))
|
|
320
|
+$(eval $(call SaneBackend,mustek_usb,Mustek USB flatbed scanners))
|
|
321
|
+$(eval $(call SaneBackend,mustek_usb2,SQ113 based USB flatbed scanners))
|
|
322
|
+$(eval $(call SaneBackend,nec,NEC scanners))
|
|
323
|
+$(eval $(call SaneBackend,net,network backend))
|
|
324
|
+$(eval $(call SaneBackend,niash,scanners based on the NIASH chipset))
|
|
325
|
+$(eval $(call SaneBackend,p5,the Primax PagePartner))
|
|
326
|
+$(eval $(call SaneBackend,pie,PIE Devcom and AdLib SCSI flatbed scanners))
|
|
327
|
+$(eval $(call SaneBackend,pieusb,PIE Devcom and AdLib SCSI flatbed scanners)) #####
|
|
328
|
+$(eval $(call SaneBackend,pixma,Canon Multi-Function Printers and CanoScan Scanners))
|
|
329
|
+$(eval $(call SaneBackend,plustek,LM983[1/2/3] based USB flatbed scanners))
|
|
330
|
+$(eval $(call SaneBackend,plustek_pp,Plustek parallel port flatbed scanners))
|
|
331
|
+$(eval $(call SaneBackend,qcam,Connectix QuickCam cameras,@(TARGET_x86||TARGET_x86_64)))
|
|
332
|
+$(eval $(call SaneBackend,ricoh,Ricoh flatbed scanners))
|
|
333
|
+$(eval $(call SaneBackend,rts8891,rts8891 based scanners))
|
|
334
|
+$(eval $(call SaneBackend,s9036,Siemens 9036 flatbed scanners))
|
|
335
|
+$(eval $(call SaneBackend,sceptre,SCEPTRE scanners))
|
|
336
|
+$(eval $(call SaneBackend,sharp,SHARP scanners))
|
|
337
|
+$(eval $(call SaneBackend,sm3600,Microtek scanners with M011 USB chip))
|
|
338
|
+$(eval $(call SaneBackend,sm3840,Microtek scanners with SCAN08 USB chip))
|
|
339
|
+$(eval $(call SaneBackend,snapscan,AGFA SnapScan flatbed scanners))
|
|
340
|
+$(eval $(call SaneBackend,sp15c,Fujitsu ScanPartner 15C flatbed scanner))
|
|
341
|
+$(eval $(call SaneBackend,st400,Siemens ST/Highscan flatbed scanners))
|
|
342
|
+$(eval $(call SaneBackend,stv680,STV680 cameras))
|
|
343
|
+$(eval $(call SaneBackend,tamarack,Tamarack flatbed scanners))
|
|
344
|
+$(eval $(call SaneBackend,teco1,TECO / RELISYS scanners))
|
|
345
|
+$(eval $(call SaneBackend,teco2,TECO / RELISYS scanners))
|
|
346
|
+$(eval $(call SaneBackend,teco3,TECO / RELISYS scanners))
|
|
347
|
+$(eval $(call SaneBackend,test,testing frontends))
|
|
348
|
+$(eval $(call SaneBackend,u12,Plustek USB flatbed scanners based on older parport designs))
|
|
349
|
+$(eval $(call SaneBackend,umax,UMAX scanners))
|
|
350
|
+$(eval $(call SaneBackend,umax1220u,the UMAX Astra 1220U and similar scanners))
|
|
351
|
+$(eval $(call SaneBackend,umax_pp,Umax Astra parallel port flatbed scanners))
|
|
352
|
+$(eval $(call SaneBackend,v4l,Video for Linux API,+libv4l +libjpeg))
|
|
353
|
+$(eval $(call SaneBackend,xerox_mfp,Xerox Phaser 3200MFP device))
|
|
354
|
+$(eval $(call BuildPackage,sane-backends))
|
|
355
|
+$(eval $(call BuildPackage,sane-backends-all))
|
|
356
|
+$(eval $(call BuildPackage,sane-frontends))
|