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
60 changes: 60 additions & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -353,3 +353,63 @@ jobs:
releaseDraft: false
prerelease: false
args: ${{ matrix.args }}


# Create tar.gz archives for AUR (Arch Linux)
create-aur-tarball:
needs: [publish-tauri]
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- name: Get version from tag
id: get_version
run: |
if [ "${{ github.event_name }}" = "release" ]; then
TAG="${{ github.event.release.tag_name }}"
else
TAG="${{ github.event.inputs.tag }}"
fi
VERSION="${TAG#v}"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "tag=${TAG}" >> $GITHUB_OUTPUT

- name: Download Linux deb from release
run: |
VERSION="${{ steps.get_version.outputs.version }}"
TAG="${{ steps.get_version.outputs.tag }}"

# Wait for release assets to be available
sleep 30

# Download the deb package
curl -fLo pictopy.deb "https://github.com/AOSSIE-Org/PictoPy/releases/download/${TAG}/picto-py_${VERSION}_amd64.deb" || \
curl -fLo pictopy.deb "https://github.com/AOSSIE-Org/PictoPy/releases/download/${TAG}/PictoPy_${VERSION}_amd64.deb"

- name: Extract and repackage as tar.gz
run: |
VERSION="${{ steps.get_version.outputs.version }}"

# Extract deb package
mkdir -p extract
dpkg-deb -x pictopy.deb extract/

# Create tar.gz with proper structure
cd extract
tar -czvf "../pictopy_${VERSION}_amd64.tar.gz" .
cd ..

# Calculate checksum
sha256sum "pictopy_${VERSION}_amd64.tar.gz" > "pictopy_${VERSION}_amd64.tar.gz.sha256"

- name: Upload tar.gz to release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.get_version.outputs.tag }}
files: |
pictopy_${{ steps.get_version.outputs.version }}_amd64.tar.gz
pictopy_${{ steps.get_version.outputs.version }}_amd64.tar.gz.sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
162 changes: 162 additions & 0 deletions .github/workflows/publish-aur.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
name: Publish to AUR

on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: "Tag name for the release (e.g., v1.1.0)"
required: true
type: string

