Add digitemp (#2546)
[openwrt/svn-archive/archive.git] / utils / digitemp / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=digitemp
4 PKG_VERSION:=3.5.0
5 PKG_RELEASE:=1
6
7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
8 PKG_SOURCE_URL:=http://www.digitemp.com/software/linux
9 PKG_MD5SUM:=72bda9c8a66b017aa969c19dedb3225b
10 PKG_CAT:=zcat
11
12 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
13 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
14
15 include $(INCLUDE_DIR)/package.mk
16
17 define Package/digitemp
18 SECTION:=utils
19 CATEGORY:=Utilities
20 TITLE:=DigiTemp is a simple to use program for reading values from 1-wire devices.
21 DEPENDS:=+libusb
22 URL:=http://www.digitemp.com
23 endef
24
25 define Package/digitemp/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
31 define Build/Compile
32 $(MAKE) -C $(PKG_BUILD_DIR) \
33 $(TARGET_CONFIGURE_OPTS) \
34 CFLAGS="$(TARGET_CFLAGS) -DLINUX -I$(STAGING_DIR)/usr/include \
35 -I/.src -I./userial" \
36 LIBS="-L$(STAGING_DIR)/usr/lib -lusb -lm" \
37 DESTDIR="$(PKG_INSTALL_DIR)" \
38 ds2490
39 endef
40
41 define Package/digitemp/install
42 mkdir -p $(1)/usr/bin/
43 $(CP) $(PKG_BUILD_DIR)/digitemp_DS2490 $(1)/usr/bin/
44 endef
45
46 $(eval $(call BuildPackage,digitemp))