Adds CI CD with deb for external deps
This commit is contained in:
82 files changed
+3547
-3
No files matched your search
@@ -0,0 +1,76 @@
|
||||
#!/bin/bash
|
||||
# AVS DEB Package Build Script
|
||||
# Builds libavs-dev DEB package for internal SCM repository
|
||||
|
||||
set -e
|
||||
|
||||
PACKAGE_NAME="libavs-dev"
|
||||
VERSION="1.0.0"
|
||||
ARCHITECTURE="amd64"
|
||||
MAINTAINER="Legatus Team <legatus@defence-elec.de>"
|
||||
DESCRIPTION="AVS library - development files (contract-based license)"
|
||||
|
||||
# Create package structure
|
||||
DEB_DIR="deb-package"
|
||||
rm -rf "$DEB_DIR"
|
||||
mkdir -p "$DEB_DIR/DEBIAN"
|
||||
mkdir -p "$DEB_DIR/opt/AVS"
|
||||
mkdir -p "$DEB_DIR/opt/offline-cache/avs"
|
||||
|
||||
# Copy AVS files from external/AVS
|
||||
if [ -d "../../external/AVS" ]; then
|
||||
cp -r ../../external/AVS/* "$DEB_DIR/opt/AVS/"
|
||||
fi
|
||||
|
||||
# Create control file
|
||||
cat > "$DEB_DIR/DEBIAN/control" << EOF
|
||||
Package: $PACKAGE_NAME
|
||||
Version: $VERSION
|
||||
Architecture: $ARCHITECTURE
|
||||
Maintainer: $MAINTAINER
|
||||
Depends: libqt6core6, libqt6gui6, libqt6widgets6
|
||||
Section: libdevel
|
||||
Priority: optional
|
||||
Description: $DESCRIPTION
|
||||
AVS (Application Visualization System) library for Legatus.
|
||||
.
|
||||
License: Contract-based (no file required)
|
||||
Customer has lifetime license contract.
|
||||
EOF
|
||||
|
||||
# Create postinst script
|
||||
cat > "$DEB_DIR/DEBIAN/postinst" << 'EOF'
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "AVS DEB package installed successfully"
|
||||
echo "License: Contract-based (no file required)"
|
||||
|
||||
# Set permissions
|
||||
chmod -R 755 /opt/AVS
|
||||
|
||||
exit 0
|
||||
EOF
|
||||
|
||||
chmod 755 "$DEB_DIR/DEBIAN/postinst"
|
||||
|
||||
# Create postrm script
|
||||
cat > "$DEB_DIR/DEBIAN/postrm" << 'EOF'
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "AVS DEB package removed"
|
||||
|
||||
exit 0
|
||||
EOF
|
||||
|
||||
chmod 755 "$DEB_DIR/DEBIAN/postrm"
|
||||
|
||||
# Build DEB package
|
||||
echo "Building DEB package: ${PACKAGE_NAME}_${VERSION}_${ARCHITECTURE}.deb"
|
||||
cd "$DEB_DIR"
|
||||
dpkg-deb --build . "../${PACKAGE_NAME}_${VERSION}_${ARCHITECTURE}.deb"
|
||||
cd ..
|
||||
|
||||
echo "DEB package created: ${PACKAGE_NAME}_${VERSION}_${ARCHITECTURE}.deb"
|
||||
echo "Size: $(du -h ${PACKAGE_NAME}_${VERSION}_${ARCHITECTURE}.deb | cut -f1)"
|
||||
Reference in new issue
Block a user