jobs:
publish-aur:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Get version from tag
id: get_version
run: |
if [ "${{ github.event_name }}" = "release" ]; then
TAG="${{ github.event.release.tag_name }}"
else
TAG="${{ github.event.inputs.tag }}"
fi
# Remove 'v' prefix if present
VERSION="${TAG#v}"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- name: Wait for release assets
run: |
echo "Waiting for release assets to be available..."
sleep 60
- name: Calculate SHA256 checksums
id: checksums
run: |
VERSION="${{ steps.get_version.outputs.version }}"
BASE_URL="https://github.com/AOSSIE-Org/PictoPy/releases/download/v${VERSION}"
# Download and calculate checksums for x86_64
echo "Downloading x86_64 tarball..."
if curl -fLo pictopy_amd64.tar.gz "${BASE_URL}/pictopy_${VERSION}_amd64.tar.gz"; then
SHA256_X86_64=$(sha256sum pictopy_amd64.tar.gz | cut -d' ' -f1)
echo "sha256_x86_64=${SHA256_X86_64}" >> $GITHUB_OUTPUT
else
echo "sha256_x86_64=SKIP" >> $GITHUB_OUTPUT
fi
# Download and calculate checksums for aarch64
echo "Downloading aarch64 tarball..."
if curl -fLo pictopy_arm64.tar.gz "${BASE_URL}/pictopy_${VERSION}_arm64.tar.gz"; then
SHA256_AARCH64=$(sha256sum pictopy_arm64.tar.gz | cut -d' ' -f1)
echo "sha256_aarch64=${SHA256_AARCH64}" >> $GITHUB_OUTPUT
else
echo "sha256_aarch64=SKIP" >> $GITHUB_OUTPUT
fi
- name: Update PKGBUILD
run: |
VERSION="${{ steps.get_version.outputs.version }}"
SHA256_X86_64="${{ steps.checksums.outputs.sha256_x86_64 }}"
SHA256_AARCH64="${{ steps.checksums.outputs.sha256_aarch64 }}"
cd aur
# Update version in PKGBUILD
sed -i "s/^pkgver=.*/pkgver=${VERSION}/" PKGBUILD
sed -i "s/^pkgrel=.*/pkgrel=1/" PKGBUILD
# Update source URLs
sed -i "s|pictopy_[0-9.]*_amd64|pictopy_${VERSION}_amd64|g" PKGBUILD
sed -i "s|pictopy_[0-9.]*_arm64|pictopy_${VERSION}_arm64|g" PKGBUILD
sed -i "s|/v[0-9.]*/|/v${VERSION}/|g" PKGBUILD
# Update checksums
if [ "${SHA256_X86_64}" != "SKIP" ]; then
sed -i "s/^sha256sums_x86_64=.*/sha256sums_x86_64=('${SHA256_X86_64}')/" PKGBUILD
fi
if [ "${SHA256_AARCH64}" != "SKIP" ]; then
sed -i "s/^sha256sums_aarch64=.*/sha256sums_aarch64=('${SHA256_AARCH64}')/" PKGBUILD
fi
cat PKGBUILD
- name: Generate .SRCINFO
run: |
cd aur
VERSION="${{ steps.get_version.outputs.version }}"
SHA256_X86_64="${{ steps.checksums.outputs.sha256_x86_64 }}"
SHA256_AARCH64="${{ steps.checksums.outputs.sha256_aarch64 }}"
cat > .SRCINFO << EOF
pkgbase = pictopy
pkgdesc = A privacy-focused photo management application with AI-powered tagging and face recognition
pkgver = ${VERSION}
pkgrel = 1
url = https://github.com/AOSSIE-Org/PictoPy
install = pictopy.install
arch = x86_64
arch = aarch64
license = MIT
makedepends = rust
makedepends = cargo
makedepends = nodejs
makedepends = npm
makedepends = python
makedepends = python-pip
makedepends = pyinstaller
makedepends = webkit2gtk-4.1
makedepends = base-devel
makedepends = curl
makedepends = wget
makedepends = file
makedepends = openssl
makedepends = appmenu-gtk-module
makedepends = librsvg
depends = webkit2gtk-4.1
depends = gtk3
depends = glib2
depends = cairo
depends = pango
depends = gdk-pixbuf2
depends = libsoup3
depends = openssl
depends = hicolor-icon-theme
optdepends = python-onnxruntime: For AI model inference
optdepends = python-opencv: For image processing
optdepends = python-numpy: For numerical operations
options = !strip
options = !emptydirs
source_x86_64 = pictopy-${VERSION}-x86_64.tar.gz::https://github.com/AOSSIE-Org/PictoPy/releases/download/v${VERSION}/pictopy_${VERSION}_amd64.tar.gz
sha256sums_x86_64 = ${SHA256_X86_64}
source_aarch64 = pictopy-${VERSION}-aarch64.tar.gz::https://github.com/AOSSIE-Org/PictoPy/releases/download/v${VERSION}/pictopy_${VERSION}_arm64.tar.gz
sha256sums_aarch64 = ${SHA256_AARCH64}
pkgname = pictopy
EOF
# Remove leading whitespace
sed -i 's/^ //' .SRCINFO
cat .SRCINFO
- name: Publish to AUR
uses: KSXGitHub/[email protected]
with:
pkgname: pictopy
pkgbuild: ./aur/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: "Update to version ${{ steps.get_version.outputs.version }}"
ssh_keyscan_types: ed25519
force_push: true
assets: |
./aur/pictopy.install
./aur/.SRCINFO
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,36 @@

PictoPy is an advanced desktop gallery application that combines the power of Tauri, React, and Rust for the frontend with a Python backend for sophisticated image analysis and management.

## Installation

### Arch Linux (AUR)

PictoPy is available on the Arch User Repository (AUR) for Arch-based distributions (Arch, Manjaro, EndeavourOS, etc.):

```bash
# Using yay
yay -S pictopy

# Using paru
paru -S pictopy

# Using pikaur
pikaur -S pictopy
```

For the development version built from source:
```bash
yay -S pictopy-git
```

### Other Linux Distributions

