80357c2
Name:           squeekboard
80357c2
Version:        1.9.0
80357c2
Release:        2%{?dist}
80357c2
Summary:        a Wayland virtual keyboard
80357c2
80357c2
License:        GPLv3+
80357c2
URL:            https://source.puri.sm/Librem5/squeekboard
80357c2
Source0:        https://source.puri.sm/Librem5/squeekboard/-/archive/v%{version}/squeekboard-v%{version}.tar.gz
80357c2
Source1:        squeekboard.desktop
80357c2
80357c2
# temporary until upstreamed
80357c2
Patch0:         0001-use-latest-compatible-crates.patch
80357c2
80357c2
ExclusiveArch:  %{rust_arches}
80357c2
80357c2
BuildRequires:  gcc
80357c2
BuildRequires:  meson
80357c2
BuildRequires:  rust-packaging
80357c2
BuildRequires:  pkgconfig(gio-2.0) >= 2.26
80357c2
BuildRequires:  pkgconfig(gnome-desktop-3.0) >= 3.0
80357c2
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.0
80357c2
BuildRequires:  pkgconfig(libcroco-0.6)
80357c2
BuildRequires:  pkgconfig(wayland-client) >= 1.14
80357c2
BuildRequires:  pkgconfig(xkbcommon)
80357c2
BuildRequires:  pkgconfig(wayland-protocols) >= 1.12
80357c2
BuildRequires:  desktop-file-utils
80357c2
80357c2
%description
80357c2
Squeekboard is a virtual keyboard supporting Wayland, built primarily 
80357c2
for the Librem 5 phone. It squeaks because some Rust got inside.
80357c2
80357c2
80357c2
%prep
80357c2
%autosetup -p1 -n squeekboard-v%{version}
80357c2
%cargo_prep
80357c2
80357c2
80357c2
%generate_buildrequires
80357c2
%cargo_generate_buildrequires -a
80357c2
80357c2
80357c2
%build
80357c2
%meson
80357c2
%meson_build
80357c2
80357c2
80357c2
%install
80357c2
%meson_install
80357c2
mkdir -p %{buildroot}/%{_sysconfdir}/xdg/autostart/
80357c2
cp %{SOURCE1} %{buildroot}/%{_sysconfdir}/xdg/autostart/
80357c2
chmod +x %{buildroot}/%{_bindir}/squeekboard-entry
80357c2
80357c2
80357c2
%check
80357c2
%meson_test
80357c2
desktop-file-validate %{buildroot}/%{_datadir}/applications/sm.puri.Squeekboard.desktop
80357c2
80357c2
80357c2
%files
80357c2
%{_bindir}/squeekboard
80357c2
%{_bindir}/squeekboard-entry
80357c2
%{_bindir}/squeekboard-test-layout
80357c2
%{_datadir}/applications/sm.puri.Squeekboard.desktop
80357c2
%{_sysconfdir}/xdg/autostart/squeekboard.desktop
80357c2
%doc README.md
80357c2
%license COPYING
80357c2
80357c2
80357c2
%changelog
80357c2
* Tue Mar 24 2020 Nikhil Jha <hi@nikhiljha.com> - 1.9.0-2
80357c2
- Validate desktop file
80357c2
80357c2
* Thu Feb 27 2020 Nikhil Jha <hi@nikhiljha.com> - 1.9.0-1
80357c2
- Initial packaging