#!/bin/bash # LGPL-only libVLC for NovArc's Android app (review L1, the owner's decision 2026-10-12): VideoLAN's own # vlc-android build at tag libvlc-3.7.6, with the contribs built from source with `--license a` # (LGPLv2 + ad-clauses) instead of the prebuilt GPL-mode contribs CI uses (`-t`). Same images as # VideoLAN's CI for each ABI. Throwaway containers, capped so Jellyfin keeps running. # Output: ~/builds/libvlc-lgpl/m2 (a local Maven repo with org.videolan.android:libvlc-all:3.7.6), # contrib source tarballs kept for the source offer. Log: ~/builds/libvlc-lgpl/build.log set -euo pipefail ROOT="$HOME/builds/libvlc-lgpl" IMAGE_30="registry.videolan.org/vlc-debian-android-3.0:20260701183656" IMAGE_40="registry.videolan.org/vlc-debian-android:20260610055743" LIMITS=(--cpus 8 --memory 16g --memory-swap 16g) cd "$ROOT" mkdir -p m2 # The images build as their own user (videolan, uid 499), which owns the Android SDK in them. docker run --rm -u 0 -v "$ROOT":/build "$IMAGE_40" chmod -R a+rwX /build run() { # image, command docker run --rm --name "libvlc-lgpl-$(date +%s)" "${LIMITS[@]}" \ -v "$ROOT":/build -w /build/vlc-android "$1" nice -n 10 bash -c "umask 0; git config --global --add safe.directory '*'; $2" } stamp() { echo "== $(date -u +%FT%TZ) $*"; } # libvlcjni at the commit vlc-android 3.7.6 pins, with NovArc's one change: the VLC modules whose # source is GPL are left out (patch-blacklist.sh; batch 4 review L1). if [ ! -d vlc-android/libvlcjni/.git ]; then git clone -q --single-branch --branch libvlcjni-3.x https://code.videolan.org/videolan/libvlcjni.git vlc-android/libvlcjni git -C vlc-android/libvlcjni reset -q --hard c0cc8ce6443dcb09be9b43c7b7a3ed01e33cb3ac fi bash "$ROOT/patch-blacklist.sh" # One ABI at a time; the CI's image for each (arm64 and x86_64 run on the default image). for spec in "arm64 $IMAGE_40" "arm $IMAGE_30" "x86_64 $IMAGE_40" "x86 $IMAGE_30"; do set -- $spec if [ -f "done-$1" ]; then stamp "skip $1 (built)"; continue; fi stamp "build $1 on $2" run "$2" "./buildsystem/compile.sh -l -a $1 -m2 /build/m2 release --license a" touch "done-$1" stamp "built $1" done stamp "publish libvlc-all" run "$IMAGE_40" "git config --global --add safe.directory /build/vlc-android/libvlcjni && ./buildsystem/compile.sh --init -b && GRADLE_ABI=ALL ./gradlew -Dmaven.repo.local=/build/m2 -p libvlcjni publishToMavenLocal" stamp "done" find m2 -name '*.aar' -o -name '*.pom' | sort