Download the AppImage or .deb package from the [Releases](https://github.com/AOSSIE-Org/PictoPy/releases) page.

### Windows & macOS

Download the installer from the [Releases](https://github.com/AOSSIE-Org/PictoPy/releases) page.

# Want to Contribute? 😄

&nbsp;&nbsp;&nbsp;<a href="https://discord.gg/hjUhu33uAn"><img src="https://github.com/user-attachments/assets/3ed93273-5055-4532-a524-87a337a4fbba" height="40"></a>
Expand Down
44 changes: 44 additions & 0 deletions aur/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
pkgbase = pictopy
pkgdesc = A privacy-focused photo management application with AI-powered tagging and face recognition
pkgver = 1.1.0
pkgrel = 1
url = https://github.com/AOSSIE-Org/PictoPy
install = pictopy.install
arch = x86_64
arch = aarch64
license = MIT
makedepends = rust
makedepends = cargo
makedepends = nodejs
makedepends = npm
makedepends = python
makedepends = python-pip
makedepends = pyinstaller
makedepends = webkit2gtk-4.1
makedepends = base-devel
makedepends = curl
makedepends = wget
makedepends = file
makedepends = openssl
makedepends = appmenu-gtk-module
makedepends = librsvg
depends = webkit2gtk-4.1
depends = gtk3
depends = glib2
depends = cairo
depends = pango
depends = gdk-pixbuf2
depends = libsoup3
depends = openssl
depends = hicolor-icon-theme
optdepends = python-onnxruntime: For AI model inference
optdepends = python-opencv: For image processing
optdepends = python-numpy: For numerical operations
options = !strip
options = !emptydirs
source_x86_64 = pictopy-1.1.0-x86_64.tar.gz::https://github.com/AOSSIE-Org/PictoPy/releases/download/v1.1.0/pictopy_1.1.0_amd64.tar.gz
sha256sums_x86_64 = SKIP
source_aarch64 = pictopy-1.1.0-aarch64.tar.gz::https://github.com/AOSSIE-Org/PictoPy/releases/download/v1.1.0/pictopy_1.1.0_arm64.tar.gz
sha256sums_aarch64 = SKIP

pkgname = pictopy
85 changes: 85 additions & 0 deletions aur/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Maintainer: AOSSIE <[email protected]>
# Contributor: PictoPy Team

pkgname=pictopy
pkgver=1.1.0
pkgrel=1
pkgdesc="A privacy-focused photo management application with AI-powered tagging and face recognition"
arch=('x86_64' 'aarch64')
url="https://github.com/AOSSIE-Org/PictoPy"
license=('MIT')
depends=(
'webkit2gtk-4.1'
'gtk3'
'glib2'
'cairo'
'pango'
'gdk-pixbuf2'
'libsoup3'
'openssl'
'hicolor-icon-theme'
)
makedepends=(
'rust'
'cargo'
'nodejs'
'npm'
'python'
'python-pip'
'pyinstaller'
'webkit2gtk-4.1'
'base-devel'
'curl'
'wget'
'file'
'openssl'
'appmenu-gtk-module'
'librsvg'
)
optdepends=(
'python-onnxruntime: For AI model inference'
'python-opencv: For image processing'
'python-numpy: For numerical operations'
)
options=('!strip' '!emptydirs')
install=${pkgname}.install
source_x86_64=("${pkgname}-${pkgver}-x86_64.tar.gz::${url}/releases/download/v${pkgver}/pictopy_${pkgver}_amd64.tar.gz")
source_aarch64=("${pkgname}-${pkgver}-aarch64.tar.gz::${url}/releases/download/v${pkgver}/pictopy_${pkgver}_arm64.tar.gz")
sha256sums_x86_64=('SKIP')
sha256sums_aarch64=('SKIP')

package() {
cd "${srcdir}"

# Install the main application binary
install -Dm755 "usr/bin/picto-py" "${pkgdir}/usr/bin/pictopy"

# Install libraries and resources
if [ -d "usr/lib" ]; then
cp -r usr/lib "${pkgdir}/usr/"
fi

# Install desktop entry
install -Dm644 "usr/share/applications/picto-py.desktop" \
"${pkgdir}/usr/share/applications/pictopy.desktop"

# Update desktop entry to use correct binary name
sed -i 's/Exec=picto-py/Exec=pictopy/g' "${pkgdir}/usr/share/applications/pictopy.desktop"

# Install icons
for size in 32x32 128x128 256x256; do
if [ -f "usr/share/icons/hicolor/${size}/apps/picto-py.png" ]; then
install -Dm644 "usr/share/icons/hicolor/${size}/apps/picto-py.png" \
"${pkgdir}/usr/share/icons/hicolor/${size}/apps/pictopy.png"
fi
done

# Install scalable icon if available
if [ -f "usr/share/icons/hicolor/scalable/apps/picto-py.svg" ]; then
install -Dm644 "usr/share/icons/hicolor/scalable/apps/picto-py.svg" \
"${pkgdir}/usr/share/icons/hicolor/scalable/apps/pictopy.svg"
fi

# Install license
install -Dm644 "${srcdir}/../LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" 2>/dev/null || true
}
Loading