Browse Source

Merge pull request #4972 from blogic/master

uledd: add a tiny ubus frontend for PWM/RGB leds
lilik-openwrt-22.03
John Crispin 7 years ago
committed by GitHub
parent
commit
a2de0d04b4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 0 deletions
  1. +32
    -0
      utils/uledd/Makefile
  2. +13
    -0
      utils/uledd/files/uledd.init

+ 32
- 0
utils/uledd/Makefile View File

@ -0,0 +1,32 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=uledd
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://github.com/blogic/uledd.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=bc94c7e52009f7ec33b23652502b4754351d8040
PKG_MIRROR_HASH:=23a407197d6a423bb0b32f381e93ad3676e15f07465d7b53c843a2b510c7c284
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
PKG_LICENSE:=GPL-2.0
CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/uledd
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libubox +libubus
TITLE:=PWM/RGB LED ubus frontend
endef
define Package/uledd/install
$(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/uledd $(1)/sbin/
$(INSTALL_BIN) ./files/uledd.init $(1)/etc/init.d/uledd
endef
$(eval $(call BuildPackage,uledd))

+ 13
- 0
utils/uledd/files/uledd.init View File

@ -0,0 +1,13 @@
#!/bin/sh /etc/rc.common
START=95
USE_PROCD=1
PROG=/sbin/uledd
start_service() {
procd_open_instance
procd_set_param command "$PROG"
procd_set_param respawn
procd_close_instance
}

Loading…
Cancel
Save