summaryrefslogtreecommitdiff
path: root/openwrt/rhctl/Makefile
blob: b126c32ee7e7fadd816a5a8706760acbe6e195b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#
# Copyright (C) 2016 Christian Pointner,
#                         <equinox@helsinki.at>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# This Makefile builds rhctl Package for OpenWRT
#
# $Id: $

include $(TOPDIR)/rules.mk

PKG_NAME:=rhctl
PKG_VERSION:=2017-01-11
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=git://git.helsinki.at/rhctl.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=HEAD

include $(INCLUDE_DIR)/package.mk

define Package/rhctl
  SECTION:=utils
  CATEGORY:=Utilities
  TITLE:=Radio Helsinki audioswitch control daemon
  URL:=http://www.helsinki.at
  MAINTAINER:=Christian Pointner <equinox@helsinki.at>
  DEPENDS:=+curl
endef

define Package/rhctl/conffiles
/etc/rhctl/config.toml
endef

define Package/rhctl/description
rhctl is a small daemon to control the main audioswitch at Radio Helsinki.
  The daemon can work standalone but may be controlled via telnet. It also
  exports status updates via websockets.
endef

define Build/Configure
endef

define Build/Compile
	export GOROOT=/opt/go
	$(MAKE) -C $(PKG_BUILD_DIR)/ build-alix 
endef

define Package/rhctl/install
	$(INSTALL_DIR) $(1)/etc/rhctl
	$(INSTALL_DATA) ./files/config.toml $(1)/etc/rhctl/
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/linux_386/rhctl $(1)/usr/bin/
	$(INSTALL_DIR) $(1)/etc/init.d
	$(INSTALL_BIN) ./files/rhctl.init $(1)/etc/init.d/rhctl
	$(INSTALL_DIR) $(1)/usr/lib/check_mk_agent/plugins
	$(INSTALL_BIN) ./files/rhctl.check_mk $(1)/usr/lib/check_mk_agent/plugins/rhctl

endef

$(eval $(call BuildPackage,rhctl))