[packages] canutils: add package
authorluka <luka@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 11 Dec 2013 10:54:49 +0000 (10:54 +0000)
committerluka <luka@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 11 Dec 2013 10:54:49 +0000 (10:54 +0000)
Signed-off-by: Luka Perkov <luka@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/packages@39031 3c298f89-4303-0410-b956-a3cf2f4a3e73

utils/canutils/Makefile [new file with mode: 0644]

diff --git a/utils/canutils/Makefile b/utils/canutils/Makefile
new file mode 100644 (file)
index 0000000..758664e
--- /dev/null
@@ -0,0 +1,57 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=canutils
+PKG_VERSION:=4.0.6
+PKG_RELEASE=1
+
+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
+
+include $(INCLUDE_DIR)/package.mk
+
+FILES:= \
+       canconfig candump canecho cansend cansequence
+
+define PartGen
+define Package/canutils-$(1)
+  TITLE:=$(1) package from canutils
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=canutils +libsocketcan
+endef
+endef
+
+define Package/canutils
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=CAN userspace utilities and tools
+  MENU:=1
+endef
+
+$(foreach file,$(FILES),$(eval $(call PartGen,$(file))))
+
+define Package/canutils/install
+       true
+endef
+
+define PartInstall
+define Package/canutils-$(1)/install
+       $(INSTALL_DIR) $$(1)/usr/bin
+       $(INSTALL_BIN) \
+               $(PKG_BUILD_DIR)/src/$(1) \
+               $$(1)/usr/bin/
+endef
+endef
+
+$(foreach file,$(FILES),$(eval $(call PartInstall,$(file))))
+
+$(eval $(call BuildPackage,canutils))
+$(foreach file,$(FILES),$(eval $(call BuildPackage,canutils-$(file))))