-
Notifications
You must be signed in to change notification settings - Fork 2
/
build-deb.sh
30 lines (26 loc) · 1016 Bytes
/
build-deb.sh
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
#!/bin/bash
VERSION="$( cat version )"
# Build App
cd src
flutter build linux
cd ..
cp version src/build/linux/x64/release/bundle/
# Prepare deb files for packaging
mkdir -p deb/usr/lib/rechnungs-assistent/
cp -r src/build/linux/x64/release/bundle/* deb/usr/lib/rechnungs-assistent/
cp src/generator-html.py deb/usr/lib/rechnungs-assistent/
cp -r src/html deb/usr/lib/rechnungs-assistent/
# mkdir -p deb/usr/share/icons/hicolor/scalable/apps/
# cp rechnungs-assistent.svg deb/usr/share/icons/hicolor/scalable/apps/
mkdir -p deb/usr/share/icons/hicolor/256x256/apps/
cp rechnungs-assistent.png deb/usr/share/icons/hicolor/256x256/apps/
mkdir -p deb/usr/share/applications/
cp rechnungs-assistent.desktop deb/usr/share/applications/
mkdir -p deb/usr/bin/
cp rechnungs-assistent deb/usr/bin/
chmod +x deb/usr/bin/rechnungs-assistent
chmod 755 deb/DEBIAN
# Build deb package
sed -i "2s/.*/Version: $VERSION/" deb/DEBIAN/control
dpkg-deb --build -Zxz --root-owner-group deb
mv deb.deb rechnungs-assistent_$VERSION.deb