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.

89 lines
2.5 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.1
  12. PKG_RELEASE:=1
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  14. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  15. PKG_SOURCE_URL:=https://github.com/bcl/digitemp.git
  16. PKG_SOURCE_PROTO:=git
  17. PKG_SOURCE_VERSION:=be824bbbc81189931bf4b130a8acc39288d75662
  18. PKG_MAINTAINER:=Jasper Scholte <NightNL@outlook.com>
  19. PKG_LICENSE:=GPL-2.0+
  20. PKG_MIRROR_HASH:=490f9c94c671aa74ce0ef4fbc95231644f3aa7023d2b947714ed55fd712672f2
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/digitemp/Default
  23. SECTION:=utils
  24. CATEGORY:=Utilities
  25. TITLE:=DigiTemp is a simple to use program for reading values from 1-wire devices.
  26. URL:=http://www.digitemp.com
  27. endef
  28. define Package/digitemp/Default/description
  29. DigiTemp is a simple to use program for reading values from 1-wire devices.
  30. Its main use is for reading temperature sensors, but it also reads counters,
  31. and understands the 1-wire hubs with devices on different branches of the network.
  32. endef
  33. define Package/digitemp
  34. $(call Package/digitemp/Default)
  35. TITLE += (serial version)
  36. endef
  37. define Package/digitemp/description
  38. $(call Package/digitemp/Default/description)
  39. This package is built without USB support.
  40. endef
  41. define Package/digitemp-usb
  42. $(call Package/digitemp/Default)
  43. TITLE += (USB version)
  44. DEPENDS += +libusb-compat
  45. endef
  46. define Package/digitemp-usb/description
  47. $(call Package/digitemp/Default/description)
  48. This package is built with USB support.
  49. endef
  50. define Build/Compile
  51. $(MAKE) -C $(PKG_BUILD_DIR) \
  52. $(TARGET_CONFIGURE_OPTS) \
  53. CFLAGS="$(TARGET_CFLAGS) -DLINUX $(TARGET_CPPFLAGS) \
  54. -I./src -I./userial" \
  55. LIBS="$(TARGET_LDFLAGS)" \
  56. DESTDIR="$(PKG_INSTALL_DIR)" \
  57. ds9097 ds9097u
  58. $(MAKE) -C $(PKG_BUILD_DIR) \
  59. $(TARGET_CONFIGURE_OPTS) \
  60. CFLAGS="$(TARGET_CFLAGS) -DLINUX $(TARGET_CPPFLAGS) \
  61. -I./src -I./userial -DOWUSB" \
  62. LIBS="$(TARGET_LDFLAGS) -lusb -lm -DOWUSB" \
  63. DESTDIR="$(PKG_INSTALL_DIR)" \
  64. clean ds2490
  65. endef
  66. define Package/digitemp/install
  67. $(INSTALL_DIR) $(1)/usr/bin/
  68. $(CP) $(PKG_BUILD_DIR)/digitemp_{DS9097,DS9097U} $(1)/usr/bin/
  69. endef
  70. define Package/digitemp-usb/install
  71. $(INSTALL_DIR) $(1)/usr/bin/
  72. $(CP) $(PKG_BUILD_DIR)/digitemp_DS2490 $(1)/usr/bin/
  73. endef
  74. $(eval $(call BuildPackage,digitemp))
  75. $(eval $(call BuildPackage,digitemp-usb))