Switch to new package format
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package
|
||||
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
||||
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
||||
|
||||
# The build function is executed in the source directory
|
||||
# This function is used to compile the source code
|
||||
build() {
|
||||
meson setup --prefix=/usr \
|
||||
--libdir=/usr/lib \
|
||||
--buildtype=release \
|
||||
-Dsystemd=disabled \
|
||||
-Delogind=enabled \
|
||||
-Ddatabase=gdbm \
|
||||
-Ddoxygen=true \
|
||||
build
|
||||
meson compile -C build
|
||||
}
|
||||
|
||||
# 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() {
|
||||
meson test -C build --print-errorlogs
|
||||
}
|
||||
|
||||
package_libpulse() {
|
||||
# Replace 'output' directory with 'output-libpulse'
|
||||
rmdir "$BPM_OUTPUT"
|
||||
mv "$BPM_SOURCE"/output-libpulse "$BPM_OUTPUT"
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/libpulse/LICENSE
|
||||
}
|
||||
|
||||
package_pulseaudio() {
|
||||
meson install -C build --destdir="$BPM_OUTPUT"
|
||||
|
||||
# Move libraries to temporary directory for libpulse package
|
||||
mkdir "$BPM_SOURCE"/output-libpulse
|
||||
install -d "$BPM_SOURCE"/output-libpulse/usr/bin
|
||||
install -d "$BPM_SOURCE"/output-libpulse/usr/lib
|
||||
install -d "$BPM_SOURCE"/output-libpulse/usr/share/{,man/man1,man/man5,bash-completion/completions}
|
||||
mv "$BPM_OUTPUT"/usr/bin/pa{cat,ctl,dsp,mon,play,rec,record} -t "$BPM_SOURCE"/output-libpulse/usr/bin/
|
||||
mv "$BPM_OUTPUT"/usr/lib/*.so* -t "$BPM_SOURCE"/output-libpulse/usr/lib/
|
||||
mv "$BPM_OUTPUT"/usr/lib/pulseaudio -t "$BPM_SOURCE"/output-libpulse/usr/lib/
|
||||
mv "$BPM_OUTPUT"/usr/lib/{cmake,pkgconfig} -t "$BPM_SOURCE"/output-libpulse/usr/lib/
|
||||
mv "$BPM_OUTPUT"/usr/include -t "$BPM_SOURCE"/output-libpulse/usr/
|
||||
mv "$BPM_OUTPUT"/usr/share/vala -t "$BPM_SOURCE"/output-libpulse/usr/share
|
||||
mv "$BPM_OUTPUT"/usr/share/bash-completion/completions/{pulseaudio,pacat,pactl,padsp,paplay,parec,parecord} -t "$BPM_SOURCE"/output-libpulse/usr/share/bash-completion/completions/
|
||||
mv "$BPM_OUTPUT"/usr/share/zsh -t "$BPM_SOURCE"/output-libpulse/usr/share
|
||||
mv "$BPM_OUTPUT"/usr/share/man/man1/{pacat,pactl,padsp,paplay,parec,parecord}.1 -t "$BPM_SOURCE"/output-libpulse/usr/share/man/man1/
|
||||
mv "$BPM_OUTPUT"/usr/share/man/man5/pulse-client.conf.5 -t "$BPM_SOURCE"/output-libpulse/usr/share/man/man5/
|
||||
|
||||
# Remove system-wide dbus service
|
||||
rm "$BPM_OUTPUT"/usr/share/dbus-1/system.d/pulseaudio-system.conf
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/pulseaudio/LICENSE
|
||||
}
|
||||
Reference in New Issue
Block a user