summaryrefslogtreecommitdiff
path: root/openwrt
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-10-14 14:53:53 +0200
committerChristian Pointner <equinox@spreadspace.org>2015-10-14 14:53:53 +0200
commita72c8af2a59a8103b54d3cd7e644e744d6c1ac42 (patch)
tree5752098ef4caa5541e1e33fa6fcc2b11d879a0f1 /openwrt
parentmerged app sources to single folder (diff)
added first version of an openwrt package
Diffstat (limited to 'openwrt')
-rw-r--r--openwrt/dolmetsch-ctl/Makefile87
-rwxr-xr-xopenwrt/dolmetsch-ctl/files/dolmetschctl-client.init14
-rwxr-xr-xopenwrt/dolmetsch-ctl/files/dolmetschctl.init14
3 files changed, 115 insertions, 0 deletions
diff --git a/openwrt/dolmetsch-ctl/Makefile b/openwrt/dolmetsch-ctl/Makefile
new file mode 100644
index 0000000..00b95d3
--- /dev/null
+++ b/openwrt/dolmetsch-ctl/Makefile
@@ -0,0 +1,87 @@
+#
+# Copyright (C) 2006-2015 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:=dolmetschctl
+PKG_VERSION:=2015-10-14
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=git://git.spreadspace.org/dolmetschctl.git
+PKG_SOURCE:=$(PKG_NAME).tar.gz
+PKG_SOURCE_VERSION:=6bc291c0fd3e1760ca4bfeaf33b38cbb4b21830c
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)
+
+PKG_MAINTAINER:=Christian Pointner <equinox@spreadspace.org>
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/dolmetschctl
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=+alsa-lib +liblo
+ TITLE:=Dolmetsch Control (server)
+ URL:=http://www.spreadspace.org/
+endef
+
+define Package/dolmetschctl-client
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=+alsa-lib +liblo
+ TITLE:=Dolmetsch Control (client)
+ URL:=http://www.spreadspace.org/
+endef
+
+define Build/Configure
+ (cd $(PKG_BUILD_DIR)/app; \
+ touch include.mk; \
+ echo '#ifndef DOLMETSCHCTL_config_h_INCLUDED' > config.h; \
+ echo '#define DOLMETSCHCTL_config_h_INCLUDED' >> config.h; \
+ echo '' >> config.h; \
+ echo '#define VERSION_STRING_0 "dolmetschctl trunk (git '$(PKG_SOURCE_VERSION)')"' >> config.h; \
+ echo '#define VERSION_STRING_1 "built on '`hostname`', '`date +"%d.%m.%Y %H:%M:%S %Z"`'"' >> config.h; \
+ echo '' >> config.h; \
+ echo '#define TARGET "linux"' >> config.h; \
+ echo '#define PREFIX "/usr"' >> config.h; \
+ echo '#define BINDIR "/usr/bin"' >> config.h; \
+ echo '#define ETCDIR "/etc"' >> config.h; \
+ echo '' >> config.h; \
+ echo '#endif' >> config.h \
+ )
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR)/app \
+ $(TARGET_CONFIGURE_OPTS) \
+ TARGET=Linux \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS) -llo -lasound"
+ $(STRIP) $(PKG_BUILD_DIR)/app/dolmetschctl
+ $(STRIP) $(PKG_BUILD_DIR)/app/dolmetschctl-client
+endef
+
+
+define Package/dolmetschctl/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/app/dolmetschctl $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/dolmetschctl.init $(1)/etc/init.d/dolmetschctl
+endef
+
+define Package/dolmetschctl-client/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/app/dolmetschctl-client $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/dolmetschctl-client.init $(1)/etc/init.d/dolmetschctl-client
+endef
+
+$(eval $(call BuildPackage,dolmetschctl))
+$(eval $(call BuildPackage,dolmetschctl-client))
+
+
+
diff --git a/openwrt/dolmetsch-ctl/files/dolmetschctl-client.init b/openwrt/dolmetsch-ctl/files/dolmetschctl-client.init
new file mode 100755
index 0000000..837d427
--- /dev/null
+++ b/openwrt/dolmetsch-ctl/files/dolmetschctl-client.init
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+
+USE_PROCD=1
+
+PROG=/usr/bin/dolmetschctl-client
+
+start_service() {
+ procd_open_instance
+ procd_set_param command $PROG -m hw:0,0,0 -o 192.168.1.27:1234
+ procd_set_param respawn
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_close_instance
+}
diff --git a/openwrt/dolmetsch-ctl/files/dolmetschctl.init b/openwrt/dolmetsch-ctl/files/dolmetschctl.init
new file mode 100755
index 0000000..7a2bfc9
--- /dev/null
+++ b/openwrt/dolmetsch-ctl/files/dolmetschctl.init
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+
+USE_PROCD=1
+
+PROG=/usr/bin/dolmetschctl
+
+start_service() {
+ procd_open_instance
+ procd_set_param command $PROG -x qu24 -d hw:0,0,0 -o 1234
+ procd_set_param respawn
+ procd_set_param stdout 1
+ procd_set_param stderr 1
+ procd_close_instance
+}