mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
rtl-ais: bump version, add init script, add uci config
Signed-off-by: Nuno Goncalves <nunojpg@gmail.com>
This commit is contained in:
@@ -7,14 +7,14 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=rtl-ais
|
PKG_NAME:=rtl-ais
|
||||||
PKG_VERSION:=20150713
|
PKG_VERSION:=20150722
|
||||||
|
|
||||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL:=https://github.com/dgiardini/rtl-ais.git
|
PKG_SOURCE_URL:=https://github.com/dgiardini/rtl-ais.git
|
||||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
PKG_SOURCE_VERSION:=d1084f6514cb161266f5bc5c6662070ad7c87560
|
PKG_SOURCE_VERSION:=b805be0164475e58a73b57763a8cbbf8a2bd0ded
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0+
|
PKG_LICENSE:=GPL-2.0+
|
||||||
@@ -37,10 +37,17 @@ define Package/rtl-ais/description
|
|||||||
System) used on ships and by vessel traffic services
|
System) used on ships and by vessel traffic services
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/rtl-ais/conffiles
|
||||||
|
/etc/config/rtl_ais
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/rtl-ais/install
|
define Package/rtl-ais/install
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/rtl_ais $(1)/usr/bin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/rtl_ais $(1)/usr/bin/
|
||||||
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
|
$(INSTALL_BIN) ./files/rtl_ais.init $(1)/etc/init.d/rtl_ais
|
||||||
|
$(INSTALL_DIR) $(1)/etc/config
|
||||||
|
$(INSTALL_DATA) ./files/uci_rtl_ais $(1)/etc/config/rtl_ais
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,rtl-ais))
|
$(eval $(call BuildPackage,rtl-ais))
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2015 OpenWrt.org
|
||||||
|
|
||||||
|
START=99
|
||||||
|
|
||||||
|
USE_PROCD=1
|
||||||
|
PROG=/usr/bin/rtl_ais
|
||||||
|
|
||||||
|
start_service() {
|
||||||
|
enabled="$(uci_get rtl_ais @rtl_ais[0] enabled 0)"
|
||||||
|
ppm="$(uci_get rtl_ais @rtl_ais[0] ppm 0)"
|
||||||
|
|
||||||
|
[ "$enabled" != "1" ] && return
|
||||||
|
|
||||||
|
procd_open_instance
|
||||||
|
procd_set_param command "$PROG" -p "$ppm"
|
||||||
|
procd_set_param respawn
|
||||||
|
procd_close_instance
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
config rtl_ais
|
||||||
|
option enabled 0
|
||||||
|
option ppm 0
|
||||||
Reference in New Issue
Block a user