Skip to content

Commit 904f860

Browse files
committed
Packaging: builds for all Ubuntu versions [ci skip]
1 parent 8f15c96 commit 904f860

File tree

4 files changed

+88
-5
lines changed

4 files changed

+88
-5
lines changed
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
fastfetch (2.54.1~#UBUNTU_CODENAME#) #UBUNTU_CODENAME#; urgency=medium
2+
3+
* Fix building on plucky
4+
5+
-- Carter Li <zhangsongcui@live.cn> Mon, 20 Oct 2025 14:27:02 +0800
6+
7+
fastfetch (2.54.0~#UBUNTU_CODENAME#) #UBUNTU_CODENAME#; urgency=medium
8+
9+
* Update to 2.54.0
10+
* Test independent changelog entries for different Ubuntu releases
11+
12+
-- Carter Li <zhangsongcui@live.cn> Mon, 20 Oct 2025 10:47:02 +0800
13+
114
fastfetch (2.53.0) jammy; urgency=medium
215

316
* Update to 2.53.0
@@ -435,4 +448,3 @@ fastfetch (2.7.1) jammy; urgency=medium
435448
* Initial release.
436449

437450
-- Carter Li <zhangsongcui@live.cn> Tue, 06 Feb 2024 15:01:11 +0800
438-

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Source: fastfetch
22
Section: universe/utils
33
Priority: optional
44
Maintainer: Carter Li <[email protected]>
5-
Build-Depends: libelf-dev, libvulkan-dev, libwayland-dev, libxrandr-dev, libxcb-randr0-dev, libdconf-dev, libdbus-1-dev, libmagickcore-dev, libsqlite3-dev, librpm-dev, libegl-dev, libglx-dev, ocl-icd-opencl-dev, libpulse-dev, libdrm-dev, libddcutil-dev, libchafa-dev, directx-headers-dev, pkgconf, cmake (>= 3.12), debhelper (>= 11.2), dh-cmake, dh-cmake-compat (= 1), dh-sequence-cmake, dh-sequence-ctest, ninja-build
5+
Build-Depends: libelf-dev, libvulkan-dev, libwayland-dev, libxrandr-dev, libxcb-randr0-dev, libdconf-dev, libdbus-1-dev, libmagickcore-dev, libsqlite3-dev, librpm-dev, libegl-dev, libglx-dev, ocl-icd-opencl-dev, libpulse-dev, libdrm-dev, libddcutil-dev, libchafa-dev, directx-headers-dev, pkgconf, cmake (>= 3.12), debhelper (>= 11.2), dh-cmake, dh-cmake-compat (= 1), dh-sequence-cmake, dh-sequence-ctest, ninja-build, python3-setuptools
66
Standards-Version: 4.0.0
77
Homepage: https://github.com/fastfetch-cli/fastfetch
88

debian/files

Lines changed: 0 additions & 1 deletion
This file was deleted.

debian/publish.sh

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,76 @@
11
#!/usr/bin/env bash
2+
# WARNING: DO NOT RUN THIS SCRIPT UNLESS YOU KNOW WHAT YOU ARE DOING.
23

3-
debuild -S -i -I
4-
dput ppa:zhangsongcui3371/fastfetch ~/fastfetch_*.changes
4+
set -euo pipefail
5+
6+
command -v debuild >/dev/null 2>&1 || { echo "debuild not found. Install devscripts." >&2; exit 1; }
7+
command -v dput >/dev/null 2>&1 || { echo "dput not found." >&2; exit 1; }
8+
9+
SCRIPT_DIR="$(cd -- "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
10+
ROOT_DIR="$(cd -- "$SCRIPT_DIR/.." >/dev/null 2>&1 && pwd)"
11+
OUT_DIR="$(dirname "$ROOT_DIR")"
12+
PPA="ppa:zhangsongcui3371/fastfetch"
13+
CODENAMES=( jammy noble plucky questing resolute )
14+
DRY_RUN=0
15+
16+
if [[ -d "$OUT_DIR/build" ]]; then
17+
echo "Output directory exists: $OUT_DIR/build" >&2
18+
echo "Please move or delete it before proceeding." >&2
19+
exit 1
20+
fi
21+
22+
TEMPLATE="$ROOT_DIR/debian/changelog.tpl"
23+
CHANGELOG_DEBIAN="$ROOT_DIR/debian/changelog"
24+
25+
if [[ ! -f "$TEMPLATE" ]]; then
26+
echo "Template not found: $TEMPLATE" >&2
27+
exit 1
28+
fi
29+
30+
if ! grep -q '#UBUNTU_CODENAME#' "$TEMPLATE"; then
31+
echo "Template missing placeholder: #UBUNTU_CODENAME#" >&2
32+
exit 1
33+
fi
34+
35+
echo "IMPORTANT: Before proceeding, please ensure that 'debian/changelog.tpl' is up-to-date"
36+
echo " with the correct version number, release notes, and maintainer information."
37+
echo
38+
echo " The template must contain a placeholder like '#UBUNTU_CODENAME#' for the codename."
39+
echo
40+
read -p "Have you reviewed and updated 'debian/changelog.tpl'? (y/N): " -r
41+
echo
42+
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
43+
exit 1
44+
fi
45+
46+
cleanup() {
47+
rm -f "$CHANGELOG_DEBIAN"
48+
rm -f "$ROOT_DIR/debian/files"
49+
}
50+
trap cleanup EXIT
51+
52+
shopt -s nullglob
53+
54+
for codename in "${CODENAMES[@]}"; do
55+
echo "==> Publishing distro: $codename"
56+
sed "s/#UBUNTU_CODENAME#/${codename}/g" "$TEMPLATE" > "$CHANGELOG_DEBIAN"
57+
58+
( cd "$ROOT_DIR" && debuild -S -i -I )
59+
60+
changes=( "$OUT_DIR"/fastfetch_*~${codename}_source.changes )
61+
if [[ ${#changes[@]} -ne 1 ]]; then
62+
echo "Unable to uniquely identify .changes for '$codename' in: $OUT_DIR" >&2
63+
printf 'Found:\n'; printf ' %s\n' "${changes[@]}" >&2 || true
64+
exit 1
65+
fi
66+
67+
if [[ $DRY_RUN -eq 1 ]]; then
68+
echo "[DRY-RUN] dput \"$PPA\" \"${changes[0]}\""
69+
else
70+
dput "$PPA" "${changes[0]}"
71+
fi
72+
73+
rm -f "$OUT_DIR"/fastfetch_*~${codename}_source.{changes,dsc,tar.*}
74+
75+
echo "<== Done: $codename"
76+
done

0 commit comments

Comments
 (0)