[package] add serial and usb version of the digitemp package (#4717)

git-svn-id: svn://svn.openwrt.org/openwrt/packages@17020 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2009-07-26 17:59:49 +00:00
parent bc44f633e1
commit c0adcffda9

View File

@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=digitemp PKG_NAME:=digitemp
PKG_VERSION:=3.6.0 PKG_VERSION:=3.6.0
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.digitemp.com/software/linux PKG_SOURCE_URL:=http://www.digitemp.com/software/linux
@ -18,21 +18,48 @@ PKG_MD5SUM:=9be2e48db37920f21925ae6e88f83b84
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
define Package/digitemp define Package/digitemp/Default
SECTION:=utils SECTION:=utils
CATEGORY:=Utilities CATEGORY:=Utilities
TITLE:=DigiTemp is a simple to use program for reading values from 1-wire devices. TITLE:=DigiTemp is a simple to use program for reading values from 1-wire devices.
DEPENDS:=+libusb
URL:=http://www.digitemp.com URL:=http://www.digitemp.com
endef endef
define Package/digitemp/description define Package/digitemp/Default/description
DigiTemp is a simple to use program for reading values from 1-wire devices. DigiTemp is a simple to use program for reading values from 1-wire devices.
Its main use is for reading temperature sensors, but it also reads counters, Its main use is for reading temperature sensors, but it also reads counters,
and understands the 1-wire hubs with devices on different branches of the network. and understands the 1-wire hubs with devices on different branches of the network.
endef endef
define Package/digitemp
$(call Package/digitemp/Default)
TITLE += (serial version)
endef
define Package/digitemp/description
$(call Package/digitemp/Default/description)
This package is build without USB support.
endef
define Package/digitemp-usb
$(call Package/digitemp/Default)
TITLE += (USB version)
DEPENDS += +libusb
endef
define Package/digitemp-usb/description
$(call Package/digitemp/Default/description)
This package is build with USB support.
endef
define Build/Compile define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS) -DLINUX $(TARGET_CPPFLAGS) \
-I./src -I./userial" \
LIBS="$(TARGET_LDFLAGS) -lusb -lm" \
DESTDIR="$(PKG_INSTALL_DIR)" \
ds9097
$(MAKE) -C $(PKG_BUILD_DIR) \ $(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \ $(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS) -DLINUX $(TARGET_CPPFLAGS) \ CFLAGS="$(TARGET_CFLAGS) -DLINUX $(TARGET_CPPFLAGS) \
@ -44,7 +71,13 @@ endef
define Package/digitemp/install define Package/digitemp/install
mkdir -p $(1)/usr/bin/ mkdir -p $(1)/usr/bin/
$(CP) $(PKG_BUILD_DIR)/digitemp_DS2490 $(1)/usr/bin/ $(CP) $(PKG_BUILD_DIR)/digitemp_DS9097 $(1)/usr/bin/
endef
define Package/digitemp-usb/install
mkdir -p $(1)/usr/bin/
$(CP) $(PKG_BUILD_DIR)/digitemp_DS9097 $(1)/usr/bin/
endef endef
$(eval $(call BuildPackage,digitemp)) $(eval $(call BuildPackage,digitemp))
$(eval $(call BuildPackage,digitemp-usb))