Split package
This commit is contained in:
@@ -37,11 +37,41 @@ check() {
|
||||
ninja test
|
||||
}
|
||||
|
||||
# The package function is executed in the source directory
|
||||
# This function is used to move the compiled files into the output directory
|
||||
package() {
|
||||
package_libpulse() {
|
||||
cd build
|
||||
DESTDIR="$BPM_OUTPUT" ninja install
|
||||
|
||||
# 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/pulseaudio/LICENSE
|
||||
}
|
||||
|
||||
package_pulseaudio() {
|
||||
cd build
|
||||
|
||||
DESTDIR="$BPM_OUTPUT" ninja install
|
||||
|
||||
# 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