Update source.sh script

This commit is contained in:
2025-09-10 11:51:06 +03:00
parent 56bf5c621e
commit 2467b43ceb
+6 -12
View File
@@ -15,30 +15,24 @@ prepare() {
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr \
cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=ON \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
cmake --build .
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
cmake --build 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
ctest
ctest --test-dir build
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package() {
cd build
DESTDIR="$BPM_OUTPUT" cmake --install .
DESTDIR="$BPM_OUTPUT" cmake --install build
# Install package license
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/double-conversion/LICENSE