Initial commit
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
# Personal APT repository
|
||||
|
||||
This directory is a minimal Debian/apt repository that hosts personal
|
||||
packages for the Clockwork Pi image.
|
||||
|
||||
Currently it contains only **clockworkpi-theme**.
|
||||
|
||||
## Structure
|
||||
```
|
||||
apt-repository/
|
||||
├── build-repo.sh # helper to rebuild the index
|
||||
├── pool/main/c/clockworkpi-theme/
|
||||
│ └── clockworkpi-theme_*.deb # package files live here
|
||||
└── dists/bookworm/stable/main/binary-all/
|
||||
├── Packages
|
||||
└── Packages.gz
|
||||
```
|
||||
|
||||
## Usage
|
||||
1. Build / rebuild your theme package in *pi-gen* (e.g. via
|
||||
`scripts/package-custom-theme.sh`).
|
||||
2. Run the helper here:
|
||||
```bash
|
||||
cd apt-repository
|
||||
./build-repo.sh
|
||||
```
|
||||
3. Commit & push this repo – the raw URL of the repo root is the apt
|
||||
source, e.g.
|
||||
```
|
||||
deb [arch=all] https://gitea.example.com/olivier/apt-repository bookworm stable main
|
||||
```
|
||||
|
||||
## Adding more packages
|
||||
Just copy additional `.deb` files into an appropriate sub-directory
|
||||
under `pool/` (follow the first letter scheme) and run
|
||||
`./build-repo.sh` – the script rescans the entire pool each time.
|
||||
Executable
+56
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env bash
|
||||
# -----------------------------------------------------------------------------
|
||||
# build-repo.sh – regenerate minimal Debian/apt repository
|
||||
# -----------------------------------------------------------------------------
|
||||
# 1. copies the current custom-theme.deb from ../ClockworkPi-pi-gen/custom-theme/
|
||||
# (edit PKG_SRC below if your path is different)
|
||||
# 2. puts it into pool/main/c/clockworkpi-theme/
|
||||
# 3. runs dpkg-scanpackages to create Packages & Packages.gz
|
||||
# 4. writes a small Release stub (not signed – fine for private use, add gpg
|
||||
# signing later if you wish)
|
||||
#
|
||||
# After running, commit & push this repo – the raw URLs will be usable as an
|
||||
# apt source on any machine.
|
||||
# -----------------------------------------------------------------------------
|
||||
set -euo pipefail
|
||||
|
||||
PKG_SRC="../ClockworkPi-pi-gen/custom-theme/custom-theme.deb" # location of .deb
|
||||
POOL_DIR="pool/main/c/clockworkpi-theme"
|
||||
DIST="bookworm"
|
||||
COMP="stable"
|
||||
ARCH="all"
|
||||
|
||||
if [[ ! -f "${PKG_SRC}" ]]; then
|
||||
echo "ERROR: ${PKG_SRC} not found – build your theme package first." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "${POOL_DIR}"
|
||||
cp -u "${PKG_SRC}" "${POOL_DIR}/" # copy only if newer (keeps history)
|
||||
|
||||
BIN_DIR="dists/${DIST}/${COMP}/main/binary-${ARCH}"
|
||||
mkdir -p "${BIN_DIR}"
|
||||
|
||||
# Generate Packages & Packages.gz
|
||||
if ! command -v dpkg-scanpackages >/dev/null; then
|
||||
echo "ERROR: dpkg-scanpackages not found – install dpkg-dev." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dpkg-scanpackages --arch "${ARCH}" pool /dev/null > "${BIN_DIR}/Packages"
|
||||
gzip -9c "${BIN_DIR}/Packages" > "${BIN_DIR}/Packages.gz"
|
||||
|
||||
# Minimal Release file (unsigned)
|
||||
mkdir -p "dists/${DIST}"
|
||||
cat > "dists/${DIST}/Release" <<EOF
|
||||
Origin: Custom
|
||||
Label: Custom Repo
|
||||
Suite: ${COMP}
|
||||
Version: 1.0
|
||||
Codename: ${DIST}
|
||||
Architectures: ${ARCH}
|
||||
Components: main
|
||||
Description: Personal ClockworkPi repository
|
||||
EOF
|
||||
|
||||
echo "Repository updated – commit & push."
|
||||
@@ -0,0 +1,8 @@
|
||||
Origin: Custom
|
||||
Label: Custom Repo
|
||||
Suite: stable
|
||||
Version: 1.0
|
||||
Codename: bookworm
|
||||
Architectures: all
|
||||
Components: main
|
||||
Description: Personal ClockworkPi repository
|
||||
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user