Skip to content

Commit

Permalink
fix: arm64: linux .deb packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
alexVinarskis committed Oct 15, 2024
1 parent 3905de7 commit 59122a7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ APP_PATH="/opt/$PACKAGE"
APP_DIR="./package$APP_PATH"
DEB_DIR="./package/DEBIAN"
VERSION=$(git describe --tags)+$(date '+%Y%m%d-%H%M%S')
ARCHITECTURE="amd64"
ARCHITECTURE=$(dpkg --print-architecture)
BUILD_PATH="build/linux/$([[ $(dpkg --print-architecture) == 'arm64' ]] && echo 'arm64' || echo 'x64')/release/bundle"

# Bake in app name and version tag
sed -i "s|applicationName".*"|applicationName = '${NAME}';|g" ./lib/configs/constants.dart
Expand All @@ -32,16 +33,17 @@ mkdir -p ./package/etc/sudoers.d
mkdir -p ./package/usr/local/share/applications/

# Compile release app
flutter clean
flutter build linux --release

# Build application archive
(
cd build/linux/x64/release/bundle/
cd "$BUILD_PATH"
tar -cJf "../../../../../${PACKAGE}_${VERSION}_${ARCHITECTURE}".tar.xz *
)

# Copy application files
cp -r build/linux/x64/release/bundle/* "$APP_DIR"
cp -r "$BUILD_PATH"/* "$APP_DIR"
cp ./resources/icon.png ./package/"$ICON_PATH"
cp ./resources/dell-powermanager.desktop ./package/usr/local/share/applications/

Expand Down

0 comments on commit 59122a7

Please sign in to comment.