entware: add new package

This commit is contained in:
spycat88
2025-08-17 07:32:22 +01:00
parent 185f21445d
commit 3335fc7b76
5 changed files with 68 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2024-present ROCKNIX (https://github.com/ROCKNIX)
PKG_NAME="entware"
PKG_VERSION=""
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/Entware/Entware"
PKG_URL=""
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="entware: A software repository that offers various software programs that can be installed on your device"
PKG_TOOLCHAIN="manual"
post_install() {
mkdir -p ${INSTALL}/usr/sbin
cp -P ${PKG_DIR}/scripts/installentware ${INSTALL}/usr/sbin
enable_service entware.service
}

View File

@@ -0,0 +1,10 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2024-present ROCKNIX (https://github.com/ROCKNIX)
case $- in
*i*)
[ -f /opt/etc/profile ] && . /opt/etc/profile
;;
*)
;;
esac

View File

@@ -0,0 +1,20 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2024-present ROCKNIX (https://github.com/ROCKNIX)
export PATH=/opt/bin:/opt/sbin:$PATH
[ ! -d /storage/.opt ] && mkdir -p /storage/.opt
if [ ! -f /opt/bin/opkg ]; then
wget -O - http://bin.entware.net/aarch64-k3.10/installer/generic.sh | /bin/sh
echo ""
read -p "Would you like to reboot now to finish installation (recommended) [y/N]? " choice
case "$choice" in
[yY]*)
reboot
;;
esac
else
echo "Entware is already installed."
fi

View File

@@ -0,0 +1,15 @@
[Unit]
Description=Entware service
After=systemd-tmpfiles-setup.service network-online.target
Before=kodi.service
Requires=network-online.target
ConditionPathExists=/opt/etc/init.d/rc.unslung
[Service]
Type=oneshot
ExecStart=/opt/etc/init.d/rc.unslung start
ExecStop=/opt/etc/init.d/rc.unslung stop
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

View File

@@ -102,4 +102,9 @@ fi
# modules packages
[ "${MODULES_PKG}" = "yes" ] && PKG_DEPENDS_TARGET+=" modules"
# Entware support
mkdir -p ${INSTALL}
ln -sf /storage/.opt ${INSTALL}/opt
PKG_DEPENDS_TARGET+=" entware"
true