-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_deb.sh
More file actions
executable file
·44 lines (36 loc) · 1.14 KB
/
build_deb.sh
File metadata and controls
executable file
·44 lines (36 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# Script to build a Debian package for QuickSpeechPi
APP_NAME="quickspeechpi"
VERSION="1.1"
PKG_DIR="${APP_NAME}_${VERSION}_all"
echo "Building Debian package $PKG_DIR..."
# Create structure
mkdir -p "$PKG_DIR/DEBIAN"
mkdir -p "$PKG_DIR/usr/bin"
mkdir -p "$PKG_DIR/usr/share/$APP_NAME"
mkdir -p "$PKG_DIR/usr/share/applications"
# Create control file
cat <<EOF > "$PKG_DIR/DEBIAN/control"
Package: $APP_NAME
Version: $VERSION
Section: utils
Priority: optional
Architecture: all
Depends: python3, python3-tk, espeak
Maintainer: ldl805 <ldl805@github.com>
Description: Quick Speech Pi
Quick Speech Pi is a simple text-to-speech GUI designed for the Raspberry Pi.
It uses espeak to convert text into speech with adjustable pitch and speed.
EOF
# Create wrapper
cat <<EOF > "$PKG_DIR/usr/bin/$APP_NAME"
#!/bin/bash
python3 /usr/share/$APP_NAME/tts_gui.py "\$@"
EOF
chmod 755 "$PKG_DIR/usr/bin/$APP_NAME"
# Copy application files
cp tts_gui.py "$PKG_DIR/usr/share/$APP_NAME/"
cp tts_gui.desktop "$PKG_DIR/usr/share/applications/$APP_NAME.desktop"
# Build package
dpkg-deb --build --root-owner-group "$PKG_DIR"
echo "Package built: ${PKG_DIR}.deb"