diff options
-rw-r--r-- | .SRCINFO | 70 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | .nvchecker.toml | 5 | ||||
-rw-r--r-- | PKGBUILD | 147 | ||||
-rw-r--r-- | espanso-wayland.install | 7 | ||||
-rw-r--r-- | espanso.install | 5 |
6 files changed, 190 insertions, 50 deletions
@@ -1,21 +1,59 @@ pkgbase = espanso pkgdesc = Cross-platform Text Expander written in Rust - pkgver = 0.7.2 - pkgrel = 3 - url = https://espanso.org/ - install = espanso.install + pkgver = 2.2.1 + pkgrel = 4 + url = https://github.com/espanso/espanso arch = x86_64 - license = GPL3 - makedepends = rust - makedepends = git - makedepends = cmake - depends = xdotool - depends = xclip - depends = libxtst - depends = libnotify - optdepends = modulo: Support for interactive forms - source = espanso::git+https://github.com/federico-terzi/espanso.git#tag=v0.7.2 - sha512sums = SKIP + license = GPL-3.0-only + makedepends = bzip2 + makedepends = cargo + makedepends = dbus + makedepends = gcc-libs + makedepends = glibc + makedepends = libx11 + makedepends = libxcb + makedepends = libxkbcommon + makedepends = libxtst + makedepends = openssl + makedepends = wl-clipboard + makedepends = wxwidgets-common + makedepends = wxwidgets-gtk3 + makedepends = xclip + makedepends = xdotool + options = !lto + source = espanso-2.2.1.tar.gz::https://github.com/espanso/espanso/archive/v2.2.1.tar.gz + sha256sums = 795663cb64c28322b667998f95910134b042be2baaace5506790f7e44ae3be91 -pkgname = espanso +pkgname = espanso-x11 + pkgdesc = Cross-platform Text Expander written in Rust (built for X11) + depends = bzip2 + depends = dbus + depends = gcc-libs + depends = glibc + depends = libx11 + depends = libxcb + depends = libxkbcommon + depends = libxtst + depends = openssl + depends = wxwidgets-common + depends = wxwidgets-gtk3 + depends = xclip + depends = xdotool + provides = espanso + conflicts = espanso + replaces = espanso +pkgname = espanso-wayland + pkgdesc = Cross-platform Text Expander written in Rust (built for Wayland) + install = espanso-wayland.install + depends = bzip2 + depends = dbus + depends = gcc-libs + depends = glibc + depends = libxkbcommon + depends = openssl + depends = wl-clipboard + depends = wxwidgets-common + depends = wxwidgets-gtk3 + provides = espanso + conflicts = espanso diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..35ac95214865 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +* +!.gitignore +!.nvchecker.toml +!.SRCINFO +!PKGBUILD +!espanso-wayland.install diff --git a/.nvchecker.toml b/.nvchecker.toml new file mode 100644 index 000000000000..c5ffb7e30769 --- /dev/null +++ b/.nvchecker.toml @@ -0,0 +1,5 @@ +[espanso] +source = "github" +github = "espanso/espanso" +prefix = "v" +use_latest_release = true @@ -1,49 +1,138 @@ -# Maintainer: Sefa Eyeoglu <contact@scrumplex.net> +# Maintainer: Carl Smedstad <carl.smedstad at protonmail dot com> +# Contributor: Sefa Eyeoglu <contact@scrumplex.net> -_pkgname=espanso -pkgname=${_pkgname} -pkgver=0.7.2 -pkgrel=3 +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://espanso.org/" -license=("GPL3") -depends=("xdotool" "xclip" "libxtst" "libnotify") -optdepends=("modulo: Support for interactive forms") -makedepends=("rust" "git" "cmake") -install="${pkgname}.install" -source=("${_pkgname}::git+https://github.com/federico-terzi/espanso.git#tag=v${pkgver}") -sha512sums=('SKIP') +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 "$_pkgname" + 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 +} - # don't change the original service file, as it will be embedded in the binary - cp "src/res/linux/systemd.service" "systemd.service" - sed -i "s|{{{espanso_path}}}|/usr/bin/espanso|g" "systemd.service" +build() { + cd "$_archive" + + export RUSTUP_TOOLCHAIN=stable + + export CARGO_TARGET_DIR=target-x11 + cargo build --frozen --release \ + --manifest-path espanso/Cargo.toml \ + --package espanso - cargo update -p serde --precise 1.0.117 - cargo update -p serde_yaml --precise 0.8.14 + export CARGO_TARGET_DIR=target-wayland + cargo build --frozen --release \ + --features wayland \ + --manifest-path espanso/Cargo.toml \ + --package espanso } check() { - cd "$_pkgname" + cd "$_archive" - cargo test --release --locked + # 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 } -build() { - cd "$_pkgname" +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" - cargo build --release --locked + 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() { - cd "$_pkgname" +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 - install -Dm755 "target/release/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}" - install -Dm644 "systemd.service" "${pkgdir}/usr/lib/systemd/user/${_pkgname}.service" # install our own copy + cd "$_archive" - install -Dm644 "README.md" "${pkgdir}/usr/share/doc/${_pkgname}/README.md" + 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" } diff --git a/espanso-wayland.install b/espanso-wayland.install new file mode 100644 index 000000000000..9b273ae6f95d --- /dev/null +++ b/espanso-wayland.install @@ -0,0 +1,7 @@ +function post_install { + setcap "cap_dac_override+p" /usr/bin/espanso +} + +function post_upgrade() { + post_install "$1" +} diff --git a/espanso.install b/espanso.install deleted file mode 100644 index 1988618ab6db..000000000000 --- a/espanso.install +++ /dev/null @@ -1,5 +0,0 @@ -function post_install { - echo " -To start espanso automatically when you log in, enable the systemd user service: espanso register -" -} |