pthbs

Packaging Through Hashed Build Scripts
git clone https://ccx.te2000.cz/git/pthbs
Log | Files | Refs | Submodules | README

commit d86f91b71925dd42c79143e5d7db0700202391c9
parent 0242179b216907635b547f863708773c3e98ce57
Author: ccx <ccx@te2000.cz>
Date:   Sun, 17 Mar 2024 17:35:53 +0000

zsh config, xorg container services

Diffstat:
M.gitmodules | 3+++
Mpackages/default.environment | 1+
Apackages/system-config-zsh | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asources/system-config-zsh | 1+
Mtemplates/pkg/default.environment | 1+
Atemplates/pkg/system-config-zsh | 24++++++++++++++++++++++++
6 files changed, 102 insertions(+), 0 deletions(-)

diff --git a/.gitmodules b/.gitmodules @@ -89,3 +89,6 @@ [submodule "sources/tcb"] path = sources/tcb url = https://github.com/openwall/tcb +[submodule "sources/system-config-zsh"] + path = sources/system-config-zsh + url = ./sources/system-config-zsh diff --git a/packages/default.environment b/packages/default.environment @@ -2,6 +2,7 @@ #+system-config-rc.f5e2185bd14499a3355fc29957a75a6a3e750a5888654daf90b105c74b0e9964 #+system-config-scripts.ac300ce9214b7e302ac630c3335cd537000ec030b409ee951e53c563d9f71891 #+system-config-init.c0dc2ae81e74f4ce83ecc0cf889acf508904a856fe0e0819ae041ffca8ed642c +#+system-config-zsh.1f09219345bc5468ae634bec90576c270cf60dc0b7c71ebaecb6d61d019072d9 #+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9 #+gnu-make.782c9e6625fd7420e2cd38b847afed19db3b3844cae8a0426a0dbf73e10d78e5 #+musl-cross-make.65f98305f5666435bf0c6b9ccedffae2179ff1b3286752756886f760cf7771d2 diff --git a/packages/system-config-zsh b/packages/system-config-zsh @@ -0,0 +1,72 @@ +#!/usr/bin/env pthbs-build +#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9 +#+zsh.762204e14953017be79e356d4bf9f7681625a750ecc951f3510bf144ea7b51bb +#@git:f5a8b82b914ca696bbe41453827929bc772f3332:system-config-zsh + +def_prefix() { + prefix=/versions/$pthbs_package +} +def_dest() { + dest=${pthbs_destdir%/}//versions/$pthbs_package +} +def_prefix +def_dest + +cd 'system-config-zsh' + +mkdir -p "$dest/zsh" +mv -v zsh-functions "$dest/zsh/site-functions" + +cd "$pthbs_destdir/versions/$pthbs_package" +find -type d -o -print | awk -F/ ' +BEGIN { +} + +function r1(s) { + sub("^[.]/[^/]*", ".", s) + return s +} +function s1(repl, s) { + sub("^[.]/[^/]*", "./"repl, s) + return s +} +function link(src) { + x[$0]=0 + printf "%s\t%s\n", $0, src + printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" +} +$1!="."{exit 1} + + +$2 == "zsh" { link($0); next } +$2 == "vimfiles" { link($0); next } +$2 == "command" { link($0); next } +$2 == "bin" { link(s1("command", $0)); next } + +$2 == "library.so" { link($0); next } +$2 == "library" { link($0); next } +$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } +$2 == "lib" && $NF ~ /\.so(|\..*)$/ { link(s1("library.so", $0)); next } + +$2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next } + +$2 == "man" { link($0); next } +$2 == "info" { link($0); next } +$2 == "doc" { link($0); next } +$2 == "icons" { link($0); next } +$2 == "terminfo" { link($0); next } +$2 == "data" { link($0); next } +$2 == "include" { link($0); next } + +{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } + +END { + for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } + for(fname in x) { + if(x[fname]) { + printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" + exit 3 + } + } +}' >.install-links.new +mv .install-links.new .install-links diff --git a/sources/system-config-zsh b/sources/system-config-zsh @@ -0,0 +1 @@ +Subproject commit f5a8b82b914ca696bbe41453827929bc772f3332 diff --git a/templates/pkg/default.environment b/templates/pkg/default.environment @@ -2,5 +2,6 @@ #+{{pkg_install_name("system-config-rc")}} #+{{pkg_install_name("system-config-scripts")}} #+{{pkg_install_name("system-config-init")}} +#+{{pkg_install_name("system-config-zsh")}} {% include "pkg/userspace.environment" %}{# {% include "pkg/kernel.environment" %} #} diff --git a/templates/pkg/system-config-zsh b/templates/pkg/system-config-zsh @@ -0,0 +1,24 @@ +{% extends "genlinks" %} +{%- block script %} +#+{{pkg_install_name("busybox")}} +#+{{pkg_install_name("zsh")}} +#@git:{{submodule.current[name]}}:{{name}} + +{% include "functions/vars" %} +def_prefix +def_dest + +cd '{{name}}' + +mkdir -p "$dest/zsh" +mv -v zsh-functions "$dest/zsh/site-functions" + +{%- block extra_script %} +{%- endblock %} +{% endblock %} +{% block rules %} +{%- block extra_rules %} +{%- endblock %} +$2 == "zsh" { link($0); next } +$2 == "vimfiles" { link($0); next } +{% endblock -%}