mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
entware: add new package
This commit is contained in:
18
projects/ROCKNIX/packages/tools/entware/package.mk
Normal file
18
projects/ROCKNIX/packages/tools/entware/package.mk
Normal 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
|
||||
}
|
||||
@@ -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
|
||||
20
projects/ROCKNIX/packages/tools/entware/scripts/installentware
Executable file
20
projects/ROCKNIX/packages/tools/entware/scripts/installentware
Executable 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
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user