-
Notifications
You must be signed in to change notification settings - Fork 35
Add installation and packaging targets #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…er entrypoint with rsync.
…ld and CPack packaging.
uekerman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your cmake/CPackConfig.cmake is missing. Could you please still add it?
| RUN echo '#!/bin/bash' > /entrypoint.sh && \ | ||
| echo 'set -e' >> /entrypoint.sh && \ | ||
| echo 'SOURCE_DIR="/mnt/cpack-exercise"' >> /entrypoint.sh && \ | ||
| echo 'BUILD_DIR="/tmp/build"' >> /entrypoint.sh && \ | ||
| echo 'if [ ! -d "$SOURCE_DIR" ]; then' >> /entrypoint.sh && \ | ||
| echo ' echo "Error: Source directory $SOURCE_DIR not found. Did you mount the volume?"' >> /entrypoint.sh && \ | ||
| echo ' exit 1' >> /entrypoint.sh && \ | ||
| echo 'fi' >> /entrypoint.sh && \ | ||
| echo 'echo "Setting up build environment..."' >> /entrypoint.sh && \ | ||
| echo 'mkdir -p "$BUILD_DIR"' >> /entrypoint.sh && \ | ||
| echo 'rsync -av --exclude "build" "$SOURCE_DIR/" "$BUILD_DIR/"' >> /entrypoint.sh && \ | ||
| echo 'cd "$BUILD_DIR"' >> /entrypoint.sh && \ | ||
| echo 'echo "Configuring project..."' >> /entrypoint.sh && \ | ||
| echo 'cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON .' >> /entrypoint.sh && \ | ||
| echo 'echo "Building project..."' >> /entrypoint.sh && \ | ||
| echo 'cmake --build build' >> /entrypoint.sh && \ | ||
| echo 'echo "Creating packages..."' >> /entrypoint.sh && \ | ||
| echo 'cd build' >> /entrypoint.sh && \ | ||
| echo 'cpack -G TGZ' >> /entrypoint.sh && \ | ||
| echo 'cpack -G DEB' >> /entrypoint.sh && \ | ||
| echo 'echo "Copying packages to host..."' >> /entrypoint.sh && \ | ||
| echo 'cp *.tar.gz "$SOURCE_DIR/"' >> /entrypoint.sh && \ | ||
| echo 'cp *.deb "$SOURCE_DIR/"' >> /entrypoint.sh && \ | ||
| echo 'echo "Done! Packages are available in $SOURCE_DIR"' >> /entrypoint.sh && \ | ||
| chmod +x /entrypoint.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better add the script here explicitly and copy it to the container. Not easy to maintain like this.
GitLab: nagasaji
I completed the optional and bonus tasks.
How to Install:
lintian output: