aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Kemper <sebastian_ml@gmx.net>2021-07-17 13:55:46 +0200
committerSebastian Kemper <sebastian_ml@gmx.net>2021-07-17 14:01:04 +0200
commit977109e28613820ff451908289ff6e4cc671ec32 (patch)
treef1a0ea8b6e2d4ae98bd93acf9c6d2ceefde1ffa8
parentad61196780e0467df96eefe5955b1bb8af1d4a5d (diff)
sane-backends: fix usbid file generation
On some build systems (build bots, Debian Buster for example) the current mechanism in the Build/Install define doesn't run. Replace it with shell fu that works. Issue was reported, see [1]. [1] https://github.com/openwrt/packages/issues/16085 Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
-rw-r--r--utils/sane-backends/Makefile14
1 files changed, 7 insertions, 7 deletions
diff --git a/utils/sane-backends/Makefile b/utils/sane-backends/Makefile
index 214e2269d..7bac49fc7 100644
--- a/utils/sane-backends/Makefile
+++ b/utils/sane-backends/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=sane-backends
PKG_VERSION:=1.0.32
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://gitlab.com/sane-project/backends/uploads/104f09c07d35519cc8e72e604f11643f
@@ -194,12 +194,12 @@ endef
define Build/Install
$(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 ;
- )
+ cd $(PKG_BUILD_DIR)/doc/descriptions && for file in *.desc; do \
+ sed -rn -e '/^:usbid[[:blank:]]+"?0x(....)"?[[:blank:]]+"?0x(....)"?.*/{s//\1 \2/;p}' $$$$file | \
+ sort -u > $(PKG_INSTALL_DIR)/usr/share/sane/$$$${file/\.desc/}.usbid; \
+ awk -v path=$(PKG_INSTALL_DIR)/usr/share/sane -v file=$$$${file/\.desc/}.usbid '{ print $$$$2 > path"/"$$$$1"-"file }' \
+ $(PKG_INSTALL_DIR)/usr/share/sane/$$$${file/\.desc/}.usbid ; \
+ done
endef
define Package/libsane/install