Merge pull request #2920 from xypron/relayctl
[feed/packages.git] / utils / relayctl / Makefile
1 # Copyright (C) 2016 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=relayctl
10 PKG_VERSION:=0.1
11 PKG_RELEASE:=1
12
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14 PKG_SOURCE_URL:=http://download.sourceforge.net/project/relayctl/relayctl-$(PKG_VERSION)
15 PKG_MAINTAINER:=Heinrich Schuchardt <xypron.glpk@gmx.de>
16 PKG_MD5SUM:=24c848e0d705421dcd6accfffa31f704
17 PKG_LICENSE:=BSD
18
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/relayctl
24 SECTION:=utils
25 CATEGORY:=Utilities
26 TITLE:=Simple command-line control of SainSmart USB relay boards
27 URL:=https://github.com/darryln/relayctl
28 DEPENDS:= +libftdi1 +udev
29 endef
30
31 define Package/relayctl/description
32 Simple command-line control of SainSmart USB relay boards based on
33 FTDI chips using bitbang mode.
34 endef
35
36 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/libftdi1
37
38 define Package/relayctl/install
39 $(INSTALL_DIR) $(1)/usr/bin
40 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(1)/usr/bin/
41 $(INSTALL_DIR) $(1)/lib/udev/rules.d/
42 $(CP) $(PKG_BUILD_DIR)/examples/60-relayctl.rules $(1)/lib/udev/rules.d/
43 endef
44
45 $(eval $(call BuildPackage,relayctl))