Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/auth-beta-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ jobs:
sudo apt-get install -y libsecret-1-dev libsodium-dev libfuse2 ninja-build libgtk-3-dev dpkg-dev pkg-config rpm patchelf libsqlite3-dev locate libayatana-appindicator3-dev libffi-dev libtiff5 xz-utils libarchive-tools libcurl4-openssl-dev
sudo updatedb --localpaths='/usr/lib/x86_64-linux-gnu'
- name: Install fpm for RPM packaging
run: |
sudo gem install fpm
- name: Install appimagetool
run: |
wget -O appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
Expand All @@ -195,11 +199,13 @@ jobs:
- name: Build desktop app
run: |
flutter config --enable-linux-desktop
dart pub global activate --source git https://github.com/ente-io/flutter_distributor_fork --git-ref develop --git-path packages/flutter_distributor
# RPM
flutter_distributor package --platform=linux --targets=rpm --skip-clean
mv dist/**/*-*-linux.rpm artifacts/ente-auth-v${{ env.VERSION_NAME }}-beta-x86_64.rpm
# Build Linux app
flutter build linux --release
# RPM - using custom build script
./linux/packaging/build_rpm.sh
mv dist/*/*.rpm artifacts/ente-auth-v${{ env.VERSION_NAME }}-beta-x86_64.rpm
# APPIMAGE
dart pub global activate --source git https://github.com/ente-io/flutter_distributor_fork --git-ref develop --git-path packages/flutter_distributor
flutter_distributor package --platform=linux --targets=appimage --skip-clean
mv dist/**/*-*-linux.AppImage artifacts/ente-auth-v${{ env.VERSION_NAME }}-beta-x86_64.AppImage
# DEB
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/auth-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ jobs:
sudo apt-get install -y libsecret-1-dev libsodium-dev libfuse2 ninja-build libgtk-3-dev dpkg-dev pkg-config rpm patchelf libsqlite3-dev locate libayatana-appindicator3-dev libffi-dev libtiff5 xz-utils libarchive-tools libcurl4-openssl-dev
sudo updatedb --localpaths='/usr/lib/x86_64-linux-gnu'

- name: Install fpm for RPM packaging
run: |
sudo gem install fpm

- name: Install appimagetool
run: |
wget -O appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
Expand All @@ -155,11 +159,13 @@ jobs:
- name: Build desktop app
run: |
flutter config --enable-linux-desktop
dart pub global activate --source git https://github.com/ente-io/flutter_distributor_fork --git-ref develop --git-path packages/flutter_distributor
# RPM
flutter_distributor package --platform=linux --targets=rpm --skip-clean
mv dist/**/*-*-linux.rpm artifacts/ente-${{ github.ref_name }}-x86_64.rpm
# Build Linux app
flutter build linux --release
# RPM - using custom build script
./linux/packaging/build_rpm.sh
mv dist/*/*.rpm artifacts/ente-${{ github.ref_name }}-x86_64.rpm
# APPIMAGE
dart pub global activate --source git https://github.com/ente-io/flutter_distributor_fork --git-ref develop --git-path packages/flutter_distributor
flutter_distributor package --platform=linux --targets=appimage --skip-clean
mv dist/**/*-*-linux.AppImage artifacts/ente-${{ github.ref_name }}-x86_64.AppImage
# DEB
Expand Down
121 changes: 121 additions & 0 deletions mobile/apps/auth/linux/packaging/build_rpm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
#!/bin/bash

set -e

# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color

echo -e "${GREEN}Building Ente Auth RPM package${NC}"

# Get script directory (location of this script)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"

cd "$PROJECT_ROOT"

# Extract version from pubspec.yaml
FULL_VERSION=$(grep -E "^version:" pubspec.yaml | cut -d' ' -f2)
VERSION=$(echo "$FULL_VERSION" | cut -d'+' -f1)
if [ -z "$VERSION" ]; then
echo -e "${RED}Error: Could not extract version from pubspec.yaml${NC}"
exit 1
fi

echo -e "${YELLOW}Full Version: ${FULL_VERSION}${NC}"
echo -e "${YELLOW}RPM Version: ${VERSION}${NC}"

