summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessandro Bernardello2024-03-31 01:56:06 +0100
committerAlessandro Bernardello2024-03-31 01:56:06 +0100
commit81b2a23a7e66ef6c3cf7399676cd89ad8761d18f (patch)
treedcc99d47fe46dd7f7043dd9cf34ac655e0dcce6e
downloadaur-81b2a23a7e66ef6c3cf7399676cd89ad8761d18f.tar.gz
initial commit
-rw-r--r--.SRCINFO38
-rw-r--r--PKGBUILD52
-rw-r--r--ente-auth-git.install16
-rw-r--r--ente_auth.desktop11
4 files changed, 117 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a1e06eb7722f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,38 @@
+pkgbase = ente-auth-git
+ pkgdesc = Ente two-factor authenticator.
+ pkgver = auth.v2.0.50.r33.ge1ac5e739
+ pkgrel = 1
+ url = https://github.com/ente-io/ente/tree/main/auth
+ install = ente-auth-git.install
+ arch = x86_64
+ license = AGPL-3.0
+ makedepends = flutter
+ makedepends = flutter-tool
+ depends = at-spi2-core
+ depends = ayatana-ido
+ depends = cairo
+ depends = desktop-file-utils
+ depends = gcc-libs
+ depends = gdk-pixbuf2
+ depends = glib2
+ depends = glibc
+ depends = gtk3
+ depends = harfbuzz
+ depends = hicolor-icon-theme
+ depends = libappindicator-gtk3
+ depends = libayatana-appindicator
+ depends = libsecret
+ depends = libsodium
+ depends = pango
+ depends = sqlite
+ depends = webkit2gtk
+ provides = ente-auth
+ conflicts = ente-auth
+ options = !strip
+ options = !emptydirs
+ source_x86_64 = git+https://github.com/ente-io/auth.git
+ source_x86_64 = ente_auth.desktop
+ sha512sums_x86_64 = SKIP
+ sha512sums_x86_64 = ae03fe007d28ad9ccbda6f48aa5635f233e283fa34e264e636a76263c9f32bad4a31c02aafefa9af7b04714eaebbce3bae0dd13aaea28fe110c0f9a8bbcf48bc
+
+pkgname = ente-auth-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0186370390f4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Alessandro Bernardello
+# Contributor: Alessandro Bernardello
+pkgname=ente-auth-git
+pkgver=auth.v2.0.50.r33.ge1ac5e739
+pkgrel=1
+pkgdesc="Ente two-factor authenticator."
+arch=('x86_64')
+url="https://github.com/ente-io/ente/tree/main/auth"
+license=('AGPL-3.0')
+depends=('at-spi2-core' 'ayatana-ido' 'cairo' 'desktop-file-utils' 'gcc-libs' 'gdk-pixbuf2' 'glib2' 'glibc' 'gtk3' 'harfbuzz' 'hicolor-icon-theme' 'libappindicator-gtk3' 'libayatana-appindicator' 'libsecret' 'libsodium' 'pango' 'sqlite' 'webkit2gtk')
+makedepends=('flutter' 'flutter-tool')
+options=('!strip' '!emptydirs')
+install=${pkgname}.install
+source_x86_64=("git+https://github.com/ente-io/auth.git"
+ "ente_auth.desktop"
+)
+sha512sums_x86_64=('SKIP'
+ 'ae03fe007d28ad9ccbda6f48aa5635f233e283fa34e264e636a76263c9f32bad4a31c02aafefa9af7b04714eaebbce3bae0dd13aaea28fe110c0f9a8bbcf48bc')
+provides=('ente-auth')
+conflicts=('ente-auth')
+
+pkgver() {
+ cd "$srcdir/auth"
+ # cutting off 'v' prefix that presents in the git tag
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare(){
+ cd "$srcdir/auth"
+ git submodule update --init --recursive
+}
+
+build() {
+ # i really don't know how to make flutter strip all references to the build directory
+ # this means that the build won't be truly reproducible and makepkg will spam warnings about references to $srcdir in the built package
+ # this should be safe to ignore anyways
+ cd "$srcdir/auth/auth"
+ flutter pub get
+ flutter build linux --release
+}
+
+package(){
+ # this could probably be done better
+ install -m755 -d "$srcdir/auth/auth/build/linux/x64/release/bundle/" "$pkgdir/usr/share/ente_auth"
+ cp -R "$srcdir/auth/auth/build/linux/x64/release/bundle/"* "$pkgdir/usr/share/ente_auth/"
+ chmod 755 "$pkgdir/usr/share/ente_auth/ente_auth"
+ find $pkgdir/usr/share/ente_auth/data -type d -exec chmod 755 {} +
+ find $pkgdir/usr/share/ente_auth/data -type f -exec chmod 644 {} +
+ find $pkgdir/usr/share/ente_auth/lib -type d -exec chmod 755 {} +
+ find $pkgdir/usr/share/ente_auth/lib -type f -exec chmod 644 {} +
+ install -Dm644 "$srcdir/ente_auth.desktop" "${pkgdir}/usr/share/applications/ente_auth.desktop"
+}
diff --git a/ente-auth-git.install b/ente-auth-git.install
new file mode 100644
index 000000000000..a189880932fb
--- /dev/null
+++ b/ente-auth-git.install
@@ -0,0 +1,16 @@
+post_install() {
+ ln -s /usr/share/ente_auth/ente_auth /usr/bin/ente_auth
+ chmod +x /usr/bin/ente_auth
+ ln -s /usr/share/ente-auth/data/flutter_assets/assets/icons/auth-icon.png /usr/share/icons/hicolor/256x256/apps/ente_auth.png
+ ln -s /usr/share/ente-auth/data/flutter_assets/assets/icons/auth-icon.png /usr/share/icons/hicolor/128x128/apps/ente_auth.png
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ rm /usr/bin/ente_auth
+ rm /usr/share/icons/hicolor/256x256/apps/ente_auth.png
+ rm /usr/share/icons/hicolor/128x128/apps/ente_auth.png
+} \ No newline at end of file
diff --git a/ente_auth.desktop b/ente_auth.desktop
new file mode 100644
index 000000000000..a597fefbbe35
--- /dev/null
+++ b/ente_auth.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Type=Application
+Version=2.0.50+250
+Name=Auth
+GenericName=Ente Authentication
+Icon=ente_auth
+Exec=ente_auth %U
+MimeType=x-scheme-handler/ente;
+Categories=Utility;
+Keywords=Authentication;2FA;
+StartupNotify=false% \ No newline at end of file