Browse Source

crelay: Update to V0.9, add startup config file

Signed-off-by: Ted Hess <thess@kitschensync.net>
Ted Hess 9 years ago
parent
commit
eed20a34ff

+ 3
- 2
utils/crelay/Makefile View File

@@ -8,12 +8,12 @@
8 8
 include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=crelay
11
-PKG_VERSION:=0.8-081415
11
+PKG_VERSION:=0.9
12 12
 PKG_RELEASE:=1
13 13
 
14 14
 PKG_SOURCE_PROTO:=git
15 15
 PKG_SOURCE_URL:=https://github.com/ondrej1024/crelay
16
-PKG_SOURCE_VERSION:=037360cf143d705ea97b32ae22460f346ad2586f
16
+PKG_SOURCE_VERSION:=V$(PKG_VERSION)
17 17
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 18
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
19 19
 
@@ -65,6 +65,7 @@ define Package/crelay/install
65 65
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/crelay $(1)/usr/bin/
66 66
 	$(INSTALL_DIR) $(1)/etc/init.d
67 67
 	$(INSTALL_BIN) ./files/crelay.init $(1)/etc/init.d/crelay
68
+	$(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/crelay.conf $(1)/etc
68 69
 endef
69 70
 
70 71
 $(eval $(call BuildPackage,crelay))

+ 3
- 6
utils/crelay/files/crelay.init View File

@@ -8,17 +8,14 @@ PROG=/usr/bin/${NAME}
8 8
 
9 9
 USE_PROCD=1
10 10
 
11
-# Custom relay labels (for Web GUI)
12
-LABEL1=""
13
-LABEL2=""
14
-LABEL3=""
15
-LABEL4=""
11
+# Custom relay labels (for Web GUI) are defined in /etc/crelay.conf
16 12
 
17 13
 start_service() {
18 14
 	procd_open_instance
19 15
 
20 16
 	procd_set_param command "$PROG"
21
-	procd_append_param command -d "$LABEL1 $LABEL2 $LABEL3 $LABEL4"
17
+	# daemon mode (not daemonized) - starts HTTP server
18
+	procd_append_param command -d
22 19
 
23 20
 	procd_close_instance
24 21
 }

+ 2
- 2
utils/crelay/patches/010-link_with_ftdi1.patch View File

@@ -1,10 +1,10 @@
1 1
 --- a/src/Makefile
2 2
 +++ b/src/Makefile
3
-@@ -44,7 +44,7 @@ endif
3
+@@ -45,7 +45,7 @@ endif
4 4
  #ifdef DRV_SAINSMART
5 5
  ifeq ($(DRV_SAINSMART), y)
6 6
  SRC	+= relay_drv_sainsmart.c
7
--LIBS	+= -lftdi 
7
+-LIBS	+= -lftdi
8 8
 +LIBS	+= -lftdi1
9 9
  OPTS	+= -DDRV_SAINSMART
10 10
  endif