Skip to content

Commit c5847c2

Browse files
author
HiFiBerry
committed
packages: convert licman and vu-meter to clones, drop .gitmodules
The last two submodules, and the only ones that really built from the checked-out tree. vu-meter's build.sh now clones into src/ before building instead of assuming someone ran `git submodule update --init`; licman had no wrapper at all and gets the usual build.sh/clean.sh pair driving the build script inside the repository. With that every package takes its sources the same way and .gitmodules is gone, so `git submodule update --init` is no longer a step anyone has to know about. That also settles licman and speakereq being private repositories: they no longer make a public clone of hifiberry-os fail, they just need credentials when their package is actually built. What this gives up is pinning: a hifiberry-os commit no longer names an exact upstream commit. It never did in practice - the pointers were unused and had drifted - and pinning can come back as an explicit ref in build.sh, where it shows up in a diff. check-packages.py now passes.
1 parent 19dabdf commit c5847c2

7 files changed

Lines changed: 64 additions & 8 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,5 @@ packages/nowplaying-sdl/nowplaying-sdl
8282
packages/pw-api/pipewire-api
8383
packages/songrec/songrec
8484
packages/speakereq/speakereq
85+
packages/licman/licman
86+
packages/vu-meter/src

.gitmodules

Lines changed: 0 additions & 6 deletions
This file was deleted.

packages/licman/build.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/bash
2+
3+
# Exit on error
4+
set -e
5+
6+
cd "$(dirname "$0")"
7+
8+
# Define variables
9+
PACKAGE="licman"
10+
REPO_URL="https://github.com/hifiberry/licman.git"
11+
12+
# Note: licman is a private repository, so this needs credentials that can
13+
# read it. That was equally true while it was a submodule.
14+
15+
# Check for the --clean option
16+
if [[ "$1" == "--clean" ]]; then
17+
./clean.sh
18+
exit 0
19+
fi
20+
21+
# Step 1: Clone or update the source repository
22+
if [[ -d "$PACKAGE/.git" ]]; then
23+
echo "Updating $PACKAGE source from $REPO_URL..."
24+
git -C "$PACKAGE" pull
25+
else
26+
echo "Cloning $PACKAGE source from $REPO_URL..."
27+
git clone "$REPO_URL" "$PACKAGE"
28+
fi
29+
30+
# Step 2: Build via the repository's own build script
31+
cd "$PACKAGE"
32+
chmod +x ./build.sh
33+
./build.sh
34+
35+
# Step 3: Move the built packages next to this script
36+
cd ..
37+
find "$PACKAGE" -maxdepth 2 -name "licman_*.deb" -exec mv {} . \; 2>/dev/null || true
38+
find "$PACKAGE" -maxdepth 2 -name "licman_*.changes" -exec mv {} . \; 2>/dev/null || true
39+
find "$PACKAGE" -maxdepth 2 -name "licman_*.buildinfo" -exec mv {} . \; 2>/dev/null || true
40+
41+
echo "Package build completed."
42+
echo "Built packages:"
43+
ls -lh licman*.deb 2>/dev/null || echo "No .deb files found"

packages/licman/clean.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
cd `dirname $0`
3+
BASE=licman
4+
rm -rf $BASE
5+
rm -f $BASE*.build $BASE*.changes $BASE*.dsc $BASE*.deb $BASE*.buildinfo $BASE*.tar.gz $BASE*.tar.xz
6+
echo "Cleaned up $BASE build artifacts."

packages/licman/licman

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

packages/vu-meter/build.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ set -e
55
_CC_ENV="$(dirname "$0")/../../scripts/cross-compile-env.sh"
66
if [ -f "$_CC_ENV" ]; then source "$_CC_ENV"; else echo "Not using cross-compilation (${_CC_ENV} does not exist)"; fi
77

8+
# Define variables
9+
PACKAGE="src"
10+
REPO_URL="https://github.com/hifiberry/vu-meter.git"
11+
12+
# Step 1: Clone or update the source repository
13+
if [[ -d "$PACKAGE/.git" ]]; then
14+
echo "Updating vu-meter source from $REPO_URL..."
15+
git -C "$PACKAGE" pull
16+
else
17+
echo "Cloning vu-meter source from $REPO_URL..."
18+
git clone "$REPO_URL" "$PACKAGE"
19+
fi
20+
821
# Building package with sbuild
922
echo "Building hifiberry-vu-meter package..."
1023

packages/vu-meter/src

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

0 commit comments

Comments
 (0)