@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME := sane-backends
PKG_NAME := sane-backends
PKG_VERSION := 1.0.28
PKG_VERSION := 1.0.28
PKG_RELEASE := 1
PKG_RELEASE := 2
PKG_SOURCE := $( PKG_NAME) -$( PKG_VERSION) .tar.gz
PKG_SOURCE := $( PKG_NAME) -$( PKG_VERSION) .tar.gz
PKG_SOURCE_URL := https://gitlab.com/sane-project/backends/uploads/9e718daff347826f4cfe21126c8d5091/
PKG_SOURCE_URL := https://gitlab.com/sane-project/backends/uploads/9e718daff347826f4cfe21126c8d5091/
PKG_HASH := 31260f3f72d82ac1661c62c5a4468410b89fb2b4a811dabbfcc0350c1346de03
PKG_HASH := 31260f3f72d82ac1661c62c5a4468410b89fb2b4a811dabbfcc0350c1346de03
@ -125,6 +125,7 @@ $(call Package/sane-backends/Default)
CATEGORY:= Utilities
CATEGORY:= Utilities
DEPENDS:= +libsane
DEPENDS:= +libsane
TITLE += ( network daemon)
TITLE += ( network daemon)
USERID:= saned:scanner
e n d e f
e n d e f
d e f i n e P a c k a g e / s a n e - d a e m o n / d e s c r i p t i o n
d e f i n e P a c k a g e / s a n e - d a e m o n / d e s c r i p t i o n
@ -132,6 +133,12 @@ $(call Package/sane-backends/Default/description)
T h i s p a c k a g e c o n t a i n s t h e S A N E d a e m o n .
T h i s p a c k a g e c o n t a i n s t h e S A N E d a e m o n .
e n d e f
e n d e f
# Run hotplug to grant access to existing scanners
d e f i n e P a c k a g e / s a n e - d a e m o n / p o s t i n s t
#!/bin/sh
u d e v t r i g g e r
e n d e f
d e f i n e P a c k a g e / l i b s a n e
d e f i n e P a c k a g e / l i b s a n e
$( call Package/sane-backends/Default)
$( call Package/sane-backends/Default)
SECTION:= libs
SECTION:= libs
@ -174,13 +181,24 @@ define Build/Configure
$( Build/Configure/Default)
$( Build/Configure/Default)
e n d e f
e n d e f
d e f i n e B u i l d / I n s t a l l
$( call Build/Install/Default)
mkdir -p $( PKG_INSTALL_DIR) /usr/share/sane
$( foreach file, $( filter-out %/unsupported.desc ,$( wildcard $( PKG_BUILD_DIR) /doc/descriptions/*.desc) ) ,
sed -rn -e '/^:usbid[[:blank:]]+"?0x(....)"?[[:blank:]]+"?0x(....)"?.*/{s//\1 \2/;p}' $( file) | \
sort -u > $( PKG_INSTALL_DIR) /usr/share/sane/$( basename $( notdir $( file) ) ) .usbid; \
awk '{ print $$$$2 > "$(PKG_INSTALL_DIR)/usr/share/sane/"$$$$1"-$(basename $(notdir $(file))).usbid" }' \
$( PKG_INSTALL_DIR) /usr/share/sane/$( basename $( notdir $( file) ) ) .usbid ;
)
e n d e f
d e f i n e P a c k a g e / l i b s a n e / i n s t a l l
d e f i n e P a c k a g e / l i b s a n e / i n s t a l l
$( INSTALL_DIR) $( 1) /usr/lib/sane/
$( INSTALL_DIR) $( 1) /usr/lib/sane/
$( CP) $( PKG_INSTALL_DIR) /usr/lib/libsane.so.* $( 1) /usr/lib/
$( CP) $( PKG_INSTALL_DIR) /usr/lib/libsane.so.* $( 1) /usr/lib/
$( CP) $( PKG_INSTALL_DIR) /usr/lib/sane/libsane-dll.so.* $( 1) /usr/lib/sane/
$( CP) $( PKG_INSTALL_DIR) /usr/lib/sane/libsane-dll.so.* $( 1) /usr/lib/sane/
$( INSTALL_DIR) $( 1) /etc/sane.d/dll.d
$( INSTALL_DIR) $( 1) /etc/sane.d/dll.d
$( INSTALL_CONF) $( PKG_INSTALL_DIR) /etc/sane.d/dll.conf $( 1) /etc/sane.d/
$( INSTALL_CONF) $( PKG_INSTALL_DIR) /etc/sane.d/dll.conf $( 1) /etc/sane.d/
chmod 0755 $( 1) /etc/sane.d/dll.conf
chmod 0644 $( 1) /etc/sane.d/dll.conf
e n d e f
e n d e f
d e f i n e P a c k a g e / l i b s a n e / c o n f f i l e s
d e f i n e P a c k a g e / l i b s a n e / c o n f f i l e s
@ -190,13 +208,15 @@ endef
d e f i n e P a c k a g e / s a n e - d a e m o n / i n s t a l l
d e f i n e P a c k a g e / s a n e - d a e m o n / i n s t a l l
$( INSTALL_DIR) $( 1) /etc/sane.d
$( INSTALL_DIR) $( 1) /etc/sane.d
$( INSTALL_CONF) $( PKG_INSTALL_DIR) /etc/sane.d/saned.conf $( 1) /etc/sane.d/
$( INSTALL_CONF) $( PKG_INSTALL_DIR) /etc/sane.d/saned.conf $( 1) /etc/sane.d/
chmod 0755 $( 1) /etc/sane.d/saned.conf
chmod 0644 $( 1) /etc/sane.d/saned.conf
$( INSTALL_DIR) $( 1) /usr/sbin
$( INSTALL_DIR) $( 1) /usr/sbin
$( INSTALL_BIN) ./files/saned.sbin $( 1) /usr/sbin/saned
$( INSTALL_BIN) ./files/saned.sbin $( 1) /usr/sbin/saned
$( INSTALL_DIR) $( 1) /usr/lib/sane/
$( INSTALL_DIR) $( 1) /usr/lib/sane/
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/sbin/saned $( 1) /usr/lib/sane/saned
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/sbin/saned $( 1) /usr/lib/sane/saned
$( INSTALL_DIR) $( 1) /etc/xinetd.d
$( INSTALL_DIR) $( 1) /etc/xinetd.d
$( INSTALL_CONF) ./files/saned.xinetd $( 1) /etc/xinetd.d/sane-port
$( INSTALL_CONF) ./files/saned.xinetd $( 1) /etc/xinetd.d/sane-port
$( INSTALL_DIR) $( 1) /etc/hotplug.d/usb/
$( INSTALL_BIN) ./files/saned.hotplug $( 1) /etc/hotplug.d/usb/20-saned
e n d e f
e n d e f
d e f i n e P a c k a g e / s a n e - d a e m o n / c o n f f i l e s
d e f i n e P a c k a g e / s a n e - d a e m o n / c o n f f i l e s
@ -243,15 +263,19 @@ This package contains the SANE backend for $(2).
define Package/sane-$( 1) /install
define Package/sane-$( 1) /install
if [ -f " $( PKG_INSTALL_DIR) /etc/sane.d/ $( 1) .conf " ] ; then \
if [ -f " $( PKG_INSTALL_DIR) /etc/sane.d/ $( 1) .conf " ] ; then \
$( INSTALL_DIR) $$ ( 1) /etc/sane.d ; \
$( INSTALL_CONF) $( PKG_INSTALL_DIR) /etc/sane.d/$( 1) .conf $$ ( 1) /etc/sane.d/; \
chmod 0755 $$ ( 1) /etc/sane.d/$( 1) .conf ; \
fi
$( INSTALL_DIR) $$ ( 1) /usr/lib/sane
$( CP) $( PKG_INSTALL_DIR) /usr/lib/sane/libsane-$( 1) .so.* $$ ( 1) /usr/lib/sane/
$( INSTALL_DIR) $$ ( 1) /etc/sane.d ; \
$( INSTALL_CONF) $( PKG_INSTALL_DIR) /etc/sane.d/$( 1) .conf $$ ( 1) /etc/sane.d/ ; \
chmod 0644 $$ ( 1) /etc/sane.d/$( 1) .conf ; \
fi ; \
$( INSTALL_DIR) $$ ( 1) /usr/lib/sane ; \
$( CP) $( PKG_INSTALL_DIR) /usr/lib/sane/libsane-$( 1) .so.* $$ ( 1) /usr/lib/sane/ ; \
if [ -d " $( PKG_INSTALL_DIR) /usr/share/sane/ $( 1) " ] ; then \
if [ -d " $( PKG_INSTALL_DIR) /usr/share/sane/ $( 1) " ] ; then \
$( INSTALL_DIR) $$ ( 1) /usr/share/sane/ ; \
$( INSTALL_DIR) $$ ( 1) /usr/share/sane/ ; \
$( CP) -a $( PKG_INSTALL_DIR) /usr/share/sane/$( 1) $$ ( 1) /usr/share/sane/ ; \
$( CP) -a $( PKG_INSTALL_DIR) /usr/share/sane/$( 1) $$ ( 1) /usr/share/sane/ ; \
fi ; \
if [ -s " $( PKG_INSTALL_DIR) /usr/share/sane/ $( 1) .usbid " ] ; then \
$( INSTALL_DIR) $$ ( 1) /usr/share/sane/ ; \
$( INSTALL_DATA) $( PKG_INSTALL_DIR) /usr/share/sane/????-$( 1) .usbid $$ ( 1) /usr/share/sane/ ; \
fi
fi
endef
endef