summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJonathan Bauer2020-11-12 15:06:02 +0100
committerJonathan Bauer2020-11-12 15:06:02 +0100
commit65d244bd0b570f837c6e93edb2b26b00b431726a (patch)
tree58a8f4824645f37c1e5438640319d5c68ce5e8d7 /core
parent[dnbd3-proxy-mode] Honor config overrides from SLX_DNBD3_EXTRA (diff)
downloadmltk-65d244bd0b570f837c6e93edb2b26b00b431726a.tar.gz
mltk-65d244bd0b570f837c6e93edb2b26b00b431726a.tar.xz
mltk-65d244bd0b570f837c6e93edb2b26b00b431726a.zip
[dnbd3] update build to match new cmake changes
Diffstat (limited to 'core')
-rw-r--r--core/modules/dnbd3/module.build27
1 files changed, 18 insertions, 9 deletions
diff --git a/core/modules/dnbd3/module.build b/core/modules/dnbd3/module.build
index 203088ca..ab2896d3 100644
--- a/core/modules/dnbd3/module.build
+++ b/core/modules/dnbd3/module.build
@@ -4,23 +4,32 @@ fetch_source() {
}
build() {
- mkdir -p "${MODULE_BUILD_DIR}/opt/openslx/bin" \
- || perror "Could not create opt/openslx/bin"
- cd "${MODULE_BUILD_DIR}/opt/openslx/bin" \
- || perror "Could not cd to build dir for client binary"
+ local build_dir="${MODULE_WORK_DIR}/src/dnbd3/build"
+ mkdir -p "$build_dir" || perror "Could not create '$build_dir'."
+ cd "$build_dir" || perror "Could not cd to '$build_dir'."
cmake \
+ -DCMAKE_BUILD_TYPE=Release \
-DBUILD_FUSE_CLIENT=ON \
-DBUILD_KERNEL_MODULE=OFF \
-DBUILD_SERVER=ON \
-DBUILD_SERVER_FUSE=ON \
-DBUILD_STRESSTEST=OFF \
- "$MODULE_WORK_DIR/src/dnbd3" || perror "Could not cmake"
+ .. || perror "Could not cmake"
+
make dnbd3-fuse || perror "Could not make dnbd3-fuse"
make dnbd3-server || perror "Could not make dnbd3-server"
- chown root:root "dnbd3-client" "dnbd3-fuse" "dnbd3-server"
- chmod +x "dnbd3-fuse" "dnbd3-server"
- add_group "fuse"
- cd "$MODULE_WORK_DIR"
+
+ cd src || perror "Could not src to '${PWD}/src'."
+ chown root:root "fuse/dnbd3-fuse" "server/dnbd3-server" \
+ || perror "Could not chown dnbd3 components."
+ chmod +x "fuse/dnbd3-fuse" "server/dnbd3-server" \
+ || perror "Could not set executable bit of components."
+
+ local install_dir="${MODULE_BUILD_DIR}/opt/openslx/bin"
+ mkdir -p "$install_dir" \
+ || perror "Could not create installation directory."
+ cp -f "fuse/dnbd3-fuse" "server/dnbd3-server" "$install_dir" \
+ || perror "Could not copy components to installation directory."
COPYLIST="list_dpkg_output"
[ -e "$COPYLIST" ] && rm "$COPYLIST"