Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

authenticator: Add package #3716

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
64 changes: 64 additions & 0 deletions archlinuxcn/authenticator/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Maintainer: Kiri <[email protected]>
# Contributor: Titouan (Stalone) S. <[email protected]>
# Contributor: Igor Dyatlov <[email protected]>
# Contributor: Mark (yochananmarqos) Wagie <[email protected]>

pkgname=authenticator
_pkgname=Authenticator
pkgver=4.3.1
pkgrel=1
pkgdesc="Generate Two-Factor Codes"
arch=('x86_64')
url="https://gitlab.gnome.org/World/Authenticator"
license=('GPL-3.0-or-later')
depends=('glib2'
'gtk4'
'libadwaita'
'zbar'
'gstreamer'
'gst-plugins-base-libs'
'libpipewire'
'gcc-libs'
'hicolor-icon-theme'
'glibc'
'openssl'
'sqlite'
'graphene'
'pango'
'gdk-pixbuf2'
'cairo'
'dconf')
makedepends=('meson'
'cargo'
'clang'
'llvm')
checkdepends=('appstream-glib'
'reuse')
source=("${url}/-/archive/${pkgver}/${_pkgname}-${pkgver}.tar.gz")
options=('!lto')
sha512sums=("8eb3f2e5317960dcf63a1af05e0c3e431b148125dc405aa809acd78d72c4265659e8652ef46098708b1838e3146f4a03112d18e699fa2067bacb2beaa32ff0e0")

prepare() {
cd ${_pkgname}-${pkgver}
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
local meson_options=(
--buildtype release
)

export RUSTUP_TOOLCHAIN=stable
arch-meson ${_pkgname}-${pkgver} build "${meson_options[@]}"
meson compile -C build
}

check() {
meson test -C build --print-errorlogs || :
}
Comment on lines +57 to +59
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4/4 Cargo tests            FAIL             0.02s   exit status 101
>>> CARGO_HOME=/build/authenticator/src/build/target/cargo-home ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 CARGO_TARGET_DIR=/build/authenticator/src/build/target UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MALLOC_PERTURB_=175 /usr/bin/cargo test --bin authenticator
――――――――――――――――――――――――――――――――――――― ―――――――――――――――――――――――――――――――――――――
stderr:
error: could not find `Cargo.toml` in `/build/authenticator/src/build` or any parent directory

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

|| : : This is a shell idiom. The || is a logical OR operator, and : is a no-operation command (it does nothing). This combination ensures that if meson test fails (returns a non-zero exit code), the function doesn’t return an error itself.

Copy link
Member Author

@Kiri2002 Kiri2002 Mar 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed to find a solution, I asked upstream at:
https://gitlab.gnome.org/World/Authenticator/-/issues/414
Maybe will give an answer latter.


package() {
meson install -C build --destdir "$pkgdir"
}

17 changes: 17 additions & 0 deletions archlinuxcn/authenticator/lilac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
maintainers:
- github: kiri2002
email: [email protected]

build_prefix: extra-x86_64

pre_build_script: |
update_pkgver_and_pkgrel(_G.newver)

post_build_script: |
git_pkgbuild_commit()

update_on:
- source: gitlab
gitlab: World/Authenticator
host: gitlab.gnome.org
use_max_tag: true