From 017ec72df257c209d2dcb2e7671eba898c4e37cb Mon Sep 17 00:00:00 2001 From: mobinmob Date: Fri, 16 Aug 2024 21:47:59 +0300 Subject: /docs : initial documentation commit. --- doc/apkg.conf.md | 30 ++++++++++++++++++++++++++++++ doc/apkg.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/revdep.md | 22 ++++++++++++++++++++++ 3 files changed, 108 insertions(+) create mode 100644 doc/apkg.conf.md create mode 100644 doc/apkg.md create mode 100644 doc/revdep.md diff --git a/doc/apkg.conf.md b/doc/apkg.conf.md new file mode 100644 index 0000000..83f4277 --- /dev/null +++ b/doc/apkg.conf.md @@ -0,0 +1,30 @@ +# NAME + +**apkg.conf** - configuration file for apkg + + +# DESCRIPTION +**apkg.conf** is the configuration file for the **apkg** package manager for the alice linux distribution. +It resides by default under /etc in an alice linux installation. +The contends are sourced by the **apkg** script and are in the posix shell *key="value"* format. + + +# CONFIGURATION KEYS + +- **APKG_NOPROMPT** If set, it enabled non-interactive use by disabling user confirmation prompt. +- **APKG_PACKAGE_DIR** Directory where the compiled packages will reside. +- **APKG_SOURCE_DIR** Directory that will hold the downloaded sources. +- **APKG_WORK_DIR** Directory where the actuall building proccess will take place. This happens in subdirectories which are cleaned after completion. +- **APKG_LOG** If set, it enables the creation of a log for the program output. +- **export CFLAGS=""** Default are *-O3 -march=x86-64 -pipe* +- **export CXXFLAGS="$CFLAGS"** +- **export NINJAJOBS="<-x>"** Replace <-x> with the number of jobs the ninja build system with use. Without this it will use the maximum amount of threads the processor suports. +- **export MAKEFLAGS="-jx"** Replace with the number of jobs the make build system with use. + +# BUGS + +**apkg** is in a working stage but also under heavy development. Please report and bugs/issues in the project issue tracker: https://codeberg.org/emmett1/autils/issues + +# AUTHORS +emmett1 Author of the program and creator of alice linux. +mobinmob Author of the man page. diff --git a/doc/apkg.md b/doc/apkg.md new file mode 100644 index 0000000..e3dbe57 --- /dev/null +++ b/doc/apkg.md @@ -0,0 +1,56 @@ +# NAME + +**apkg** - package building tool and package manager for alice linux + +# SYNOPSIS + +**apkg** [-i] [-I] [-d] [-D] [-j] [-u] [-r] [-t] [-U ] [-f] [-o] [-p] [-s] [-h] [*pkg(s)*] + +# DESCRIPTION + +**apkg** is the package build tool and package installer, along with **spm** for the alice linux destribution. +It is written in posix shell with the goal to be simple and effective. It can consume package building templates in the abuild format +and automate the building and installing of packages. + +# OPTIONS + + +Arguments for apkg are as follows: + +- **-h** Prints help. +- **-i** ** Installs package(s) without taking dependencies into account. Building will fail if the dependencies are not present in the system. +- **-I** ** Installs package(s) with dependencies. +- **-d** ** Lists package dependencies +- **-D** ** List all dependencies for package(s) +- **-j** ** List all reverse dependencies for the package (packages that depend on it). + + + +# EXAMPLES + +# ENVIRONMENT VARIABLES + +- *APKG_ROOT* Overrides default root location (/), where sw is installed +- *APKG_CONF* Overrides default location for the configuration file apkg.conf. The default is under /etc on an installed alice linux system. +- *APKG_NOPROMPT* If set, it enabled non-interactive use by disabling user confirmation prompt. +- *APKG_REPO* Double-quoted, space-seperated list for the local directories that contain build templates. +- *APKG_PACKAGE_DIR* Directory where the compiled packages will reside. +- *APKG_SOURCE_DIR* Directory that will hold the downloaded sources. +- *APKG_WORK_DIR* Directory where the actuall building proccess will take place. This happens in subdirectories which are cleaned after completion. +- *APKG_LOG* If set, it enables the creation of a log for the program output. + +**Note:** Usually, APKG_REPO, APKG_PACKAGE_DIR, APKG_SOURCE_DIR and APKG_WORK_DIR are declared in the apkg.conf configuration file. For more information, please see apkg.conf(5). + +# FILES + +- **apkg.conf(5)** is the default configuration file, it resides by default under /etc. +- **abuild** is the name of the package templates that apkg uses, along with relevant files in order to +build and installed packages. For example, one can look to the alice linux repos, under [alicelinux/repos at main - emmett1/alicelinux - Codeberg.org](https://codeberg.org/emmett1/alicelinux/src/branch/main/repos) + +# BUGS + +**apkg** is in a working stage but also under heavy development. Please report and bugs/issues in the project issue tracker: https://codeberg.org/emmett1/autils/issues + +# AUTHORS +emmett1 Author of the program and creator of alice linux. +mobinmob Author of the man page. diff --git a/doc/revdep.md b/doc/revdep.md new file mode 100644 index 0000000..be1bdf2 --- /dev/null +++ b/doc/revdep.md @@ -0,0 +1,22 @@ +# NAME + +**revdep** - utility to discover and rebuild reverse deps + + +# DESCRIPTION +**revdep** is a utility inspired by the gentoo program revdep-rebuild. It is written in posix shell and +it can discover programs that need to be rebuild after library upgrades or are missing libraries. +It should probably run after any big upgrade, especially those that feature lib version bumps. + + +# OPTIONS +- **-h** Show program help. +- **-v** Be verbose in the operation. +- +# BUGS + +**apkg** is in a working stage but also under heavy development. Please report and bugs/issues in the project issue tracker: https://codeberg.org/emmett1/autils/issues + +# AUTHORS +emmett1 Author of the program and creator of alice linux. +mobinmob Author of the man page. -- cgit v1.2.3 From fe255c2008487f41d3397c1a9c9cd952a5b84d75 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Sat, 17 Aug 2024 18:41:33 +0300 Subject: /doc : adding corrections by @AngMits. https://codeberg.org/AngMits --- doc/apkg.conf.md | 10 +++++----- doc/apkg.md | 22 ++++++++++------------ doc/revdep.md | 11 ++++++----- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/doc/apkg.conf.md b/doc/apkg.conf.md index 83f4277..6623016 100644 --- a/doc/apkg.conf.md +++ b/doc/apkg.conf.md @@ -2,19 +2,18 @@ **apkg.conf** - configuration file for apkg - # DESCRIPTION + **apkg.conf** is the configuration file for the **apkg** package manager for the alice linux distribution. It resides by default under /etc in an alice linux installation. -The contends are sourced by the **apkg** script and are in the posix shell *key="value"* format. - +The contents are sourced by the **apkg** script and are in the posix shell *key="value"* format. # CONFIGURATION KEYS -- **APKG_NOPROMPT** If set, it enabled non-interactive use by disabling user confirmation prompt. +- **APKG_NOPROMPT** If set, it enables non-interactive use by disabling user confirmation prompt. - **APKG_PACKAGE_DIR** Directory where the compiled packages will reside. - **APKG_SOURCE_DIR** Directory that will hold the downloaded sources. -- **APKG_WORK_DIR** Directory where the actuall building proccess will take place. This happens in subdirectories which are cleaned after completion. +- **APKG_WORK_DIR** Directory where the actual building process will take place. This happens in subdirectories which are cleaned after completion. - **APKG_LOG** If set, it enables the creation of a log for the program output. - **export CFLAGS=""** Default are *-O3 -march=x86-64 -pipe* - **export CXXFLAGS="$CFLAGS"** @@ -26,5 +25,6 @@ The contends are sourced by the **apkg** script and are in the posix shell *key= **apkg** is in a working stage but also under heavy development. Please report and bugs/issues in the project issue tracker: https://codeberg.org/emmett1/autils/issues # AUTHORS + emmett1 Author of the program and creator of alice linux. mobinmob Author of the man page. diff --git a/doc/apkg.md b/doc/apkg.md index e3dbe57..45d5604 100644 --- a/doc/apkg.md +++ b/doc/apkg.md @@ -3,29 +3,26 @@ **apkg** - package building tool and package manager for alice linux # SYNOPSIS - + **apkg** [-i] [-I] [-d] [-D] [-j] [-u] [-r] [-t] [-U ] [-f] [-o] [-p] [-s] [-h] [*pkg(s)*] - + # DESCRIPTION - -**apkg** is the package build tool and package installer, along with **spm** for the alice linux destribution. + +**apkg** is the package build tool and package installer, along with **spm** for the alice linux distribution. It is written in posix shell with the goal to be simple and effective. It can consume package building templates in the abuild format and automate the building and installing of packages. - + # OPTIONS - Arguments for apkg are as follows: - + - **-h** Prints help. - **-i** ** Installs package(s) without taking dependencies into account. Building will fail if the dependencies are not present in the system. - **-I** ** Installs package(s) with dependencies. - **-d** ** Lists package dependencies - **-D** ** List all dependencies for package(s) - **-j** ** List all reverse dependencies for the package (packages that depend on it). - - - + # EXAMPLES # ENVIRONMENT VARIABLES @@ -33,10 +30,10 @@ Arguments for apkg are as follows: - *APKG_ROOT* Overrides default root location (/), where sw is installed - *APKG_CONF* Overrides default location for the configuration file apkg.conf. The default is under /etc on an installed alice linux system. - *APKG_NOPROMPT* If set, it enabled non-interactive use by disabling user confirmation prompt. -- *APKG_REPO* Double-quoted, space-seperated list for the local directories that contain build templates. +- *APKG_REPO* Double-quoted, space-separated list for the local directories that contain build templates. - *APKG_PACKAGE_DIR* Directory where the compiled packages will reside. - *APKG_SOURCE_DIR* Directory that will hold the downloaded sources. -- *APKG_WORK_DIR* Directory where the actuall building proccess will take place. This happens in subdirectories which are cleaned after completion. +- *APKG_WORK_DIR* Directory where the actual building process will take place. This happens in subdirectories which are cleaned after completion. - *APKG_LOG* If set, it enables the creation of a log for the program output. **Note:** Usually, APKG_REPO, APKG_PACKAGE_DIR, APKG_SOURCE_DIR and APKG_WORK_DIR are declared in the apkg.conf configuration file. For more information, please see apkg.conf(5). @@ -52,5 +49,6 @@ build and installed packages. For example, one can look to the alice linux repos **apkg** is in a working stage but also under heavy development. Please report and bugs/issues in the project issue tracker: https://codeberg.org/emmett1/autils/issues # AUTHORS + emmett1 Author of the program and creator of alice linux. mobinmob Author of the man page. diff --git a/doc/revdep.md b/doc/revdep.md index be1bdf2..44eef7a 100644 --- a/doc/revdep.md +++ b/doc/revdep.md @@ -1,22 +1,23 @@ # NAME **revdep** - utility to discover and rebuild reverse deps - # DESCRIPTION + **revdep** is a utility inspired by the gentoo program revdep-rebuild. It is written in posix shell and -it can discover programs that need to be rebuild after library upgrades or are missing libraries. +it can discover programs that need to be rebuilt after library upgrades or are missing libraries. It should probably run after any big upgrade, especially those that feature lib version bumps. - # OPTIONS + - **-h** Show program help. -- **-v** Be verbose in the operation. -- +- **-v** Verbose output of the operation. + # BUGS **apkg** is in a working stage but also under heavy development. Please report and bugs/issues in the project issue tracker: https://codeberg.org/emmett1/autils/issues # AUTHORS + emmett1 Author of the program and creator of alice linux. mobinmob Author of the man page. -- cgit v1.2.3 From 547a2fe7eebdddca691c2be312d6704772cf8f89 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Sat, 17 Aug 2024 19:39:15 +0300 Subject: /doc: fixes and additions. --- doc/apkg.conf.md | 44 +++++++++++++++++++++++++++++--------------- doc/apkg.md | 50 +++++++++++++++++++++++++++++++++----------------- doc/revdep.md | 2 +- 3 files changed, 63 insertions(+), 33 deletions(-) diff --git a/doc/apkg.conf.md b/doc/apkg.conf.md index 6623016..b3b4647 100644 --- a/doc/apkg.conf.md +++ b/doc/apkg.conf.md @@ -5,26 +5,40 @@ # DESCRIPTION **apkg.conf** is the configuration file for the **apkg** package manager for the alice linux distribution. -It resides by default under /etc in an alice linux installation. -The contents are sourced by the **apkg** script and are in the posix shell *key="value"* format. +It resides by default under `/etc` in an alice linux installation. +The contents are sourced by the **apkg** program and are in the posix shell `key="value"` format. # CONFIGURATION KEYS -- **APKG_NOPROMPT** If set, it enables non-interactive use by disabling user confirmation prompt. -- **APKG_PACKAGE_DIR** Directory where the compiled packages will reside. -- **APKG_SOURCE_DIR** Directory that will hold the downloaded sources. -- **APKG_WORK_DIR** Directory where the actual building process will take place. This happens in subdirectories which are cleaned after completion. -- **APKG_LOG** If set, it enables the creation of a log for the program output. -- **export CFLAGS=""** Default are *-O3 -march=x86-64 -pipe* -- **export CXXFLAGS="$CFLAGS"** -- **export NINJAJOBS="<-x>"** Replace <-x> with the number of jobs the ninja build system with use. Without this it will use the maximum amount of threads the processor suports. -- **export MAKEFLAGS="-jx"** Replace with the number of jobs the make build system with use. - -# BUGS - -**apkg** is in a working stage but also under heavy development. Please report and bugs/issues in the project issue tracker: https://codeberg.org/emmett1/autils/issues +- `APKG_NOPROMPT` If set, it enables non-interactive use by disabling user confirmation prompt. +- `APKG_PACKAGE_DIR` Directory where the compiled packages will reside. +- `APKG_SOURCE_DIR` Directory that will hold the downloaded sources. +- `APKG_WORK_DIR` Directory where the actual building process will take place. This happens in subdirectories which are cleaned after completion. +- `APKG_LOG` If set, it enables the creation of a log for the program output. +- `export CFLAGS=""` Default are *-O3 -march=x86-64 -pipe* +- `export CXXFLAGS="$CFLAGS"` +- `export NINJAJOBS="<-x>"` Replace <-x> with the number of jobs the ninja build system with use. Without this it will use the maximum amount of threads the processor suports. +- `export MAKEFLAGS="-jx"` Replace with the number of jobs the make build system with use. + +EXAMPLES + +``` +### example of a valid apkg.conf ### +export CFLAGS="-O3 -march=x86-64 -pipe" +export CXXFLAGS="$CFLAGS" +export MAKEFLAGS="-j12" +export NINJAJOBS="12" +APKG_REPO="/var/lib/alicelinux/repos/core /var/lib/alicelinux/repos/extra /var/lib/alicelinux/repos/xorg /var/lib/alicelinux/repos/wayland" +APKG_PACKAGE_DIR=/var/cache/pkg +APKG_SOURCE_DIR=/var/cache/src +APKG_WORK_DIR=/var/cache/work +``` # AUTHORS emmett1 Author of the program and creator of alice linux. mobinmob Author of the man page. + +# REPORTING BUGS + +**apkg** is in a working stage but also under heavy development. Please report and bugs/issues in the project issue tracker: https://codeberg.org/emmett1/autils/issues \ No newline at end of file diff --git a/doc/apkg.md b/doc/apkg.md index 45d5604..cc844c3 100644 --- a/doc/apkg.md +++ b/doc/apkg.md @@ -16,25 +16,31 @@ and automate the building and installing of packages. Arguments for apkg are as follows: -- **-h** Prints help. -- **-i** ** Installs package(s) without taking dependencies into account. Building will fail if the dependencies are not present in the system. -- **-I** ** Installs package(s) with dependencies. -- **-d** ** Lists package dependencies +- **-h** Print help. +- **-i** ** Install package(s) without taking dependencies into account. Building will fail if the dependencies are not present in the system. +- **-I** ** Install package(s) with dependencies. +- **-d** ** List only direct package dependencies - **-D** ** List all dependencies for package(s) - **-j** ** List all reverse dependencies for the package (packages that depend on it). - -# EXAMPLES +- **-u** ** Upgrade package(s) +- **-r** ** Remove package(s) +- **-t** ** Run scripts for package(s) that update cache or dbs (mime, font cache e.t.c) +- **-U** Update system +- **-f** Force rebuild a package. +- **-o** ** Only download source for package(s), do not build and install +- **-p** ** Print full path to the package build template directory +- **-s** ** Search for packages # ENVIRONMENT VARIABLES -- *APKG_ROOT* Overrides default root location (/), where sw is installed -- *APKG_CONF* Overrides default location for the configuration file apkg.conf. The default is under /etc on an installed alice linux system. -- *APKG_NOPROMPT* If set, it enabled non-interactive use by disabling user confirmation prompt. -- *APKG_REPO* Double-quoted, space-separated list for the local directories that contain build templates. -- *APKG_PACKAGE_DIR* Directory where the compiled packages will reside. -- *APKG_SOURCE_DIR* Directory that will hold the downloaded sources. -- *APKG_WORK_DIR* Directory where the actual building process will take place. This happens in subdirectories which are cleaned after completion. -- *APKG_LOG* If set, it enables the creation of a log for the program output. +- `APKG_ROOT` Overrides default root location (/), where sw is installed +- `APKG_CONF` Overrides default location for the configuration file apkg.conf. The default is under /etc on an installed alice linux system. +- `APKG_NOPROMPT` If set, it enabled non-interactive use by disabling user confirmation prompt. +- `APKG_REPO` Double-quoted, space-separated list for the local directories that contain build templates. +- `APKG_PACKAGE_DIR` Directory where the compiled packages will reside. +- `APKG_SOURCE_DIR` Directory that will hold the downloaded sources. +- `APKG_WORK_DIR` Directory where the actual building process will take place. This happens in subdirectories which are cleaned after completion. +- `APKG_LOG` If set, it enables the creation of a log for the program output. **Note:** Usually, APKG_REPO, APKG_PACKAGE_DIR, APKG_SOURCE_DIR and APKG_WORK_DIR are declared in the apkg.conf configuration file. For more information, please see apkg.conf(5). @@ -42,13 +48,23 @@ Arguments for apkg are as follows: - **apkg.conf(5)** is the default configuration file, it resides by default under /etc. - **abuild** is the name of the package templates that apkg uses, along with relevant files in order to -build and installed packages. For example, one can look to the alice linux repos, under [alicelinux/repos at main - emmett1/alicelinux - Codeberg.org](https://codeberg.org/emmett1/alicelinux/src/branch/main/repos) +build and installed packages. For example, one can look to the alice linux repos, under https://codeberg.org/emmett1/alicelinux/src/branch/main/repos -# BUGS +# EXAMPLES -**apkg** is in a working stage but also under heavy development. Please report and bugs/issues in the project issue tracker: https://codeberg.org/emmett1/autils/issues +`apkg -i linux` - Install the *linux* package + +`apkg -f jupp` - Force rebuild the *jupp* package. If someone tries with just `-i`, `apkg` will produce the following message +if the package is already installed: `[...] Package 'jupp' already installed.` + +`apkg -s icon` - Search for packages names that contain "icon", it will produce a list with one +package per line. # AUTHORS emmett1 Author of the program and creator of alice linux. mobinmob Author of the man page. + +# REPORTING BUGS + +**apkg** is in a working stage but also under heavy development. Please report and bugs/issues in the project issue tracker: https://codeberg.org/emmett1/autils/issues diff --git a/doc/revdep.md b/doc/revdep.md index 44eef7a..fd50104 100644 --- a/doc/revdep.md +++ b/doc/revdep.md @@ -13,7 +13,7 @@ It should probably run after any big upgrade, especially those that feature lib - **-h** Show program help. - **-v** Verbose output of the operation. -# BUGS +# REPORTING BUGS **apkg** is in a working stage but also under heavy development. Please report and bugs/issues in the project issue tracker: https://codeberg.org/emmett1/autils/issues -- cgit v1.2.3 From 60e1e719a99d2197d3a080d3a4907d59cb45f079 Mon Sep 17 00:00:00 2001 From: mobinmob Date: Sat, 17 Aug 2024 19:40:15 +0300 Subject: add make-man.sh Derived from the script for obarun, written by Eric Vidal. --- make-man.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 make-man.sh diff --git a/make-man.sh b/make-man.sh new file mode 100755 index 0000000..4ed2336 --- /dev/null +++ b/make-man.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +# This script is derives from the original, written for Obarun Linux distribution by Eric Vidal. +# The original is released under BSD Zero Clause licence (BSD0), and can be found at https://git.obarun.org/Obarun/66/-/blob/master/doc/make-man.sh?ref_type=heads. + + +man8='apkg revdep' + +man5='apkg.conf' + +for i in 5 8;do + if [ ! -d doc/man/man${i} ]; then + mkdir -p -m 0755 doc/man/man"${i}" || exit 1 + fi +done + +for i in ${man5}; do + lowdown -s -Tman doc/"${i}".md -o doc/man/man5/"${i}".5 || exit 1 + var=$( sed -n -e '/^.TH/p' < doc/man/man5/"${i}".5) + var=$(printf '%s' "$var" | tr '7' '5') + sed -i "s!^.TH.*!${var}!" doc/man/man5/"${i}".5 || exit 1 + sed -i '4,8d' doc/man/man5/"${i}".5 || exit 1 +done + +for i in ${man8}; do + lowdown -s -Tman doc/"${i}".md -o doc/man/man8/"${i}".8 || exit 1 + var=$( sed -n -e '/^.TH/p' < doc/man/man8/"${i}".8) + var=$(printf '%s' "$var" | tr '7' '8') + sed -i "s!^.TH.*!${var}!" doc/man/man8/"${i}".8 || exit 1 + sed -i '4,8d' doc/man/man8/"${i}".8 || exit 1 +done + +exit 0 \ No newline at end of file -- cgit v1.2.3