noddos: Noddos v0.5.0 with mDNS / DNS-SD support
[feed/packages.git] / utils / spi-tools / Makefile
1 #
2 # Copyright (C) 2014-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=spi-tools
11 PKG_VERSION:=1
12
13 PKG_RELEASE=$(PKG_SOURCE_VERSION)
14
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE_URL:=https://github.com/cpb-/spi-tools.git
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=cc6a41fdcec60610703ba6db488c621c64952898
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
20
21 PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
22
23 PKG_LICENSE:=GPL-2.0
24 PKG_LICENSE_FILES:=
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/spi-tools
29 SECTION:=utils
30 CATEGORY:=Utilities
31 TITLE:=Command line SPI tools
32 endef
33
34 EXTRA_CFLAGS+=-DVERSION=\"$(PKG_SOURCE_VERSION)\"
35
36 define Build/Compile
37 cd $(PKG_BUILD_DIR) ; \
38 $(TARGET_CC) $(TARGET_CFLAGS) $(EXTRA_CFLAGS) -Wall -Werror -o spi-config src/spi-config.c ; \
39 $(TARGET_CC) $(TARGET_CFLAGS) $(EXTRA_CFLAGS) -Wall -Werror -o spi-pipe src/spi-pipe.c
40 endef
41
42 define Package/spi-tools/install
43 $(INSTALL_DIR) $(1)/usr/bin
44 $(INSTALL_BIN) $(PKG_BUILD_DIR)/spi-config $(1)/usr/bin
45 $(INSTALL_BIN) $(PKG_BUILD_DIR)/spi-pipe $(1)/usr/bin
46 endef
47
48 $(eval $(call BuildPackage,spi-tools))