Levminer / authme

Simple cross-platform two-factor (2FA) authenticator app for desktop.
https://authme.levminer.com
GNU General Public License v3.0
338 stars 28 forks source link

Add an AUR for Arch Linux #227

Open ghost opened 2 years ago

ghost commented 2 years ago

Before the feature request.

Your feature request related to the problem

Add an AUR package to download in arch linux based systems.

Describe the solution you'd like or alternatives you've considered


Additional information

No response

bsd-source commented 8 months ago

I created a PKGBUILD file for Arch Linux to build a valid Arch Linux Package. I'm sure it could use some refinements before someone submits it to the Arch Aur package repository.

# Maintainer: Your Name <youremail@domain.com>
pkgname=authme
pkgver=4.2.1
pkgrel=1
pkgdesc="Simple cross-platform two-factor (2FA) authenticator app for desktop."
arch=(x86_64)
url="https://github.com/Levminer/authme"
license=('GPL3')
depends=('webkit2gtk')
makedepends=('git' 'rust' 'cargo-tauri' 'npm' 'hicolor-icon-theme')
source=("https://github.com/Levminer/$pkgname/archive/$pkgver.tar.gz")
md5sums=('SKIP')

build() {
    cd "$pkgname-$pkgver"
    npm i
    # disable automatic update on linux. avoids tauri signing key error.
    sed  -i '0,/\"active\": true/! {0,/\"active\": true/ s/\"active\": true/\"active\": false/}' core/tauri.conf.json
    sudo npm run build
}

package() {
    # copy the files we need into the package directory prior to building the package
    cp -r $pkgname-$pkgver/core/target/release/bundle/deb/authme_4.2.1_amd64/data/usr $pkgdir/
}

I attached the PKGBUILD file. I had to rename it to PKGBUILD.txt so github would accept it as a valid attachement. PKGBUILD.txt

Installing the created package will result in the following valid install:

  1. /usr/bin/authme
  2. /usr/share/icons/hicolor/128x128/apps/authme.png
  3. /usr/share/icons/hicolor/32x32/apps/authme.png
  4. /usr/share/icons/hicolor/256x256@2/apps/authme.png
  5. /usr/share/applications/authme.desktop

The following are some issues I noticed with the Authme Settings under Arch Linux:

[AUTHME ERROR] (2024. 01. 08. 10:29:10) Unknown runtime error occurred: Unknown error

I hope the information I provided could be useful to someone.