blob: e839cbd64d379d56e2149eede45ce0c727a5de10 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# Copyright 2026 Gurov <thuggerthugger1@duck.com>
# Distributed under the terms of the GNU General Public License v2
require freedesktop-desktop freedesktop-mime gtk-icon-cache
SUMMARY="End-to-end encrypted two-factor authenticator"
HOMEPAGE="https://ente.io/auth/ https://github.com/ente-io/ente"
DOWNLOADS="https://github.com/ente-io/ente/releases/download/auth-v${PV}/ente-auth-v${PV}-x86_64.AppImage -> ${PNV}.AppImage"
LICENCES="AGPL-3+"
SLOT="0"
PLATFORMS="~amd64"
RESTRICT="mirror strip test"
DEPENDENCIES="
build:
sys-fs/squashfs-tools
run:
dev-libs/libayatana-appindicator
dev-libs/libepoxy
dev-libs/libsecret:1
dev-libs/openssl:3
net-misc/curl
sys-libs/zlib
x11-libs/gtk+:3
"
WORK="${WORKBASE}/squashfs-root"
pkg_setup() {
exdirectory --allow /opt
}
src_unpack() {
local checksum
checksum=$(sha256sum "${FETCHEDDIR}/${PNV}.AppImage") || die "Cannot checksum Ente Auth AppImage"
[[ ${checksum%% *} == c85f4a9a75e8b97a54f99a7f6db4307275b42f6465d76515354fe42231e12b85 ]] ||
die "Ente Auth AppImage changed; check version before updating checksum"
edo unsquashfs -offset 944632 -dest "${WORK}" "${FETCHEDDIR}/${PNV}.AppImage"
}
src_install() {
edo mkdir -p "${IMAGE}/opt/enteauth"
edo cp -a "${WORK}/data" "${WORK}/lib" "${WORK}/enteauth" "${IMAGE}/opt/enteauth/"
edo rm "${IMAGE}/opt/enteauth/lib/libdartjni.so"
exeinto /usr/$(exhost --target)/bin
newexe "${FILES}/enteauth-launcher" enteauth
insinto /usr/share/applications
edo sed 's@^Exec=.*@Exec=enteauth %u@' "${WORK}/enteauth.desktop" > "${WORKBASE}/enteauth.desktop" || die
doins "${WORKBASE}/enteauth.desktop"
insinto /usr/share/icons
doins -r "${WORK}/usr/share/icons/hicolor"
insinto /usr/share/pixmaps
doins "${WORK}/enteauth.png"
insinto /usr/share/metainfo
doins "${WORK}/usr/share/metainfo/ente_auth.appdata.xml"
}
pkg_postinst() {
freedesktop-mime_pkg_postinst
freedesktop-desktop_pkg_postinst
gtk-icon-cache_pkg_postinst
}
pkg_postrm() {
freedesktop-mime_pkg_postrm
freedesktop-desktop_pkg_postrm
gtk-icon-cache_pkg_postrm
}
|