Files
Arch-R/packages/addons/tools/system-tools/package.mk

193 lines
7.3 KiB
Makefile
Raw Normal View History

# SPDX-License-Identifier: GPL-2.0
2018-07-16 20:45:36 +02:00
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
2016-04-25 10:37:15 -07:00
PKG_NAME="system-tools"
2018-05-11 23:22:42 +02:00
PKG_VERSION="1.0"
PKG_REV="3"
2016-04-25 10:37:15 -07:00
PKG_ARCH="any"
PKG_LICENSE="GPL"
2018-05-11 23:22:42 +02:00
PKG_SITE="https://libreelec.tv"
2016-04-25 10:37:15 -07:00
PKG_URL=""
PKG_DEPENDS_TARGET="toolchain"
PKG_SECTION="virtual"
PKG_SHORTDESC="A bundle of system tools and programs"
PKG_LONGDESC="This bundle currently includes 7-zip, autossh, bottom, diffutils, dool, dtach, efibootmgr, encfs, evtest, fdupes, file, getscancodes, hddtemp, hd-idle, hid_mapper, htop, i2c-tools, inotify-tools, jq, libgpiod, lm_sensors, lshw, mc, mmc-utils, mtpfs, nmon, patch, pv, screen, smartmontools, stress-ng, unrar, usb-modeswitch and vim."
2016-04-25 10:37:15 -07:00
PKG_IS_ADDON="yes"
PKG_ADDON_NAME="System Tools"
PKG_ADDON_TYPE="xbmc.python.script"
PKG_DEPENDS_TARGET="toolchain \
7-zip \
2016-04-25 10:37:15 -07:00
autossh \
2021-08-02 23:58:55 +10:00
bottom \
2016-04-25 10:37:15 -07:00
diffutils \
dool \
2016-04-25 10:37:15 -07:00
dtach \
2018-05-11 23:22:42 +02:00
encfs \
2016-04-25 10:37:15 -07:00
evtest \
fdupes \
file \
getscancodes \
hddtemp \
hd-idle \
hid_mapper \
2017-07-06 22:59:44 +02:00
htop \
2016-04-25 10:37:15 -07:00
i2c-tools \
2016-09-05 23:14:29 +02:00
inotify-tools \
2016-04-25 10:37:15 -07:00
jq \
libgpiod \
2016-04-25 10:37:15 -07:00
lm_sensors \
lshw \
2016-09-05 23:14:29 +02:00
mc \
2022-03-01 16:21:37 +01:00
mmc-utils \
2016-04-25 10:37:15 -07:00
mtpfs \
2016-11-23 21:15:08 +01:00
nmon \
2016-04-25 10:37:15 -07:00
patch \
pv \
screen \
2022-03-27 10:26:21 +00:00
sdparm \
2018-05-11 23:22:42 +02:00
smartmontools \
2018-06-24 22:04:04 +02:00
stress-ng \
2016-04-25 10:37:15 -07:00
unrar \
2017-07-06 22:59:36 +02:00
usb-modeswitch \
2020-12-25 16:15:13 +01:00
vim"
2016-04-25 10:37:15 -07:00
if [ "${TARGET_ARCH}" = "x86_64" ]; then
PKG_DEPENDS_TARGET+=" efibootmgr"
if [ "${DEVICE}" = "x11" -o "${DEVICE}" = "Generic-legacy" ]; then
PKG_DEPENDS_TARGET+=" st"
fi
fi
2016-04-25 10:37:15 -07:00
addon() {
mkdir -p ${ADDON_BUILD}/${PKG_ADDON_ID}/{bin,data,lib.private}
2020-06-21 23:09:16 +02:00
# 7-zip
cp -P $(get_install_dir 7-zip)/usr/bin/7zz ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2016-04-25 10:37:15 -07:00
# autossh
cp -P $(get_install_dir autossh)/usr/bin/autossh ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2016-04-25 10:37:15 -07:00
2021-02-13 12:00:23 +00:00
# bottom
cp -P $(get_install_dir bottom)/btm ${ADDON_BUILD}/${PKG_ADDON_ID}/bin 2>/dev/null || :
2016-04-25 10:37:15 -07:00
# diffutils
cp -P $(get_install_dir diffutils)/usr/bin/{cmp,diff,diff3,sdiff} ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2016-04-25 10:37:15 -07:00
# dool
cp -Pa $(get_install_dir dool)/usr/bin/* ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2017-07-06 22:59:38 +02:00
2016-04-25 10:37:15 -07:00
# dtach
cp -P $(get_install_dir dtach)/usr/bin/dtach ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2016-04-25 10:37:15 -07:00
# efibootmgr
cp -P $(get_install_dir efibootmgr)/usr/bin/efibootmgr ${ADDON_BUILD}/${PKG_ADDON_ID}/bin 2>/dev/null || :
2016-04-25 10:37:15 -07:00
2018-05-11 23:22:42 +02:00
# encfs
cp -P $(get_install_dir encfs)/usr/bin/{encfs,encfsctl} ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2018-05-11 23:22:42 +02:00
2016-04-25 10:37:15 -07:00
# evtest
cp -P $(get_install_dir evtest)/usr/bin/evtest ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2016-04-25 10:37:15 -07:00
# fdupes
cp -P $(get_install_dir fdupes)/usr/bin/fdupes ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2016-04-25 10:37:15 -07:00
# file
cp -P $(get_install_dir file)/usr/bin/file ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
cp -P $(get_install_dir file)/usr/share/misc/magic.mgc ${ADDON_BUILD}/${PKG_ADDON_ID}/data
2016-04-25 10:37:15 -07:00
# fuse
cp -P $(get_install_dir fuse)/usr/bin/{fusermount,ulockmgr_server} ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
cp -P $(get_install_dir fuse)/usr/sbin/mount.fuse ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
cp -P $(get_install_dir fuse)/usr/lib/{libfuse.so*,libulockmgr.so*} ${ADDON_BUILD}/${PKG_ADDON_ID}/lib.private
2016-04-25 10:37:15 -07:00
# getscancodes
cp -P $(get_install_dir getscancodes)/usr/bin/getscancodes ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2016-04-25 10:37:15 -07:00
# hddtemp
cp -P $(get_install_dir hddtemp)/usr/sbin/hddtemp ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
cp -P $(get_install_dir hddtemp)/usr/share/misc/hddtemp.db ${ADDON_BUILD}/${PKG_ADDON_ID}/data
2016-04-25 10:37:15 -07:00
# hd-idle
cp -P $(get_install_dir hd-idle)/usr/sbin/hd-idle ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2016-04-25 10:37:15 -07:00
# hid_mapper
cp -P $(get_install_dir hid_mapper)/usr/bin/hid_mapper ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2016-04-25 10:37:15 -07:00
2017-07-06 22:59:44 +02:00
# htop
cp -P $(get_install_dir htop)/usr/bin/htop ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2017-07-06 22:59:44 +02:00
2016-04-25 10:37:15 -07:00
# i2c-tools
cp -P $(get_install_dir i2c-tools)/usr/sbin/{i2cdetect,i2cdump,i2cget,i2cset} ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
cp -P $(get_install_dir i2c-tools)/usr/lib/${PKG_PYTHON_VERSION}/site-packages/smbus.so \
${ADDON_BUILD}/${PKG_ADDON_ID}/lib.private
patchelf --add-rpath '$ORIGIN' ${ADDON_BUILD}/${PKG_ADDON_ID}/lib.private/smbus.so
cp -P $(get_install_dir i2c-tools)/usr/lib/libi2c.so.0.1.1 ${ADDON_BUILD}/${PKG_ADDON_ID}/lib.private/libi2c.so
cp -P $(get_install_dir i2c-tools)/usr/lib/libi2c.so.0.1.1 ${ADDON_BUILD}/${PKG_ADDON_ID}/lib.private/libi2c.so.0
cp -P $(get_install_dir i2c-tools)/usr/lib/libi2c.so.0.1.1 ${ADDON_BUILD}/${PKG_ADDON_ID}/lib.private/libi2c.so.0.1.1
2016-04-25 10:37:15 -07:00
2016-09-05 23:14:29 +02:00
# inotify-tools
cp -P $(get_install_dir inotify-tools)/usr/bin/{inotifywait,inotifywatch} ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2016-09-05 23:14:29 +02:00
2016-04-25 10:37:15 -07:00
# jq
cp -P $(get_install_dir jq)/usr/bin/jq ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
cp -P $(get_install_dir oniguruma)/usr/lib/{libonig.so,libonig.so.5,libonig.so.5.*.*} ${ADDON_BUILD}/${PKG_ADDON_ID}/lib.private
2016-04-25 10:37:15 -07:00
# libgpiod
cp -P $(get_install_dir libgpiod)/usr/bin/{gpiodetect,gpioget,gpioinfo,gpiomon,gpioset} ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2016-04-25 10:37:15 -07:00
# lm_sensors
cp -P $(get_install_dir lm_sensors)/usr/bin/sensors ${ADDON_BUILD}/${PKG_ADDON_ID}/bin 2>/dev/null || :
2016-04-25 10:37:15 -07:00
# lshw
cp -P $(get_install_dir lshw)/usr/sbin/lshw ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2016-04-25 10:37:15 -07:00
2016-09-05 23:14:29 +02:00
# mc
cp -Pa $(get_install_dir mc)/usr/bin/* ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/
cp -Pa $(get_install_dir mc)/storage/.kodi/addons/virtual.system-tools/* ${ADDON_BUILD}/${PKG_ADDON_ID}
2016-09-05 23:14:29 +02:00
2022-03-01 16:21:37 +01:00
# mmc-utils
cp -P $(get_install_dir mmc-utils)/usr/local/bin/mmc ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2016-04-25 10:37:15 -07:00
# mtpfs
cp -P $(get_install_dir mtpfs)/usr/bin/mtpfs ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/
2016-04-25 10:37:15 -07:00
2016-11-23 21:15:08 +01:00
# nmon
cp -P $(get_install_dir nmon)/usr/bin/nmon ${ADDON_BUILD}/${PKG_ADDON_ID}/bin/
2016-11-23 21:15:08 +01:00
2016-04-25 10:37:15 -07:00
# patch
cp -P $(get_install_dir patch)/usr/bin/patch ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2016-04-25 10:37:15 -07:00
# pv
cp -P $(get_install_dir pv)/usr/bin/pv ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2016-04-25 10:37:15 -07:00
# screen
cp -L $(get_install_dir screen)/usr/bin/screen ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2016-04-25 10:37:15 -07:00
2022-03-27 10:26:21 +00:00
# sdparm
cp -P $(get_install_dir sdparm)/usr/bin/sdparm ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2018-05-11 23:22:42 +02:00
# smartmontools
cp -P $(get_install_dir smartmontools)/usr/sbin/smartctl ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2018-05-11 23:22:42 +02:00
2020-12-25 16:15:10 +01:00
# st
cp -P $(get_build_dir st)/st ${ADDON_BUILD}/${PKG_ADDON_ID}/bin 2>/dev/null || :
2020-12-25 16:15:10 +01:00
2018-06-24 22:04:04 +02:00
# stress-ng
cp -P $(get_install_dir stress-ng)/usr/bin/stress-ng ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2018-06-24 22:04:04 +02:00
2016-04-25 10:37:15 -07:00
# unrar
cp -P $(get_install_dir unrar)/usr/bin/unrar ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2016-04-25 10:37:15 -07:00
# usb-modeswitch
cp -P $(get_install_dir usb-modeswitch)/usr/sbin/usb_modeswitch ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
2016-04-25 10:37:15 -07:00
2017-07-06 22:59:36 +02:00
# vim
cp -P $(get_install_dir vim)/usr/bin/vim ${ADDON_BUILD}/${PKG_ADDON_ID}/bin
cp -Pa $(get_install_dir vim)/storage/.kodi/addons/virtual.system-tools/data/vim/ ${ADDON_BUILD}/${PKG_ADDON_ID}/data
scanelf -EET_EXEC -RBF %F ${ADDON_BUILD}/${PKG_ADDON_ID}/bin | \
xargs patchelf --add-rpath '$ORIGIN/../lib.private'
2016-04-25 10:37:15 -07:00
}