From e77535b362933895c8634b41ed41efed5951e4a2 Mon Sep 17 00:00:00 2001 From: emmett1 Date: Mon, 22 Jun 2026 22:14:09 +0800 Subject: updated buildsite.sh and installation doc --- docs/01-install.md | 47 +++++++++++++++++++++-------------------------- utils/buildsite.sh | 8 +++++--- 2 files changed, 26 insertions(+), 29 deletions(-) diff --git a/docs/01-install.md b/docs/01-install.md index d032ad51..3c0a301d 100644 --- a/docs/01-install.md +++ b/docs/01-install.md @@ -58,22 +58,17 @@ Once we have the repositories cloned, we need to configure `apkg`. `apkg` is Ali First, we set `CFLAGS` and `CXXFLAGS`. Alice base packages are built using `-O3 -march=x86-64 -pipe`. You can use these settings or change them to your preference. ``` -# echo 'export CFLAGS="-O3 -march=x86-64 -pipe"' >> /etc/profile.d/apkg.sh +# export CFLAGS="-O3 -march=x86-64 -pipe" ``` And use whats in `CFLAGS` for `CXXFLAGS`. ``` -# echo 'export CXXFLAGS="$CFLAGS"' >> /etc/profile.d/apkg.sh +# export CXXFLAGS="$CFLAGS" ``` Next set `MAKEFLAGS`. I will use `6` for my `8 threads` machine. ``` -# echo 'export MAKEFLAGS="-j6"' >> /etc/profile.d/apkg.sh -``` - -I'm also going to set `NINJAJOBS` here. Without it, `ninja` will use all threads of your machine when compiling. -``` -# echo 'export NINJAJOBS="6"' >> /etc/profile.d/apkg.sh +# export MAKEFLAGS="-j6" ``` Next, we need to set the package's build scripts path (I'll call it `package repos`) so `apkg` can find them. The `APKG_REPO` variable can accept multiple values for multiple `package repos`. @@ -82,17 +77,17 @@ Alice provides two (2) `package repos` (at the time of this writing): `core` and I'm gonna use directory `/var/lib/repos/core` and `/var/lib/repos/extra` for `core` and `extra` repos respectively. ``` -# echo 'export APKG_REPO="/var/lib/repos/core /var/lib/repos/extra"' >> /etc/profile.d/apkg.sh +# export APKG_REPO="/var/lib/repos/core /var/lib/repos/extra" ``` -You can also create a directory the community repo. -> NOTE: The community repo is not held to the same standards as the official repos. +You can also add `community` repo too. +> NOTE: The `community` repo is not held to the same standards as the official repos. > Additionally all repo paths must be declared in the APKG_REPO variable, separated by a single space. ``` -# echo 'export APKG_REPO="/var/lib/repos/core /var/lib/repos/extra /var/lib/repos/community"' >> /etc/profile.d/apkg.sh +# export APKG_REPO="/var/lib/repos/core /var/lib/repos/extra /var/lib/repos/community" ``` -Next, we will set up directories for `packages`, `sources`, and `work`. By default, these directories are inside the package template, but we will change them to `/var/cache/pkg`, `/var/cache/src`, and `/var/cache/work` respectively. You can change these to any location where you want to store these files. +Next, we will set up directories for `packages`, `sources`, and `work`. By default, these directories are inside the package port, but we will change them to `/var/cache/pkg`, `/var/cache/src`, and `/var/cache/work` respectively. You can change these to any location where you want to store these files. First, create the directories. ``` @@ -101,30 +96,30 @@ First, create the directories. # mkdir -p /var/cache/work ``` -Then add these paths to `/etc/profile.d/apkg.sh`. +export These configuration environment ``` -# echo 'export APKG_PACKAGE_DIR=/var/cache/pkg' >> /etc/profile.d/apkg.sh -# echo 'export APKG_SOURCE_DIR=/var/cache/src' >> /etc/profile.d/apkg.sh -# echo 'export APKG_WORK_DIR=/var/cache/work' >> /etc/profile.d/apkg.sh +# export APKG_PACKAGE_DIR=/var/cache/pkg +# export APKG_SOURCE_DIR=/var/cache/src +# export APKG_WORK_DIR=/var/cache/work ``` Configure reposync -------------------- -`reposync` is a tool to sync package templates from git repositories. Like `apkg`, `reposync` configuration is environment-based. Add remote repos for `core` and `extra` to `/etc/profile.d/reposync.sh` (system-wide) or `~/.profile` (per-user). The format is `||`. +`reposync` is a tool to sync package ports from git repositories. Like `apkg`, `reposync` configuration is environment-based. Add remote repos for `core` and `extra` to `/etc/profile.d/reposync.sh` (system-wide) or `~/.profile` (per-user). The format is `||`. ``` -# echo 'export REPOSYNC_CORE="https://codeberg.org/emmett1/alicelinux|core|/var/lib/repos/core"' >> /etc/profile.d/reposync.sh -# echo 'export REPOSYNC_EXTRA="https://codeberg.org/emmett1/alicelinux|extra|/var/lib/repos/extra"' >> /etc/profile.d/reposync.sh +# export REPOSYNC_CORE="https://codeberg.org/emmett1/alicelinux|core|/var/lib/repos/core" +# export REPOSYNC_EXTRA="https://codeberg.org/emmett1/alicelinux|extra|/var/lib/repos/extra" ``` -If you also want the community repo, add it as well. -> NOTE: The community repo is not held to the same standards as the official repos. +If you also want the `community` repo, add it as well. +> NOTE: The `community` repo is not held to the same standards as the official repos. ``` -# echo 'export REPOSYNC_COMMUNITY="https://codeberg.org/emmett1/alicelinux|community|/var/lib/repos/community"' >> /etc/profile.d/reposync.sh +# export REPOSYNC_COMMUNITY="https://codeberg.org/emmett1/alicelinux|community|/var/lib/repos/community" ``` -Now run `reposync` to sync latest package templates. +Now run `reposync` to sync latest ports. ``` # reposync ``` @@ -138,7 +133,7 @@ swaylock sway ``` -Lets combine with `-p` flags to show path or package templates. +Lets combine with `-p` flags to show path or package port. ``` # apkg -p $(apkg -s sway) /var/lib/repos/extra/sway @@ -156,7 +151,7 @@ On the first install, we should upgrade the system first. Before we do, install development packages first. ``` -# apkg -I meson cmake pkgconf libtool automake perl +# apkg -I muon cmake pkgconf libtool automake perl python ``` > NOTE: use uppercase 'i' for solve dependencies, lowercase 'i' without solve dependencies. diff --git a/utils/buildsite.sh b/utils/buildsite.sh index c5d8782f..7297dbb2 100755 --- a/utils/buildsite.sh +++ b/utils/buildsite.sh @@ -361,7 +361,8 @@ for f in docs/*.md; do case $f in */readme.md|*/index.md) continue;; esac title=$(head -n1 "$f" | sed "s/^#* *//") file=${f##*/} - echo "- [$title](./${file%.md}.html)" >> docs/index.md + file_no_num=$(printf '%s' "$file" | sed 's/^[0-9][0-9]-//') + echo "- [$title](./${file_no_num%.md}.html)" >> docs/index.md done cat >> docs/index.md << 'EOF' @@ -373,6 +374,7 @@ doc_files=$(ls docs/*.md 2>/dev/null | sort | grep -v /readme.md | grep -v /inde find . -type f -name "*.md" ! -path './public/*' | sed 's|^\./||' | while IFS= read -r i; do dir=${i%/*} file=${i##*/} + outfile=$(printf '%s' "$file" | sed 's/^[0-9][0-9]-//') title=${dir##*/} [ "$dir" = "$file" ] && { title=home; dir= @@ -388,7 +390,7 @@ find . -type f -name "*.md" ! -path './public/*' | sed 's|^\./||' | while IFS= r next=$(printf '%s\n' "$doc_files" | grep -FA1 "$i" | tail -n1) if [ "$next" ] && [ "$next" != "$i" ]; then next_title=$(head -n1 "$next" | sed 's/^#* *//') - next_html=${next##*/} + next_html=$(printf '%s' "${next##*/}" | sed 's/^[0-9][0-9]-//') printf '\n\n' "${next_html%.md}.html" "$next_title" else printf '\n<- back to docs\n' @@ -398,7 +400,7 @@ find . -type f -name "*.md" ! -path './public/*' | sed 's|^\./||' | while IFS= r ;; esac cat files/footer - } > "public/${i%.md}.html" + } > "public/$dir/${outfile%.md}.html" done # move readme.html to index.html -- cgit v1.2.3