PKGBUILD 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Maintainer: Sefa Eyeoglu <contact@scrumplex.net>
  2. _branch=dev
  3. pkgname=espanso-wayland-git
  4. pkgver=2.1.5.beta.r17.g930bf80
  5. pkgrel=2
  6. pkgdesc="Cross-platform Text Expander written in Rust"
  7. arch=(x86_64)
  8. url="https://espanso.org/"
  9. license=("GPL3")
  10. depends=("libnotify" "wxgtk3" "libxkbcommon" "wl-clipboard")
  11. makedepends=("rust" "git" "cmake" "cargo-make" "rust-script")
  12. provides=("${pkgname%-wayland-git}" "${pkgname%-git}")
  13. conflicts=("${pkgname%-wayland-git}" "${pkgname%-git}")
  14. options=("!lto") # fails with LTO as of 2022-03
  15. install=espanso-wayland.install
  16. source=("git+https://github.com/federico-terzi/espanso.git#branch=${_branch}")
  17. sha512sums=('SKIP')
  18. pkgver() {
  19. cd "espanso"
  20. git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
  21. }
  22. prepare() {
  23. cd "espanso"
  24. # don't change the original service file, as it will be embedded in the binary
  25. cp "espanso/src/res/linux/systemd.service" "systemd.service"
  26. sed -i "s|{{{espanso_path}}}|/usr/bin/espanso|g" "systemd.service"
  27. }
  28. build() {
  29. cd "espanso"
  30. cargo make --env NO_X11=true --profile release build-binary
  31. }
  32. package() {
  33. cd "espanso"
  34. install -Dm755 "target/release/espanso" "${pkgdir}/usr/bin/espanso"
  35. install -Dm644 "systemd.service" "${pkgdir}/usr/lib/systemd/user/espanso.service"
  36. install -Dm644 "README.md" "${pkgdir}/usr/share/doc/espanso/README.md"
  37. }