You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
2.4 KiB

  1. #
  2. # Copyright (C) 2009-2017 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. # Comment: This makefile is based on the oldpackage makefile by acinonyx / nbd
  8. # https://dev.openwrt.org/browser/packages/utils/digitemp/Makefile
  9. include $(TOPDIR)/rules.mk
  10. PKG_NAME:=digitemp
  11. PKG_VERSION:=3.7.2
  12. PKG_RELEASE:=1
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  14. PKG_SOURCE_URL:=https://codeload.github.com/bcl/digitemp/tar.gz/v$(PKG_VERSION)?
  15. PKG_HASH:=683df4ab5cc53a45fe4f860c698f148d34bcca91b3e0568a342f32d64d12ba24
  16. PKG_MAINTAINER:=Jasper Scholte <NightNL@outlook.com>
  17. PKG_LICENSE:=GPL-2.0+
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/digitemp/Default
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. TITLE:=DigiTemp is a simple to use program for reading values from 1-wire devices.
  23. URL:=https://www.digitemp.com
  24. endef
  25. define Package/digitemp/Default/description
  26. DigiTemp is a simple to use program for reading values from 1-wire devices.
  27. Its main use is for reading temperature sensors, but it also reads counters,
  28. and understands the 1-wire hubs with devices on different branches of the network.
  29. endef
  30. define Package/digitemp
  31. $(call Package/digitemp/Default)
  32. TITLE += (serial version)
  33. endef
  34. define Package/digitemp/description
  35. $(call Package/digitemp/Default/description)
  36. This package is built without USB support.
  37. endef
  38. define Package/digitemp-usb
  39. $(call Package/digitemp/Default)
  40. TITLE += (USB version)
  41. DEPENDS += +libusb-compat
  42. endef
  43. define Package/digitemp-usb/description
  44. $(call Package/digitemp/Default/description)
  45. This package is built with USB support.
  46. endef
  47. define Build/Compile
  48. $(MAKE) -C $(PKG_BUILD_DIR) \
  49. $(TARGET_CONFIGURE_OPTS) \
  50. CFLAGS="$(TARGET_CFLAGS) -DLINUX $(TARGET_CPPFLAGS) \
  51. -I./src -I./userial" \
  52. LIBS="$(TARGET_LDFLAGS)" \
  53. DESTDIR="$(PKG_INSTALL_DIR)" \
  54. ds9097 ds9097u
  55. $(MAKE) -C $(PKG_BUILD_DIR) \
  56. $(TARGET_CONFIGURE_OPTS) \
  57. CFLAGS="$(TARGET_CFLAGS) -DLINUX $(TARGET_CPPFLAGS) \
  58. -I./src -I./userial -DOWUSB" \
  59. LIBS="$(TARGET_LDFLAGS) -lusb -lm -DOWUSB" \
  60. DESTDIR="$(PKG_INSTALL_DIR)" \
  61. clean ds2490
  62. endef
  63. define Package/digitemp/install
  64. $(INSTALL_DIR) $(1)/usr/bin/
  65. $(CP) $(PKG_BUILD_DIR)/digitemp_{DS9097,DS9097U} $(1)/usr/bin/
  66. endef
  67. define Package/digitemp-usb/install
  68. $(INSTALL_DIR) $(1)/usr/bin/
  69. $(CP) $(PKG_BUILD_DIR)/digitemp_DS2490 $(1)/usr/bin/
  70. endef
  71. $(eval $(call BuildPackage,digitemp))
  72. $(eval $(call BuildPackage,digitemp-usb))