Switch to new download format and update source.sh script
This commit is contained in:
@@ -2,22 +2,9 @@
|
||||
# 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
|
||||
|
||||
DOWNLOAD="https://www.freedesktop.org/software/pulseaudio/releases/pulseaudio-${BPM_PKG_VERSION}.tar.xz"
|
||||
FILENAME="${DOWNLOAD##*/}"
|
||||
|
||||
# The prepare function is executed in the root of the temp directory
|
||||
# This function is used for downloading files and putting them into the correct location
|
||||
prepare() {
|
||||
wget "$DOWNLOAD"
|
||||
tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE"
|
||||
}
|
||||
|
||||
# The build function is executed in the source directory
|
||||
# This function is used to compile the source code
|
||||
build() {
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
meson setup --prefix=/usr \
|
||||
--libdir=/usr/lib \
|
||||
--buildtype=release \
|
||||
@@ -25,32 +12,27 @@ build() {
|
||||
-Delogind=enabled \
|
||||
-Ddatabase=gdbm \
|
||||
-Ddoxygen=false \
|
||||
..
|
||||
ninja
|
||||
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() {
|
||||
cd build
|
||||
ninja test
|
||||
meson test -C build --print-errorlogs
|
||||
}
|
||||
|
||||
package_libpulse() {
|
||||
cd build
|
||||
|
||||
# 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
|
||||
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/libpulse/LICENSE
|
||||
}
|
||||
|
||||
package_pulseaudio() {
|
||||
cd build
|
||||
|
||||
DESTDIR="$BPM_OUTPUT" ninja install
|
||||
meson install -C build --destdir="$BPM_OUTPUT"
|
||||
|
||||
# Move libraries to temporary directory for libpulse package
|
||||
mkdir "$BPM_SOURCE"/output-libpulse
|
||||
|
||||
Reference in New Issue
Block a user