build / build (push) Successful in 23m2s
- das-shell 0.3.0: aliases and functions for every interactive bash (/usr/share/das/shell, loaded by /etc/bash/bashrc.d/das-aliases.sh, then the user's ~/.bash_aliases and ~/.bash_functions; off with ~/.config/das/no-aliases). Based on the author's own set, adapted to Void (xbps, nftables, das-update), with fixes (rmhost, netinfo, todo -r, dirsize, extract) and new ones (up, bigfiles, pkgowner, please, serve, weather, cheat, genpass, Docker shortcuts). lsfunc shows bilingual descriptions. Shell tests in tests/test_shell.py. - Names that shadowed commands are gone: gh -> hgrep, mount -> mounts, no install or ed. - README: "Aliases and functions" section; TODO: banner, dashboard service and prompt verified by the author on real hardware. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
62 lines
2.2 KiB
Plaintext
62 lines
2.2 KiB
Plaintext
# Template file for 'das-shell'
|
|
# In-tree package: sources are in files/ (FILESDIR).
|
|
pkgname=das-shell
|
|
version=0.3.0
|
|
revision=1
|
|
create_wrksrc=yes
|
|
hostmakedepends="python3"
|
|
checkdepends="bash"
|
|
depends="bash python3 python3-textual figlet"
|
|
short_desc="Das OS terminal: bash prompt, aliases, dprompt and dbanner (SSH banner)"
|
|
maintainer="Das <anry.das@gmail.com>"
|
|
license="MIT"
|
|
homepage="https://git.das.org.ua/das/Das-OS"
|
|
conf_files="/etc/bash/bashrc.d/das-prompt.sh /etc/bash/bashrc.d/das-aliases.sh
|
|
/etc/profile.d/das-banner.sh"
|
|
make_dirs="/var/cache/das/banner 0755 root root"
|
|
pycompile_dirs="usr/lib/das/python"
|
|
python_version=3
|
|
|
|
do_build() {
|
|
# The stock prompt is the "das" preset turned into bash by the code itself
|
|
PYTHONPATH="${FILESDIR}/python" DAS_SHELL_DATA="${FILESDIR}/share" \
|
|
python3 -m das_shell.cli_prompt show das --script >default-prompt.sh
|
|
}
|
|
|
|
do_check() {
|
|
cd "${FILESDIR}" && PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tests -t .
|
|
}
|
|
|
|
do_install() {
|
|
local f
|
|
vinstall "${FILESDIR}/bashrc.d/das-prompt.sh" 644 etc/bash/bashrc.d
|
|
vinstall "${FILESDIR}/bashrc.d/das-aliases.sh" 644 etc/bash/bashrc.d
|
|
vinstall "${FILESDIR}/shell/aliases.sh" 644 usr/share/das/shell
|
|
vinstall "${FILESDIR}/shell/functions.sh" 644 usr/share/das/shell
|
|
vinstall "${FILESDIR}/profile.d/das-banner.sh" 644 etc/profile.d
|
|
vinstall "${FILESDIR}/prompt-lib.sh" 644 usr/lib/das
|
|
vinstall default-prompt.sh 644 usr/share/das/prompt default.sh
|
|
for f in "${FILESDIR}"/python/das_shell/*.py; do
|
|
vinstall "${f}" 644 usr/lib/das/python/das_shell
|
|
done
|
|
for f in "${FILESDIR}"/share/prompt/presets/*.json; do
|
|
vinstall "${f}" 644 usr/share/das/prompt/presets
|
|
done
|
|
for f in "${FILESDIR}"/share/banner/presets/*.json; do
|
|
vinstall "${f}" 644 usr/share/das/banner/presets
|
|
done
|
|
for f in "${FILESDIR}"/share/banner/art/*.json; do
|
|
vinstall "${f}" 644 usr/share/das/banner/art
|
|
done
|
|
for f in "${FILESDIR}"/share/banner/widgets/*.sh; do
|
|
vinstall "${f}" 755 usr/share/das/banner/widgets
|
|
done
|
|
chmod 644 "${DESTDIR}/usr/share/das/banner/widgets/lib.sh"
|
|
vsv das-banner
|
|
for f in dprompt dbanner; do
|
|
vbin "${FILESDIR}/bin/${f}"
|
|
vcompletion "${FILESDIR}/${f}.bash-completion" bash ${f}
|
|
done
|
|
vlicense "${FILESDIR}/LICENSE"
|
|
}
|