mirror of
https://github.com/EnumeratedDev/bpm-utils.git
synced 2026-09-16 02:56:11 +00:00
Update cmake and meson templates
This commit is contained in:
+4
-11
@@ -15,27 +15,20 @@ prepare() {
|
|||||||
# The build function is executed in the source directory
|
# The build function is executed in the source directory
|
||||||
# This function is used to compile the source code
|
# This function is used to compile the source code
|
||||||
build() {
|
build() {
|
||||||
mkdir build
|
cmake -B build -DCMAKE_INSTALL_PREFIX=/usr
|
||||||
cd build
|
cmake --build build
|
||||||
|
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
|
|
||||||
make
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# The check function is executed in the source directory
|
# The check function is executed in the source directory
|
||||||
# This function is used to run tests to verify the package has been compiled correctly
|
# This function is used to run tests to verify the package has been compiled correctly
|
||||||
check() {
|
check() {
|
||||||
cd build
|
ctest --test-dir build
|
||||||
|
|
||||||
make test
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# The package function is executed in the source directory
|
# The package function is executed in the source directory
|
||||||
# This function is used to move the compiled files into the output directory
|
# This function is used to move the compiled files into the output directory
|
||||||
package() {
|
package() {
|
||||||
cd build
|
DESTDIR="$BPM_OUTPUT" cmake --install build
|
||||||
|
|
||||||
make DESTDIR="$BPM_OUTPUT" install
|
|
||||||
|
|
||||||
# Install package license
|
# Install package license
|
||||||
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/$NAME/LICENSE
|
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/$NAME/LICENSE
|
||||||
|
|||||||
+4
-11
@@ -15,27 +15,20 @@ prepare() {
|
|||||||
# The build function is executed in the source directory
|
# The build function is executed in the source directory
|
||||||
# This function is used to compile the source code
|
# This function is used to compile the source code
|
||||||
build() {
|
build() {
|
||||||
mkdir build
|
meson setup build --prefix=/usr
|
||||||
cd build
|
meson compile -C build
|
||||||
|
|
||||||
meson setup --prefix=/usr ..
|
|
||||||
meson compile
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# The check function is executed in the source directory
|
# The check function is executed in the source directory
|
||||||
# This function is used to run tests to verify the package has been compiled correctly
|
# This function is used to run tests to verify the package has been compiled correctly
|
||||||
check() {
|
check() {
|
||||||
cd build
|
meson test -C build
|
||||||
|
|
||||||
meson test
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# The package function is executed in the source directory
|
# The package function is executed in the source directory
|
||||||
# This function is used to move the compiled files into the output directory
|
# This function is used to move the compiled files into the output directory
|
||||||
package() {
|
package() {
|
||||||
cd build
|
meson install -C build --destdir="$BPM_OUTPUT"
|
||||||
|
|
||||||
meson install --destdir="$BPM_OUTPUT"
|
|
||||||
|
|
||||||
# Install package license
|
# Install package license
|
||||||
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/$NAME/LICENSE
|
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/$NAME/LICENSE
|
||||||
|
|||||||
Reference in New Issue
Block a user