Ticket #20515: packages-nut-install-dev.patch

File packages-nut-install-dev.patch, 1.1 KB (added by dwmw2, 2 years ago)

Install nut headers for building collectd plugin

  • net/nut/Makefile

    diff --git a/net/nut/Makefile b/net/nut/Makefile
    index 32a3e13..855b0d1 100644
    a b $(eval $(call DriverDescription,usb,nutdrv_qx,\ 
    269269        Driver for Q* protocol serial and USB based UPS equipment)) 
    270270 
    271271CONFIGURE_ARGS += \ 
     272        --with-dev \ 
    272273        --$(if $(CONFIG_NUT_DRIVER_SERIAL),with,without)-serial \ 
    273274        --$(if $(CONFIG_NUT_DRIVER_USB),with,without)-usb \ 
    274275        --$(if $(CONFIG_NUT_DRIVER_SNMP),with,without)-snmp \ 
    CONFIGURE_ARGS += \ 
    286287        --with-statepath=/var/run \ 
    287288        --datadir=/usr/share/nut 
    288289 
     290define Build/InstallDev 
     291        $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig 
     292        $(CP) \ 
     293                $(PKG_INSTALL_DIR)/usr/lib/lib*.so* \ 
     294                $(1)/usr/lib/ 
     295        $(CP) \ 
     296                $(PKG_INSTALL_DIR)/usr/include/*.h \ 
     297                $(1)/usr/include/ 
     298        $(CP) \ 
     299                $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \ 
     300                $(1)/usr/lib/pkgconfig/ 
     301endef 
     302 
    289303$(eval $(call BuildPackage,nut)) 
    290304$(foreach d,$(filter-out $(SERIAL_DRIVERLIST_IGNORE),$(SERIAL_DRIVERLIST)),$(eval $(call BuildPackage,nut-driver-$(d)))) 
    291305$(foreach d,$(SNMP_DRIVERLIST),$(eval $(call BuildPackage,nut-driver-$(d))))