first commit
This commit is contained in:
35
sbin/build_deb.sh
Normal file
35
sbin/build_deb.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
VERSION="${1:-${VERSION:-0.0.0}}"
|
||||
VERSION="${VERSION#v}"
|
||||
ARCH="${ARCH:-$(dpkg --print-architecture)}"
|
||||
|
||||
PACKAGE_NAME="slide"
|
||||
BUILD_DIR="$ROOT_DIR/build"
|
||||
DIST_DIR="$ROOT_DIR/dist"
|
||||
STAGE_DIR="$BUILD_DIR/deb"
|
||||
|
||||
cd "$ROOT_DIR"
|
||||
make build
|
||||
|
||||
rm -rf "$STAGE_DIR"
|
||||
mkdir -p "$STAGE_DIR/DEBIAN" "$STAGE_DIR/usr/local/bin" "$DIST_DIR"
|
||||
|
||||
install -m 0755 "$BUILD_DIR/slide" "$STAGE_DIR/usr/local/bin/slide"
|
||||
|
||||
cat > "$STAGE_DIR/DEBIAN/control" <<EOF
|
||||
Package: ${PACKAGE_NAME}
|
||||
Version: ${VERSION}
|
||||
Section: graphics
|
||||
Priority: optional
|
||||
Architecture: ${ARCH}
|
||||
Maintainer: slide build
|
||||
Depends: libqt5core5a, libqt5gui5, libqt5widgets5, libqt5network5, libexif12, qt5-image-formats-plugins
|
||||
Description: Lightweight slideshow for photo frames
|
||||
Simple, lightweight slideshow designed for low power devices.
|
||||
EOF
|
||||
|
||||
dpkg-deb --build "$STAGE_DIR" "$DIST_DIR/${PACKAGE_NAME}_${VERSION}_${ARCH}.deb"
|
||||
Reference in New Issue
Block a user