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

[Request] espanso #3071

Closed
Scorpi-ON opened this issue Mar 19, 2024 · 2 comments
Closed

[Request] espanso #3071

Scorpi-ON opened this issue Mar 19, 2024 · 2 comments
Labels
reject:too-hard-for-us Package that requires a lot of resources/time to build/maintain. request:new-pkg New package requested. waiting:upstream-fix Waiting for fix in AUR or in the project iself.

Comments

@Scorpi-ON
Copy link

Package:

https://aur.archlinux.org/pkgbase/espanso

Purpose:

Multifunctional text expander with support of snippets, forms, scripting and other extensions.
Extremely useful and convenient.

Benefits:

Almost the only open source application of its kind that supports Linux (and, importantly, Wayland) and is not outdated.

Building:

The package has a bit different ways of building under X11 and Wayland. So I decided to attach the PKGBUILD:

pkgbase=espanso
pkgname=(
  espanso-x11
  espanso-wayland
)
pkgver=2.2.1
pkgrel=4
pkgdesc="Cross-platform Text Expander written in Rust"
arch=(x86_64)
url="https://github.com/espanso/espanso"
license=(GPL-3.0-only)
makedepends=(
  bzip2
  cargo
  dbus
  gcc-libs
  glibc
  libx11
  libxcb
  libxkbcommon
  libxtst
  openssl
  wl-clipboard
  wxwidgets-common
  wxwidgets-gtk3
  xclip
  xdotool
)

source=("$pkgbase-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('795663cb64c28322b667998f95910134b042be2baaace5506790f7e44ae3be91')
options=(!lto)

_archive="$pkgbase-$pkgver"

prepare() {
  cd "$_archive"

  export RUSTUP_TOOLCHAIN=stable
  cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"

  # Don't change the original service file, as it will be embedded in the
  # binary
  sed 's|{{{espanso_path}}}|/usr/bin/espanso|g' espanso/src/res/linux/systemd.service \
    > espanso.service

  # Icon name
  sed 's/Icon=icon/Icon=espanso/g' espanso/src/res/linux/espanso.desktop \
    > espanso.desktop
}

build() {
  cd "$_archive"

  export RUSTUP_TOOLCHAIN=stable

  export CARGO_TARGET_DIR=target-x11
  cargo build --frozen --release \
    --manifest-path espanso/Cargo.toml \
    --package espanso

  export CARGO_TARGET_DIR=target-wayland
  cargo build --frozen --release \
    --features wayland \
    --manifest-path espanso/Cargo.toml \
    --package espanso
}

check() {
  cd "$_archive"

  # Skip failing tests - unsure why they fail
  export RUSTUP_TOOLCHAIN=stable
  cargo test --frozen --all-features -- \
    --skip tests::ipc_multiple_clients \
    --skip tests::test_migration
}

package_espanso-x11() {
  pkgdesc+=" (built for X11)"
  depends=(
    bzip2
    dbus
    gcc-libs
    glibc
    libx11
    libxcb
    libxkbcommon
    libxtst
    openssl
    wxwidgets-common
    wxwidgets-gtk3
    xclip
    xdotool
  )
  provides=(espanso)
  conflicts=(espanso)
  replaces=(espanso)

  cd "$_archive"

  install -Dm755 -t "$pkgdir/usr/bin" target-x11/release/espanso
  install -Dm644 -t "$pkgdir/usr/lib/systemd/user" espanso.service
  install -Dm644 -t "$pkgdir/usr/share/applications" espanso.desktop
  install -Dm644 -t "$pkgdir/usr/share/doc/espanso" ./*.md
  install -Dm644 espanso/src/res/linux/icon.png \
    "$pkgdir/usr/share/pixmaps/espanso.png"
}

package_espanso-wayland() {
  pkgdesc="$pkgdesc (built for Wayland)"
  depends=(
    bzip2
    dbus
    gcc-libs
    glibc
    libxkbcommon
    openssl
    wl-clipboard
    wxwidgets-common
    wxwidgets-gtk3
  )
  provides=(espanso)
  conflicts=(espanso)
  install=espanso-wayland.install

  cd "$_archive"

  install -Dm755 -t "$pkgdir/usr/bin" target-wayland/release/espanso
  install -Dm644 -t "$pkgdir/usr/lib/systemd/user" espanso.service
  install -Dm644 -t "$pkgdir/usr/share/applications" espanso.desktop
  install -Dm644 -t "$pkgdir/usr/share/doc/espanso" ./*.md
  install -Dm644 espanso/src/res/linux/icon.png \
    "$pkgdir/usr/share/pixmaps/espanso.png"
}

Copyright:

GPL-3.0-only

Expected Interest:

Most

Already available?

No

Unique request?

Yes

Banned package?

No

More information:

No response

@Scorpi-ON Scorpi-ON added the request:new-pkg New package requested. label Mar 19, 2024
@xiota
Copy link
Contributor

xiota commented Mar 21, 2024

Rejected as long as the replaces directive is present.

Note: -git package has same defect.

@xiota xiota added waiting:upstream-fix Waiting for fix in AUR or in the project iself. reject:too-hard-for-us Package that requires a lot of resources/time to build/maintain. labels Mar 21, 2024
@xiota
Copy link
Contributor

xiota commented Jun 29, 2024

Closing because I have no intention to make an interfere or bother the maintainer.

There is a reasonable chance this will eventually be moved to the Extra repo because the maintainer is a PM.

@xiota xiota closed this as completed Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reject:too-hard-for-us Package that requires a lot of resources/time to build/maintain. request:new-pkg New package requested. waiting:upstream-fix Waiting for fix in AUR or in the project iself.
Development

No branches or pull requests

2 participants