summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Smedstad2024-01-21 07:54:56 +0100
committerCarl Smedstad2024-01-21 08:58:51 +0100
commit6825a2426240e2e7323a8a6a3aa192e89c7e6a43 (patch)
treeb526e0889a86eba7458a596e56471f781e55b90c
parentec9af6b1f507b06bf234969caebfac83255de9b9 (diff)
downloadaur-6825a2426240e2e7323a8a6a3aa192e89c7e6a43.tar.gz
upgpkg: 2.2.1-4: Build both -x11 & -wayland pkgs via split pkg
-rw-r--r--.SRCINFO43
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD77
-rw-r--r--espanso-wayland.install7
4 files changed, 114 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fe0c20cc8e7e..a53bf7ad39e2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,31 @@
pkgbase = espanso
pkgdesc = Cross-platform Text Expander written in Rust
pkgver = 2.2.1
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/espanso/espanso
arch = x86_64
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-x11
+ pkgdesc = Cross-platform Text Expander written in Rust (built for X11)
depends = bzip2
depends = dbus
depends = gcc-libs
@@ -19,8 +39,21 @@ pkgbase = espanso
depends = wxwidgets-gtk3
depends = xclip
depends = xdotool
- options = !lto
- source = espanso-2.2.1.tar.gz::https://github.com/espanso/espanso/archive/v2.2.1.tar.gz
- sha256sums = 795663cb64c28322b667998f95910134b042be2baaace5506790f7e44ae3be91
+ provides = espanso
+ conflicts = espanso
+ replaces = espanso
-pkgname = 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
index f71c635dafda..655e2d30c21b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
!.gitignore
!PKGBUILD
!.SRCINFO
+!espanso-wayland.install
diff --git a/PKGBUILD b/PKGBUILD
index d904516d588f..1c3061e67a2b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,15 +1,20 @@
# Maintainer: Carl Smedstad <carl.smedstad at protonmail dot com>
# Contributor: Sefa Eyeoglu <contact@scrumplex.net>
-pkgname=espanso
+pkgbase=espanso
+pkgname=(
+ espanso-x11
+ espanso-wayland
+)
pkgver=2.2.1
-pkgrel=3
+pkgrel=4
pkgdesc="Cross-platform Text Expander written in Rust"
arch=(x86_64)
url="https://github.com/espanso/espanso"
license=(GPL-3.0-only)
-depends=(
+makedepends=(
bzip2
+ cargo
dbus
gcc-libs
glibc
@@ -18,18 +23,18 @@ depends=(
libxkbcommon
libxtst
openssl
+ wl-clipboard
wxwidgets-common
wxwidgets-gtk3
xclip
xdotool
)
-makedepends=(cargo)
-source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
+source=("$pkgbase-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('795663cb64c28322b667998f95910134b042be2baaace5506790f7e44ae3be91')
options=(!lto)
-_archive="$pkgname-$pkgver"
+_archive="$pkgbase-$pkgver"
prepare() {
cd "$_archive"
@@ -51,10 +56,17 @@ build() {
cd "$_archive"
export RUSTUP_TOOLCHAIN=stable
- export CARGO_TARGET_DIR=target
+
+ 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() {
@@ -67,10 +79,57 @@ check() {
--skip tests::test_migration
}
-package() {
+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/release/espanso
+ 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
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"
+}