Skip to content

Commit

Permalink
rename prudynt; update configs
Browse files Browse the repository at this point in the history
  • Loading branch information
gtxaspec committed Mar 4, 2024
1 parent 22f5713 commit b6e4d15
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 13 deletions.
2 changes: 1 addition & 1 deletion configs/cinnado_d1_t31l_sc2336_pru_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ BR2_PACKAGE_ATBM60XX=y
BR2_PACKAGE_ATBM60XX_MODEL_6031=y
BR2_PACKAGE_MOSQUITTO=y
BR2_PACKAGE_MOTORS=y
BR2_PACKAGE_PRUDYNT_V3=y
BR2_PACKAGE_PRUDYNT_T=y
2 changes: 1 addition & 1 deletion package/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ source "$BR2_EXTERNAL_THINGINO_PATH/package/vtund-openipc/Config.in"
source "$BR2_EXTERNAL_THINGINO_PATH/package/webui/Config.in"
source "$BR2_EXTERNAL_THINGINO_PATH/package/yaml-cli/Config.in"
source "$BR2_EXTERNAL_THINGINO_PATH/package/zerotier-one/Config.in"
source "$BR2_EXTERNAL_THINGINO_PATH/package/prudynt_v3/Config.in"
source "$BR2_EXTERNAL_THINGINO_PATH/package/prudynt_t/Config.in"
source "$BR2_EXTERNAL_THINGINO_PATH/package/thingino-live555/Config.in"
source "$BR2_EXTERNAL_THINGINO_PATH/package/thingino-fonts/Config.in"
5 changes: 5 additions & 0 deletions package/prudynt_t/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
config BR2_PACKAGE_PRUDYNT_T
bool "prudynt-t for T31"
select BR2_PACKAGE_INGENIC_LIBIMP_CONTROL
help
Experimental streamer
61 changes: 61 additions & 0 deletions package/prudynt_t/files/S95prudynt
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/bin/sh

DAEMON=prudynt
DAEMON_PATH="/usr/bin"
PIDFILE="/var/run/$DAEMON.pid"

load_daemon() {
printf 'Starting %s: ' "$DAEMON"
[ -f $DAEMON_PATH/$DAEMON ] || echo -en "DISABLED, "

start-stop-daemon -b -m -S -p $PIDFILE -x \
/usr/bin/env -- LD_PRELOAD=/usr/lib/libimp_control.so $DAEMON_PATH/$DAEMON

status=$?

if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return $status
}

start() {
load_daemon
}

stop() {
printf 'Stopping %s: ' "$DAEMON"
[ -f "$DAEMON_PATH/$DAEMON" ] || echo -en "DISABLED, "
start-stop-daemon -K -q -p $PIDFILE
status=$?
if [ "$status" -eq 0 ]; then
rm -f "$PIDFILE"
echo "OK"
else
echo "FAIL"
fi
return $status
}

restart() {
stop || true
sleep 1
reload
}

reload() {
load_daemon
}

case "$1" in
start | stop | restart | reload)
$1
;;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac

exit 0
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PRUDYNT_V3_SITE_METHOD = git
PRUDYNT_V3_SITE = https://github.com/gtxaspec/prudynt-v3
PRUDYNT_V3_VERSION = $(shell git ls-remote $(PRUDYNT_V3_SITE) HEAD | head -1 | cut -f1)
PRUDYNT_V3_DEPENDENCIES = libconfig thingino-live555 ingenic-osdrv-t31 freetype thingino-fonts
PRUDYNT_T_SITE_METHOD = git
PRUDYNT_T_SITE = https://github.com/gtxaspec/prudynt-t
PRUDYNT_T_VERSION = $(shell git ls-remote $(PRUDYNT_T_SITE) HEAD | head -1 | cut -f1)
PRUDYNT_T_DEPENDENCIES = libconfig thingino-live555 ingenic-osdrv-t31 freetype thingino-fonts

# PRUDYNT_CFLAGS = $(TARGET_CLAGS)
PRUDYNT_CFLAGS += -DNO_OPENSSL=1 -Og -g
Expand All @@ -16,14 +16,15 @@ PRUDYNT_LDFLAGS = $(TARGET_LDFLAGS)
PRUDYNT_LDFLAGS += -L$(STAGING_DIR)/usr/lib
PRUDYNT_LDFLAGS += -L$(TARGET_DIR)/usr/lib

define PRUDYNT_V3_BUILD_CMDS
define PRUDYNT_T_BUILD_CMDS
$(MAKE) ARCH=$(TARGET_ARCH) CROSS_COMPILE=$(TARGET_CROSS) \
CFLAGS="$(PRUDYNT_CFLAGS)" LDFLAGS="$(PRUDYNT_LDFLAGS)" -C $(@D) all
endef

define PRUDYNT_V3_INSTALL_TARGET_CMDS
define PRUDYNT_T_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 -D $(@D)/bin/prudynt $(TARGET_DIR)/usr/bin/prudynt
$(INSTALL) -m 0644 -D $(@D)/prudynt.cfg.example $(TARGET_DIR)/etc/prudynt.cfg
$(INSTALL) -m 0755 -D $(PRUDYNT_T_PKGDIR)/files/S95prudynt $(TARGET_DIR)/etc/init.d/S95prudynt
endef

$(eval $(generic-package))
5 changes: 0 additions & 5 deletions package/prudynt_v3/Config.in

This file was deleted.

0 comments on commit b6e4d15

Please sign in to comment.