Switch to new package format
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
# 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 \
|
||||
-Dplatforms=x11,wayland \
|
||||
-Dvulkan-drivers=amd,gfxstream,intel,intel_hasvk,nouveau,swrast,virtio,microsoft-experimental \
|
||||
-Dgallium-drivers=r300,r600,radeonsi,nouveau,virgl,svga,llvmpipe,softpipe,iris,crocus,i915,zink,d3d12 \
|
||||
-D gallium-extra-hud=true \
|
||||
-D gallium-mediafoundation=disabled \
|
||||
-D gallium-rusticl=true \
|
||||
-Dandroid-libbacktrace=disabled \
|
||||
-Dmicrosoft-clc=disabled \
|
||||
-Dglvnd=enabled \
|
||||
-Dvalgrind=enabled \
|
||||
-Dlibunwind=disabled \
|
||||
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
|
||||
}
|
||||
|
||||
# The package function is executed in the source directory
|
||||
# This function is used to move the compiled files into the output directory
|
||||
package() {
|
||||
meson install -C build --destdir="$BPM_OUTPUT"
|
||||
|
||||
# Install documentation
|
||||
install -d "$BPM_OUTPUT"/usr/share/doc/
|
||||
cp -r "$BPM_SOURCE"/docs/ "$BPM_OUTPUT"/usr/share/doc/mesa
|
||||
rm "$BPM_OUTPUT"/usr/share/doc/mesa/license.rst
|
||||
|
||||
# Install package
|
||||
install -d "$BPM_OUTPUT"/usr/share/licenses/mesa
|
||||
cp "$BPM_SOURCE"/docs/license.rst "$BPM_OUTPUT"/usr/share/licenses/mesa/license.rst
|
||||
}
|
||||
Reference in New Issue
Block a user