PKGBUILD 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Maintainer: Sefa Eyeoglu <contact@scrumplex.net>
  2. _branch=dev
  3. pkgname=espanso-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=("xdotool" "xclip" "libxtst" "libnotify" "wxgtk3")
  11. makedepends=("rust" "git" "cmake" "cargo-make" "rust-script")
  12. provides=("${pkgname%-git}")
  13. conflicts=("${pkgname%-git}")
  14. options=("!lto") # fails with LTO as of 2022-03
  15. source=("git+https://github.com/federico-terzi/espanso.git#branch=${_branch}")
  16. sha512sums=('SKIP')
  17. pkgver() {
  18. cd "espanso"
  19. git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
  20. }
  21. prepare() {
  22. cd "espanso"
  23. # don't change the original service file, as it will be embedded in the binary
  24. cp "espanso/src/res/linux/systemd.service" "systemd.service"
  25. sed -i "s|{{{espanso_path}}}|/usr/bin/espanso|g" "systemd.service"
  26. }
  27. build() {
  28. cd "espanso"
  29. cargo make --profile release build-binary
  30. }
  31. package() {
  32. cd "espanso"
  33. install -Dm755 "target/release/espanso" "${pkgdir}/usr/bin/espanso"
  34. install -Dm644 "systemd.service" "${pkgdir}/usr/lib/systemd/user/espanso.service"
  35. install -Dm644 "README.md" "${pkgdir}/usr/share/doc/espanso/README.md"
  36. }