canutils: Replace old Pengutronix version with VW version
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 21 Mar 2014 15:22:04 +0000 (15:22 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 21 Mar 2014 15:22:04 +0000 (15:22 +0000)
The old Pengutronix canutils seems very old and unmaintained. Replace
it with VolksWagen version of canutils that is actively maintained by
the Linux-CAN project. The VW version also has more features.

Changes in v2: Run autogen.sh to fix compile with NEON hw FP.

Signed-off-by: Jan Kardell <jan.kardell@telliq.com>
git-svn-id: svn://svn.openwrt.org/openwrt/packages@39977 3c298f89-4303-0410-b956-a3cf2f4a3e73

utils/canutils/Makefile

index 758664e..7fd2295 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=canutils
-PKG_VERSION:=4.0.6
-PKG_RELEASE=1
+PKG_VERSION:=2014-02-27
+PKG_RELEASE=$(PKG_SOURCE_VERSION)
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://www.pengutronix.de/software/socket-can/download/canutils/v4.0/
-PKG_MD5SUM:=e9af32bc41da85517b7bfe7de3bb9481
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=git://gitorious.org/linux-can/can-utils.git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=67a2bdcd336e6becfa5784742e18c88dbeddc973
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 
 include $(INCLUDE_DIR)/package.mk
 
-FILES:= \
-       canconfig candump canecho cansend cansequence
+FILES:=        canbusload can-calc-bit-timing candump \
+       cangen cangw canplayer cansniffer cansend
+
+
+define Package/canutils-log-conversion
+  TITLE:=canutils log conversion
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=canutils
+endef
 
 define PartGen
 define Package/canutils-$(1)
   TITLE:=$(1) package from canutils
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=canutils +libsocketcan
+  DEPENDS:=canutils
 endef
 endef
 
 define Package/canutils
   SECTION:=utils
   CATEGORY:=Utilities
+  URL=https://gitorious.org/linux-can
   TITLE:=CAN userspace utilities and tools
   MENU:=1
 endef
 
+define Build/Configure
+       ( cd "$(PKG_BUILD_DIR)"; ./autogen.sh )
+       $(call Build/Configure/Default)
+endef
+
 $(foreach file,$(FILES),$(eval $(call PartGen,$(file))))
 
 define Package/canutils/install
        true
 endef
 
+define Package/canutils-log-conversion/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/asc2log $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/log2asc $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/log2long $(1)/usr/bin/
+endef
+
 define PartInstall
 define Package/canutils-$(1)/install
        $(INSTALL_DIR) $$(1)/usr/bin
        $(INSTALL_BIN) \
-               $(PKG_BUILD_DIR)/src/$(1) \
+               $(PKG_BUILD_DIR)/$(1) \
                $$(1)/usr/bin/
 endef
 endef
 
+define Package/canutils-log-conversion/description
+asc2log - convert ASC logfile to compact CAN frame logfile.
+log2asc - convert compact CAN frame logfile to ASC logfile.
+log2long - convert compact CAN frame representation into user readable.
+endef
+
+define Package/canutils-canbusload/description
+canbusload - display the load percentage of can buses.
+endef
+
+define Package/canutils-can-calc-bit-timing/description
+can-calc-bit-timing - calculate hw bittiming for supported can chips.
+endef
+
+define Package/canutils-candump/description
+candump - dumps can frames to terminal, logfile or another can device,
+with optional filtering.
+endef
+
+define Package/canutils-cangen/description
+cangen - CAN frames generator for testing purposes.
+endef
+
+define Package/canutils-cangw/description
+cangw - manage PF_CAN netlink gateway.
+endef
+
+define Package/canutils-canplayer/description
+canplayer - replay a compact CAN frame logfile to CAN devices.
+endef
+
+define Package/canutils-cansend/description
+cansend - simple command line tool to send CAN-frames via CAN_RAW sockets.
+endef
+
 $(foreach file,$(FILES),$(eval $(call PartInstall,$(file))))
 
 $(eval $(call BuildPackage,canutils))
+$(eval $(call BuildPackage,canutils-log-conversion))
 $(foreach file,$(FILES),$(eval $(call BuildPackage,canutils-$(file))))