# Define directories
STAGING_DIR="dist/rpm-staging"
OUTPUT_DIR="dist/$FULL_VERSION"
BUNDLE_DIR="build/linux/x64/release/bundle"

# Clean up any existing staging directory
if [ -d "$STAGING_DIR" ]; then
echo -e "${YELLOW}Cleaning existing staging directory...${NC}"
rm -rf "$STAGING_DIR"
fi

# Create staging directories
echo -e "${YELLOW}Creating staging directories...${NC}"
mkdir -p "$STAGING_DIR/usr/share/enteauth"
mkdir -p "$STAGING_DIR/usr/share/metainfo"
mkdir -p "$STAGING_DIR/usr/share/pixmaps"
mkdir -p "$STAGING_DIR/usr/share/applications"
mkdir -p "$STAGING_DIR/usr/bin"

# Create output directory
mkdir -p "$OUTPUT_DIR"

# Verify build directory exists
if [ ! -d "$BUNDLE_DIR" ]; then
echo -e "${RED}Error: Build directory not found at $BUNDLE_DIR${NC}"
echo -e "${YELLOW}Please run 'flutter build linux --release' first${NC}"
exit 1
fi

# Copy Flutter build files
echo -e "${YELLOW}Copying Flutter build files...${NC}"
cp -r "$BUNDLE_DIR"/* "$STAGING_DIR/usr/share/enteauth/"

# Copy metainfo file
echo -e "${YELLOW}Copying metainfo file...${NC}"
cp linux/packaging/enteauth.appdata.xml "$STAGING_DIR/usr/share/metainfo/"

# Copy icon
echo -e "${YELLOW}Copying icon...${NC}"
cp "$BUNDLE_DIR/data/flutter_assets/assets/icons/auth-icon.png" "$STAGING_DIR/usr/share/pixmaps/enteauth.png"

# Copy desktop file
echo -e "${YELLOW}Copying desktop file...${NC}"
cp linux/packaging/enteauth.desktop "$STAGING_DIR/usr/share/applications/"

# Create symlink
echo -e "${YELLOW}Creating symlink...${NC}"
ln -s /usr/share/enteauth/enteauth "$STAGING_DIR/usr/bin/enteauth"

# Check if fpm is installed
if ! command -v fpm &> /dev/null; then
echo -e "${RED}Error: fpm is not installed${NC}"
echo -e "${YELLOW}Install it with: gem install fpm${NC}"
exit 1
fi

# Build RPM package
echo -e "${YELLOW}Building RPM package...${NC}"
fpm -s dir -t rpm \
-n enteauth \
-v "$VERSION" \
--vendor "Ente.io" \
--maintainer "Ente.io Developers <[email protected]>" \
--license "AGPLv3" \
--url "https://github.com/ente-io/ente" \
--description "2FA app with free end-to-end encrypted backup and sync" \
--category "Application/Utility" \
--depends sqlite-libs \
--depends libsecret \
--depends libappindicator \
-C "$STAGING_DIR" \
-p "$OUTPUT_DIR/enteauth-VERSION.ARCH.rpm" \
.

# Clean up staging directory
echo -e "${YELLOW}Cleaning up staging directory...${NC}"
rm -rf "$STAGING_DIR"

# Display success message
RPM_FILE=$(ls "$OUTPUT_DIR"/enteauth-*.rpm 2>/dev/null | head -n1)
if [ -f "$RPM_FILE" ]; then
RPM_SIZE=$(du -h "$RPM_FILE" | cut -f1)
echo -e "${GREEN}✓ RPM package created successfully!${NC}"
echo -e "${GREEN} Location: $RPM_FILE${NC}"
echo -e "${GREEN} Size: $RPM_SIZE${NC}"
echo ""
echo -e "${YELLOW}Install with:${NC}"
echo -e " sudo rpm -ivh $RPM_FILE"
else
echo -e "${RED}Error: RPM package not found${NC}"
exit 1
fi
10 changes: 10 additions & 0 deletions mobile/apps/auth/linux/packaging/enteauth.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Desktop Entry]
Name=Auth
GenericName=Ente Authenticator
Exec=enteauth %U
Icon=enteauth
Type=Application
Categories=Utility;
Keywords=Authentication;2FA;
MimeType=x-scheme-handler/enteauth;
StartupNotify=false