From aa03634cbcd837d25bc33c64aa9054cdd096e46d Mon Sep 17 00:00:00 2001 From: Philip Prindeville Date: Tue, 5 Sep 2023 21:38:27 -0600 Subject: [PATCH] modemmanager: handle no *.conf files being installed To begin with, there are only a couple of .conf files, and one of them is for testing, and the other is only installed when MBIM is enabled, so if you build without MBIM you'll have a failing install: install -m0644 /home/pprindeville/work/openwrt/build_dir/target-x86_64_musl/modemmanager-1.20.6/ipkg-install/usr/share/ModemManager/*.conf /home/pprindeville/work/openwrt/build_dir/target-x86_64_musl/modemmanager-1.20.6/.pkgdir/modemmanager/usr/share/ModemManager install: cannot stat '/home/pprindeville/work/openwrt/build_dir/target-x86_64_musl/modemmanager-1.20.6/ipkg-install/usr/share/ModemManager/*.conf': No such file or directory make[2]: *** [Makefile:161: /home/pprindeville/work/openwrt/build_dir/target-x86_64_musl/modemmanager-1.20.6/.pkgdir/modemmanager.installed] Error 1 make[2]: Leaving directory '/home/pprindeville/work/openwrt/feeds/packages/net/modemmanager' So make sure there's anything there to copy over first. Signed-off-by: Philip Prindeville --- net/modemmanager/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/modemmanager/Makefile b/net/modemmanager/Makefile index 5017d3e25..0069eaae9 100644 --- a/net/modemmanager/Makefile +++ b/net/modemmanager/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=modemmanager PKG_SOURCE_VERSION:=1.20.6 -PKG_RELEASE:=12 +PKG_RELEASE:=13 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git @@ -112,7 +112,7 @@ define Package/modemmanager/install $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/dbus-1/system-services/org.freedesktop.ModemManager1.service $(1)/usr/share/dbus-1/system-services $(INSTALL_DIR) $(1)/usr/share/ModemManager - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/ModemManager/*.conf $(1)/usr/share/ModemManager + $$(if $$(wildcard $(PKG_INSTALL_DIR)/usr/share/ModemManager/*.conf),$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/ModemManager/*.conf $(1)/usr/share/ModemManager,) $(INSTALL_DATA) ./files/modemmanager.common $(1)/usr/share/ModemManager $(INSTALL_DIR) $(1)/usr/share/ModemManager/fcc-unlock.available.d