Browse Source

rtl-ais: bump version, add init script, add uci config

Signed-off-by: Nuno Goncalves <nunojpg@gmail.com>
Nuno Goncalves 9 years ago
parent
commit
6a5d2a5b96
3 changed files with 31 additions and 2 deletions
  1. 9
    2
      utils/rtl-ais/Makefile
  2. 19
    0
      utils/rtl-ais/files/rtl_ais.init
  3. 3
    0
      utils/rtl-ais/files/uci_rtl_ais

+ 9
- 2
utils/rtl-ais/Makefile View File

@@ -7,14 +7,14 @@
7 7
 include $(TOPDIR)/rules.mk
8 8
 
9 9
 PKG_NAME:=rtl-ais
10
-PKG_VERSION:=20150713
10
+PKG_VERSION:=20150722
11 11
 
12 12
 PKG_RELEASE=$(PKG_SOURCE_VERSION)
13 13
 
14 14
 PKG_SOURCE_PROTO:=git
15 15
 PKG_SOURCE_URL:=https://github.com/dgiardini/rtl-ais.git
16 16
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
17
-PKG_SOURCE_VERSION:=d1084f6514cb161266f5bc5c6662070ad7c87560
17
+PKG_SOURCE_VERSION:=b805be0164475e58a73b57763a8cbbf8a2bd0ded
18 18
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
19 19
 
20 20
 PKG_LICENSE:=GPL-2.0+
@@ -37,10 +37,17 @@ define Package/rtl-ais/description
37 37
   System) used on ships and by vessel traffic services
38 38
 endef
39 39
 
40
+define Package/rtl-ais/conffiles
41
+/etc/config/rtl_ais
42
+endef
40 43
 
41 44
 define Package/rtl-ais/install
42 45
 	$(INSTALL_DIR) $(1)/usr/bin
43 46
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/rtl_ais $(1)/usr/bin/
47
+	$(INSTALL_DIR) $(1)/etc/init.d
48
+	$(INSTALL_BIN) ./files/rtl_ais.init $(1)/etc/init.d/rtl_ais
49
+	$(INSTALL_DIR) $(1)/etc/config
50
+	$(INSTALL_DATA) ./files/uci_rtl_ais $(1)/etc/config/rtl_ais
44 51
 endef
45 52
 
46 53
 $(eval $(call BuildPackage,rtl-ais))

+ 19
- 0
utils/rtl-ais/files/rtl_ais.init View File

@@ -0,0 +1,19 @@
1
+#!/bin/sh /etc/rc.common
2
+# Copyright (C) 2015 OpenWrt.org
3
+
4
+START=99
5
+
6
+USE_PROCD=1
7
+PROG=/usr/bin/rtl_ais
8
+
9
+start_service() {
10
+	enabled="$(uci_get rtl_ais @rtl_ais[0] enabled 0)"
11
+	ppm="$(uci_get rtl_ais @rtl_ais[0] ppm 0)"
12
+
13
+        [ "$enabled" != "1" ] && return
14
+
15
+        procd_open_instance
16
+        procd_set_param command "$PROG" -p "$ppm"
17
+        procd_set_param respawn
18
+        procd_close_instance
19
+}

+ 3
- 0
utils/rtl-ais/files/uci_rtl_ais View File

@@ -0,0 +1,3 @@
1
+config rtl_ais
2
+	option enabled	0
3
+	option ppm	0