Add GfxCanvas as buildroot package
This commit is contained in:
@@ -2,5 +2,6 @@ menu "RPI Common packages"
|
||||
|
||||
source "$BR2_EXTERNAL_RPI_COMMON_PATH/package/my-shared-lib/Config.in"
|
||||
source "$BR2_EXTERNAL_RPI_COMMON_PATH/package/my-common-tool/Config.in"
|
||||
source "$BR2_EXTERNAL_RPI_COMMON_PATH/package/gfxcanvas/Config.in"
|
||||
|
||||
endmenu
|
||||
|
||||
@@ -56,3 +56,4 @@ BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_GENIMAGE=y
|
||||
BR2_PACKAGE_HOST_KMOD_XZ=y
|
||||
BR2_PACKAGE_HOST_MTOOLS=y
|
||||
BR2_PACKAGE_GFXCANVAS=y
|
||||
|
||||
14
package/gfxcanvas/Config.in
Normal file
14
package/gfxcanvas/Config.in
Normal file
@@ -0,0 +1,14 @@
|
||||
config BR2_PACKAGE_GFXCANVAS
|
||||
bool "gfxcanvas"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_13
|
||||
help
|
||||
Small C++ framebuffer graphics application that draws an
|
||||
info screen (date/time, hostname, network addresses) on a
|
||||
Linux framebuffer device. Intended for SSD1306-class OLEDs
|
||||
exposed as /dev/fbN via fbtft.
|
||||
|
||||
https://git.gmlima.com/Gabriel/GfxCanvas
|
||||
|
||||
comment "gfxcanvas needs a toolchain w/ C++, gcc >= 13"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_13
|
||||
60
package/gfxcanvas/S99gfxcanvas
Normal file
60
package/gfxcanvas/S99gfxcanvas
Normal file
@@ -0,0 +1,60 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Start gfxcanvas info display
|
||||
#
|
||||
|
||||
DAEMON="gfxcanvas"
|
||||
DAEMON_PATH="/usr/bin/$DAEMON"
|
||||
DAEMON_ARGS="/dev/fb1"
|
||||
PIDFILE="/var/run/$DAEMON.pid"
|
||||
|
||||
start() {
|
||||
printf 'Starting %s: ' "$DAEMON"
|
||||
# shellcheck disable=SC2086
|
||||
start-stop-daemon -S -q -m -b -p "$PIDFILE" \
|
||||
-x "$DAEMON_PATH" -- $DAEMON_ARGS
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf 'Stopping %s: ' "$DAEMON"
|
||||
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
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit $?
|
||||
20
package/gfxcanvas/gfxcanvas.mk
Normal file
20
package/gfxcanvas/gfxcanvas.mk
Normal file
@@ -0,0 +1,20 @@
|
||||
################################################################################
|
||||
#
|
||||
# gfxcanvas
|
||||
#
|
||||
################################################################################
|
||||
|
||||
GFXCANVAS_VERSION = 0.1
|
||||
GFXCANVAS_SITE = https://git.gmlima.com/Gabriel/GfxCanvas.git
|
||||
GFXCANVAS_SITE_METHOD = git
|
||||
GFXCANVAS_LICENSE = GPL-3.0
|
||||
GFXCANVAS_LICENSE_FILES = LICENSE
|
||||
|
||||
GFXCANVAS_CONF_OPTS = -DPROJECT_NAME=gfxcanvas
|
||||
|
||||
define GFXCANVAS_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 0755 $(GFXCANVAS_PKGDIR)/S99gfxcanvas \
|
||||
$(TARGET_DIR)/etc/init.d/S99gfxcanvas
|
||||
endef
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user