blob: ada885da5ff1bfd25da463dac872df84878caccd (
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
#
# Copyright (C) 2013-2015 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:=2015-07-26
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 tools
URL:=http://www.helsinki.at
MAINTAINER:=Christian Pointner <equinox@helsinki.at>
DEPENDS:=+liblua +luasocket +hotplug2 +msmtp
endef
define Package/rhctl/conffiles
/etc/rhctl/switchctl.conf
endef
define Package/rhctl/description
rhctl is a collection of daemons and tools intended to control the
main audio switch of Radio Helsinki.
endef
define Build/Configure
(cd $(PKG_BUILD_DIR)/src; \
touch include.mk; \
)
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/src \
$(TARGET_CONFIGURE_OPTS) \
TARGET=Linux \
CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
LDFLAGS="$(TARGET_LDFLAGS) -ldl -lm -lcrypt" \
LUA_LDFLAGS="-llua"
$(STRIP) $(PKG_BUILD_DIR)/src/switchctl
$(STRIP) $(PKG_BUILD_DIR)/src/serialclient
$(STRIP) $(PKG_BUILD_DIR)/src/stdioclient
$(STRIP) $(PKG_BUILD_DIR)/src/heartbeatclient
$(STRIP) $(PKG_BUILD_DIR)/src/luaclient
endef
define Package/rhctl/install
$(INSTALL_DIR) $(1)/etc/rhctl
$(INSTALL_DATA) ./files/switchctl.conf $(1)/etc/rhctl/
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/rhctl.config $(1)/etc/config/rhctl
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/switchctl $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/serialclient $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/stdioclient $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/heartbeatclient $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/luaclient $(1)/usr/bin/
$(INSTALL_BIN) ./files/rhctlsh $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/share/rhctl
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/*.lua $(1)/usr/share/rhctl/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/switchctl.init $(1)/etc/init.d/switchctl
$(INSTALL_BIN) ./files/serialclient.init $(1)/etc/init.d/serialclient
$(INSTALL_BIN) ./files/heartbeatclient.init $(1)/etc/init.d/heartbeatclient
$(INSTALL_BIN) ./files/luaclient.init $(1)/etc/init.d/luaclient
$(INSTALL_DIR) $(1)/etc/hotplug.d/usb
$(INSTALL_DATA) ./files/rhctl-usbserial.hotplug $(1)/etc/hotplug.d/usb/20-rhctl-usbserial
endef
$(eval $(call BuildPackage,rhctl))
|