Toshaan Bharvani
2 years ago
commit
4fdc8e931f
3 changed files with 203 additions and 0 deletions
@ -0,0 +1,38 @@
@@ -0,0 +1,38 @@
|
||||
From 8319ca0f9af088acd4f7a784a37e31c99aeb47bd Mon Sep 17 00:00:00 2001 |
||||
From: Martin Lund <martin.lund@keep-it-simple.com> |
||||
Date: Sun, 20 Feb 2022 16:45:18 +0100 |
||||
Subject: [PATCH] Rework meson lua dependency check |
||||
|
||||
To support more distributions which package lua differently. |
||||
--- |
||||
src/meson.build | 11 ++++++++++- |
||||
1 file changed, 10 insertions(+), 1 deletion(-) |
||||
|
||||
diff --git a/src/meson.build b/src/meson.build |
||||
index d4574ef..a8fb0f4 100644 |
||||
--- a/src/meson.build |
||||
+++ b/src/meson.build |
||||
@@ -40,13 +40,22 @@ lxi_sources = [ |
||||
common_sources, |
||||
] |
||||
|
||||
+foreach name: ['lua-5.4', 'lua-5.3', 'lua-5.2', 'lua-5.1', 'lua'] |
||||
+ lua_dep = dependency(name, version: '>=5.1', required: false) |
||||
+ if lua_dep.found() |
||||
+ break |
||||
+ endif |
||||
+endforeach |
||||
+if not lua_dep.found() |
||||
+ error('Lua could not be found!') |
||||
+endif |
||||
|
||||
compiler = meson.get_compiler('c') |
||||
|
||||
lxi_deps = [ |
||||
compiler.find_library('readline', required: true), |
||||
- dependency('lua-5.3', required: true), |
||||
dependency('liblxi', version: '>=1.13', required: true), |
||||
+ lua_dep, |
||||
] |
||||
|
||||
executable('lxi', |
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
From d55f9393388aff4b0c63b20f668c451e6c998465 Mon Sep 17 00:00:00 2001 |
||||
From: Martin Lund <martin.lund@keep-it-simple.com> |
||||
Date: Sun, 20 Feb 2022 16:02:57 +0100 |
||||
Subject: [PATCH] Rework meson readline dependency check |
||||
|
||||
To support readline installations without pkg-config. |
||||
--- |
||||
src/meson.build | 5 ++++- |
||||
1 file changed, 4 insertions(+), 1 deletion(-) |
||||
|
||||
diff --git a/src/meson.build b/src/meson.build |
||||
index 532daf7..d4574ef 100644 |
||||
--- a/src/meson.build |
||||
+++ b/src/meson.build |
||||
@@ -40,8 +40,11 @@ lxi_sources = [ |
||||
common_sources, |
||||
] |
||||
|
||||
+ |
||||
+compiler = meson.get_compiler('c') |
||||
+ |
||||
lxi_deps = [ |
||||
- dependency('readline', required: true), |
||||
+ compiler.find_library('readline', required: true), |
||||
dependency('lua-5.3', required: true), |
||||
dependency('liblxi', version: '>=1.13', required: true), |
||||
] |
@ -0,0 +1,138 @@
@@ -0,0 +1,138 @@
|
||||
Summary: Tools to manage network attached LXI compatible instruments |
||||
Name: lxi-tools |
||||
Version: 2.1 |
||||
Release: 3%{?dist} |
||||
# src/language-specs/lua-lxi-gui.lang is LGPL-2.1-or-later, rest is BSD-3-Clause |
||||
License: BSD-3-Clause AND LGPL-2.1-or-later |
||||
URL: https://lxi-tools.github.io/ |
||||
Source0: https://github.com/lxi/lxi-tools/releases/download/v%{version}/%{name}-%{version}.tar.xz |
||||
Source1: https://github.com/lxi/lxi-tools/releases/download/v%{version}/%{name}-%{version}.tar.xz.asc |
||||
Source2: https://keys.openpgp.org/vks/v1/by-fingerprint/101BAC1C15B216DBE07A3EEA2BDB4A0944FA00B1 |
||||
Patch0: https://github.com/lxi-tools/lxi-tools/commit/d55f9393388aff4b0c63b20f668c451e6c998465.patch#/lxi-tools-2.1-readline.patch |
||||
Patch1: https://github.com/lxi-tools/lxi-tools/commit/8319ca0f9af088acd4f7a784a37e31c99aeb47bd.patch#/lxi-tools-2.1-lua.patch |
||||
BuildRequires: gnupg2 |
||||
BuildRequires: gcc |
||||
BuildRequires: meson >= 0.53.2 |
||||
BuildRequires: readline-devel |
||||
BuildRequires: liblxi-devel >= 1.13 |
||||
BuildRequires: lua-devel >= 5.1 |
||||
BuildRequires: bash-completion |
||||
%if 0%{?fedora} > 35 || 0%{?rhel} > 9 |
||||
BuildRequires: glib2-devel >= 2.70 |
||||
BuildRequires: gtk4-devel >= 4.5.0 |
||||
BuildRequires: gtksourceview5-devel >= 5.3.3 |
||||
BuildRequires: libadwaita-devel >= 1.0.1 |
||||
BuildRequires: %{_bindir}/desktop-file-validate |
||||
BuildRequires: %{_bindir}/appstream-util |
||||
%endif |
||||
|
||||
%description |
||||
LXI tools are open source software tools for managing network attached |
||||
LXI (LAN eXtensions for Instrumentation) compatible test instruments |
||||
such as modern oscilloscopes, power supplies, spectrum analyzers etc. |
||||
|
||||
Features include automatic discovery of test instruments, sending SCPI |
||||
commands, grabbing screenshots from supported instruments, benchmarking |
||||
SCPI message performance, and powerful scripting for test automation. |
||||
|
||||
%prep |
||||
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' |
||||
%setup -q |
||||
%patch0 -p1 -b .readline |
||||
%patch1 -p1 -b .lua |
||||
|
||||
%build |
||||
%meson \ |
||||
%if 0%{?fedora} > 35 || 0%{?rhel} > 9 |
||||
-Dgui=true |
||||
%else |
||||
-Dgui=false |
||||
%endif |
||||
%meson_build |
||||
|
||||
%install |
||||
%meson_install |
||||
|
||||
%if 0%{?fedora} > 35 || 0%{?rhel} > 9 |
||||
%check |
||||
desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/io.github.%{name}.lxi-gui.desktop |
||||
appstream-util validate-relax --nonet $RPM_BUILD_ROOT%{_metainfodir}/io.github.%{name}.lxi-gui.appdata.xml |
||||
%endif |
||||
|
||||
%files |
||||
%license COPYING |
||||
%doc AUTHORS ChangeLog README.md |
||||
%{_bindir}/lxi |
||||
%dir %{_datadir}/bash-completion/ |
||||
%dir %{_datadir}/bash-completion/completions/ |
||||
%{_datadir}/bash-completion/completions/lxi* |
||||
%{_mandir}/man1/lxi.1* |
||||
%if 0%{?fedora} > 35 || 0%{?rhel} > 9 |
||||
%{_bindir}/lxi-gui |
||||
%{_datadir}/applications/io.github.%{name}.lxi-gui.desktop |
||||
%{_datadir}/glib-2.0/schemas/io.github.%{name}.lxi-gui.gschema.xml |
||||
%{_datadir}/icons/hicolor/*/apps/io.github.%{name}.lxi-gui*.svg |
||||
%{_metainfodir}/io.github.%{name}.lxi-gui.appdata.xml |
||||
%endif |
||||
|
||||
%changelog |
||||
* Sun Oct 02 2022 Robert Scheck <robert@fedoraproject.org> 2.1-3 |
||||
- Build the lxi-gui application for Fedora 36 (and later) |
||||
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-2 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild |
||||
|
||||
* Sun Feb 20 2022 Robert Scheck <robert@fedoraproject.org> 2.1-1 |
||||
- Upgrade to 2.1 (#2049045) |
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.21-7 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild |
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.21-6 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild |
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.21-5 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild |
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.21-4 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild |
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.21-3 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild |
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.21-2 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild |
||||
|
||||
* Mon Jul 22 2019 Robert Scheck <robert@fedoraproject.org> 1.21-1 |
||||
- Upgrade to 1.21 |
||||
|
||||
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.20-4 |
||||
- Rebuild for readline 8.0 |
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.20-3 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild |
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.20-2 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild |
||||
|
||||
* Fri Jun 01 2018 Robert Scheck <robert@fedoraproject.org> 1.20-1 |
||||
- Upgrade to 1.20 |
||||
|
||||
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.12-2 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild |
||||
|
||||
* Wed Nov 29 2017 Robert Scheck <robert@fedoraproject.org> 1.12-1 |
||||
- Upgrade to 1.12 |
||||
|
||||
* Sat Oct 28 2017 Robert Scheck <robert@fedoraproject.org> 1.5-1 |
||||
- Upgrade to 1.5 |
||||
|
||||
* Sat Oct 28 2017 Robert Scheck <robert@fedoraproject.org> 1.4-1 |
||||
- Upgrade to 1.4 |
||||
|
||||
* Sat Oct 28 2017 Robert Scheck <robert@fedoraproject.org> 1.3-1 |
||||
- Upgrade to 1.3 |
||||
|
||||
* Sun Oct 08 2017 Robert Scheck <robert@fedoraproject.org> 1.1-1 |
||||
- Upgrade to 1.1 |
||||
- Initial spec file for Fedora and Red Hat Enterprise Linux |
Loading…
Reference in new issue