Split package

This commit is contained in:
2026-01-07 11:46:01 +02:00
parent 80f7d25c10
commit 83bacdc99b
2 changed files with 99 additions and 7 deletions
+23 -5
View File
@@ -9,17 +9,35 @@ build() {
make
}
# The check function is executed in the source directory
# This function is used to run tests to verify the package has been compiled correctly
check() {
make check
_pick() {
local p="$1" f d; shift
for f; do
[ -d "$BPM_WORKDIR"/output_"$p" ] || { echo "Split package $p not found"; exit 1; }
d="$BPM_WORKDIR"/output_"$p"/"${f#$BPM_OUTPUT}"
mkdir -p "$(dirname "$d")"
mv "$f" "$d"
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
done
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package() {
package_vlc() {
make DESTDIR="$BPM_OUTPUT" install
cd "$BPM_OUTPUT"
# Move library files into split package
_pick libvlc usr/include
_pick libvlc usr/lib/libvlc*
_pick libvlc usr/lib/pkgconfig
_pick libvlc usr/lib/vlc/vlc-cache-gen
# Install package license
install -Dm644 "$BPM_SOURCE"/COPYING* -t "$BPM_OUTPUT"/usr/share/licenses/vlc
}
package_libvlc() {
# Install package license
install -Dm644 "$BPM_SOURCE"/COPYING* -t "$BPM_OUTPUT"/usr/share/licenses/vlc
}