feat: added debian build script
This commit is contained in:
9
deb/LicenseManager.desktop
Normal file
9
deb/LicenseManager.desktop
Normal file
@@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=License Manager
|
||||
Comment=License management application
|
||||
Exec=LicenseManager
|
||||
Icon=licensemanager
|
||||
Terminal=false
|
||||
Categories=Utility;
|
||||
StartupNotify=true
|
||||
55
deb/build.sh
Executable file
55
deb/build.sh
Executable file
@@ -0,0 +1,55 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# ===== Проверка аргументов =====
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: $0 /path/to/LicenseManager"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BIN_PATH="$(realpath "$1")"
|
||||
|
||||
if [ ! -f "$BIN_PATH" ]; then
|
||||
echo "Error: binary not found: $BIN_PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ===== Параметры пакета =====
|
||||
APP_NAME="licensemanager"
|
||||
BIN_NAME="LicenseManager"
|
||||
VERSION="0.1"
|
||||
ARCH="$(dpkg --print-architecture)"
|
||||
|
||||
PKG_DIR="${APP_NAME}_${VERSION}_${ARCH}"
|
||||
|
||||
# ===== Сборка =====
|
||||
echo "==> Cleaning"
|
||||
rm -rf "$PKG_DIR" *.deb
|
||||
|
||||
echo "==> Creating package structure"
|
||||
mkdir -p "$PKG_DIR/DEBIAN"
|
||||
mkdir -p "$PKG_DIR/usr/bin"
|
||||
mkdir -p "$PKG_DIR/usr/share/applications"
|
||||
mkdir -p "$PKG_DIR/usr/share/icons/hicolor/256x256/apps"
|
||||
|
||||
echo "==> Copy control file"
|
||||
cp control "$PKG_DIR/DEBIAN/control"
|
||||
|
||||
echo "==> Copy binary"
|
||||
cp "$BIN_PATH" "$PKG_DIR/usr/bin/$BIN_NAME"
|
||||
chmod 0755 "$PKG_DIR/usr/bin/$BIN_NAME"
|
||||
|
||||
echo "==> Copy desktop file"
|
||||
cp LicenseManager.desktop \
|
||||
"$PKG_DIR/usr/share/applications/LicenseManager.desktop"
|
||||
|
||||
echo "==> Copy icon"
|
||||
cp icon.png \
|
||||
"$PKG_DIR/usr/share/icons/hicolor/256x256/apps/licensemanager.png"
|
||||
|
||||
echo "==> Building deb package"
|
||||
dpkg-deb --build "$PKG_DIR"
|
||||
|
||||
echo "==> Done:"
|
||||
ls -lh *.deb
|
||||
|
||||
10
deb/control
Normal file
10
deb/control
Normal file
@@ -0,0 +1,10 @@
|
||||
Package: licensemanager
|
||||
Version: 0.1
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Maintainer: TrombonIp
|
||||
Depends: libqt5core5a, libqt5gui5, libqt5widgets5, libqt5sql5, libqt5sql5-sqlite
|
||||
Description: License Manager (Qt5)
|
||||
Simple Qt5 application for managing licenses.
|
||||
|
||||
BIN
deb/icon.png
Normal file
BIN
deb/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
Reference in New Issue
Block a user