Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions projects/ROCKNIX/packages/devel/jansson/package.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2025-present ROCKNIX (https://github.com/ROCKNIX)

PKG_NAME="jansson"
PKG_VERSION="2.15.0"
PKG_SHA256="a7eac7765000373165f9373eb748be039c10b2efc00be9af3467ec92357d8954"
PKG_LICENSE="MIT"
PKG_SITE="https://github.com/akheron/jansson"
PKG_URL="https://github.com/akheron/jansson/releases/download/v${PKG_VERSION}/jansson-${PKG_VERSION}.tar.bz2"
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="Jansson is a C library for encoding, decoding and manipulating JSON data"
PKG_TOOLCHAIN="cmake"

PKG_CMAKE_OPTS_TARGET="-DJANSSON_BUILD_DOCS=OFF \
-DJANSSON_BUILD_SHARED_LIBS=ON \
-DJANSSON_EXAMPLES=OFF \
-DJANSSON_WITHOUT_TESTS=ON"
4 changes: 4 additions & 0 deletions projects/ROCKNIX/packages/network/wayvnc/daemons/003-wayvnc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
STATE=$(get_setting vnc.enabled)
SVC="wayvnc"
CONF="wayvnc.conf"
DAEMONS=("wayvnc")
65 changes: 65 additions & 0 deletions projects/ROCKNIX/packages/network/wayvnc/package.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2025-present ROCKNIX (https://github.com/ROCKNIX)

PKG_NAME="wayvnc"
PKG_VERSION="477ef59b1ea19f96d6a57ac3572f1fb33c117672"
PKG_SHA256="3ff0f3f7994712612f898b3896eb9ea3bf64a65cf39311876b072393931c3d20"
PKG_LICENSE="ISC"
PKG_SITE="https://github.com/any1/wayvnc"
PKG_URL="https://github.com/any1/wayvnc/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain sway libdrm pixman libxkbcommon wayland wayland-protocols jansson gnutls libjpeg-turbo nettle gmp ffmpeg"
PKG_LONGDESC="wayvnc: VNC server for wlroots-based Wayland compositors"
PKG_TOOLCHAIN="meson"

# neatvnc and aml are built as meson subprojects (tightly version-coupled)
_NEATVNC_VERSION="28d902a73f11d76d9fc6ad6117fd1e35961fad0a"
_AML_VERSION="ce4b82d5888a87110054b95414bd3068224d2b91"

PKG_MESON_OPTS_TARGET="-Dpam=disabled \
-Dman-pages=disabled \
-Dtests=false \
-Dscreencopy-dmabuf=auto \
-Dneatvnc:jpeg=enabled \
-Dneatvnc:tls=enabled \
-Dneatvnc:h264=enabled \
-Dneatvnc:nettle=enabled \
-Dneatvnc:gbm=auto \
-Dneatvnc:tests=false \
-Dneatvnc:examples=false \
-Dneatvnc:benchmarks=false"

pre_configure_target() {
# Download neatvnc and aml as meson subprojects
mkdir -p ${PKG_BUILD}/subprojects

# neatvnc
if [ ! -d "${PKG_BUILD}/subprojects/neatvnc" ]; then
wget -q -O ${PKG_BUILD}/subprojects/neatvnc.tar.gz \
"https://github.com/any1/neatvnc/archive/${_NEATVNC_VERSION}.tar.gz"
tar xf ${PKG_BUILD}/subprojects/neatvnc.tar.gz -C ${PKG_BUILD}/subprojects
mv ${PKG_BUILD}/subprojects/neatvnc-${_NEATVNC_VERSION} \
${PKG_BUILD}/subprojects/neatvnc
rm ${PKG_BUILD}/subprojects/neatvnc.tar.gz
fi

# aml
if [ ! -d "${PKG_BUILD}/subprojects/aml" ]; then
wget -q -O ${PKG_BUILD}/subprojects/aml.tar.gz \
"https://github.com/any1/aml/archive/${_AML_VERSION}.tar.gz"
tar xf ${PKG_BUILD}/subprojects/aml.tar.gz -C ${PKG_BUILD}/subprojects
mv ${PKG_BUILD}/subprojects/aml-${_AML_VERSION} \
${PKG_BUILD}/subprojects/aml
rm ${PKG_BUILD}/subprojects/aml.tar.gz
fi
}

post_makeinstall_target() {
# Remove man pages, headers, pkgconfig — only need the binaries + neatvnc .so
rm -rf ${INSTALL}/usr/share/man
rm -rf ${INSTALL}/usr/include
rm -rf ${INSTALL}/usr/lib/pkgconfig
}

post_install() {
enable_service wayvnc.service
}
17 changes: 17 additions & 0 deletions projects/ROCKNIX/packages/network/wayvnc/system.d/wayvnc.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[Unit]
Description=wayvnc VNC Server
After=sway.service
ConditionPathExists=|/storage/.cache/services/wayvnc.conf

[Service]
Environment=WAYLAND_DISPLAY=wayland-1
Environment=XDG_RUNTIME_DIR=/run/0-runtime-dir
Environment=SWAYSOCK=/run/0-runtime-dir/sway-ipc.0.sock
ExecStart=/usr/bin/wayvnc --render-cursor 0.0.0.0
Restart=on-failure
RestartSec=2
TimeoutStopSec=1s
StartLimitInterval=0

[Install]
WantedBy=multi-user.target
2 changes: 1 addition & 1 deletion projects/ROCKNIX/packages/virtual/network/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PKG_VERSION=""
PKG_LICENSE="various"
PKG_SITE="https://libreelec.tv"
PKG_URL=""
PKG_DEPENDS_TARGET="toolchain connman iwd netbase ethtool openssh iw wireless-regdb rsync tailscale avahi miniupnpc nss-mdns speedtest-cli"
PKG_DEPENDS_TARGET="toolchain connman iwd netbase ethtool openssh iw wireless-regdb rsync tailscale avahi miniupnpc nss-mdns speedtest-cli wayvnc"
PKG_SECTION="virtual"
PKG_LONGDESC="Metapackage for various packages to install network support"

Expand Down