These git repositories follow Debian's [DEP-14](https://dep-team.pages.debian.net/deps/dep14/) layout
and can be used independently of this harness.
-# Quick start ####
+## Quick start ##
To use, clone recursively, for example:
git clone --recurse-submodules --branch unstable https://git.djapps.eu/pkg/ggml
Make sure you have a base for the distribution and arch that you are targeting:
- sudo sh sources/create-pbuilder.sh <dist> <arch>
+ sources/create-pbuilder <dist> <arch>
For example:
- sudo sh sources/create-pbuilder.sh bookworm amd64
+ sources/create-pbuilder bookworm amd64
To build a layer, cd to its directory and run:
- sh ../build-pbuilder.sh <dist> <arch> [<branch>]
+ ../build-pbuilder <dist> <arch> [<branch>]
For example:
cd sources/ggml
- sh ../build-pbuilder.sh sid amd64
+ ../build-pbuilder sid amd64
or:
cd sources/llama.cpp
- sh ../build-pbuilder.sh bullseye amd64 debian/bullseye
+ ../build-pbuilder bullseye amd64 debian/bullseye
+## Using locally built packages ##
Except for `ggml` itself, pbuilder/cowbuilder needs to be configured appropriately
in order to use either a local repository with the `ggml` packages you just built,
or a remote repository with the required `ggml`-related packages.
+To configure a local repository, update `/etc/pbuilderrc`. For example:
+
+ ...
+ BINDMOUNTS="/srv/repo/deb/bullseye/ml/1.1 /srv/repo/deb/bookworm/ml/1.1 /srv/repo/deb/sid/ml/1.1"
+ ...
+
+and create a `create-pbuilder.settings` file which will be sourced by the script:
+
+ export GIT_PBUILDER_OPTIONS="--aptcache /var/cache/pbuilder/aptcache --othermirror 'deb [trusted=yes] file:/srv/repo/deb/$1/ml/1.1/ ./'"
+
+The `Packages` file needs to be generated after each build. For example:
+
+ cd /srv/repo/deb/sid/ml/1.1
+ apt-ftparchive packages . > Packages
+
+(Or [hooks](https://wiki.debian.org/PbuilderTricks#How_to_include_local_packages_in_the_build) can be used.)
+
+## Development ##
+When developing the packaging, cd to a layer directory and [use git-buildpackage as usual](https://honk.sigxcpu.org/projects/git-buildpackage/manual-html/).
+
+A shortcut is provided (which requires the dependent packages to be installed locally):
+
+ ../build.dev
+
+