[OpenWrt-Devel] [PATCH] packages/nut: Install dev headers

David Woodhouse dwmw2 at infradead.org
Thu Sep 17 06:45:25 EDT 2015


The collectd plugin for nut needs these.

Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
For CC and trunk please.

 net/nut/Makefile | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/net/nut/Makefile b/net/nut/Makefile
index 32a3e13..855b0d1 100644
--- a/net/nut/Makefile
+++ b/net/nut/Makefile
@@ -269,6 +269,7 @@ $(eval $(call DriverDescription,usb,nutdrv_qx,\
 	Driver for Q* protocol serial and USB based UPS equipment))
 
 CONFIGURE_ARGS += \
+	--with-dev \
 	--$(if $(CONFIG_NUT_DRIVER_SERIAL),with,without)-serial \
 	--$(if $(CONFIG_NUT_DRIVER_USB),with,without)-usb \
 	--$(if $(CONFIG_NUT_DRIVER_SNMP),with,without)-snmp \
@@ -286,6 +287,19 @@ CONFIGURE_ARGS += \
 	--with-statepath=/var/run \
 	--datadir=/usr/share/nut
 
+define Build/InstallDev
+	$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
+	$(CP) \
+		$(PKG_INSTALL_DIR)/usr/lib/lib*.so* \
+		$(1)/usr/lib/
+	$(CP) \
+		$(PKG_INSTALL_DIR)/usr/include/*.h \
+		$(1)/usr/include/
+	$(CP) \
+		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
+		$(1)/usr/lib/pkgconfig/
+endef
+
 $(eval $(call BuildPackage,nut))
 $(foreach d,$(filter-out $(SERIAL_DRIVERLIST_IGNORE),$(SERIAL_DRIVERLIST)),$(eval $(call BuildPackage,nut-driver-$(d))))
 $(foreach d,$(SNMP_DRIVERLIST),$(eval $(call BuildPackage,nut-driver-$(d))))
-- 
2.4.3

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse at intel.com                              Intel Corporation

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5691 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150917/f6c96065/attachment.bin>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list