diff --git a/0001-Grab-ZeGrapher.appdata.xml-from-the-appdata-dir.patch b/0001-Grab-ZeGrapher.appdata.xml-from-the-appdata-dir.patch new file mode 100644 index 0000000..2eecd0e --- /dev/null +++ b/0001-Grab-ZeGrapher.appdata.xml-from-the-appdata-dir.patch @@ -0,0 +1,24 @@ +From d2e95b597b07c86299a8f057970cf2dd6a807edc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= + <30413512+eclipseo@users.noreply.github.com> +Date: Mon, 24 Aug 2020 19:45:30 +0200 +Subject: [PATCH] Grab ZeGrapher.appdata.xml from the appdata dir + +It's trying to find the Appdata file from the root directory while it is actually in the appdata directory. +--- + ZeGrapher.pro | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ZeGrapher.pro b/ZeGrapher.pro +index f59c964..834c1c0 100644 +--- a/ZeGrapher.pro ++++ b/ZeGrapher.pro +@@ -204,7 +204,7 @@ target.path = $$INSTROOT$$BINDIR + translations.path = $$INSTROOT$$DSRDIR/locale + + desktop.files = ZeGrapher.desktop +-appdata.files = ZeGrapher.appdata.xml ++appdata.files = appdata/ZeGrapher.appdata.xml + icon.files = icons/ZeGrapher.png + translations.files = ZeGrapher_fr.qm + diff --git a/ZeGrapher-3.1.1.tar.gz b/ZeGrapher-3.1.1.tar.gz new file mode 100644 index 0000000..b3634e6 Binary files /dev/null and b/ZeGrapher-3.1.1.tar.gz differ diff --git a/zegrapher.spec b/zegrapher.spec new file mode 100644 index 0000000..605f25b --- /dev/null +++ b/zegrapher.spec @@ -0,0 +1,62 @@ +%global altname ZeGrapher + +Name: zegrapher +Summary: Free and opensource math graphing software +Version: 3.1.1 +Release: 1 +License: GPLv3+ + +URL: https://www.zegrapher.com/ +Source0: https://github.com/AdelKS/%{altname}/archive/v%{version}/%{altname}-%{version}.tar.gz +# Grab ZeGrapher.appdata.xml from the appdata dir +Patch0: https://patch-diff.githubusercontent.com/raw/AdelKS/ZeGrapher/pull/19.patch#/0001-Grab-ZeGrapher.appdata.xml-from-the-appdata-dir.patch + +BuildRequires: make +BuildRequires: gcc-c++ +BuildRequires: boost-devel +BuildRequires: pkgconfig(Qt5) +BuildRequires: pkgconfig(Qt5WebKit) +BuildRequires: desktop-file-utils +BuildRequires: libappstream-glib + +%description +ZeGrapher is a plotting program for functions, sequences, parametric equations, +and tabular data. It has been designed to be as easy to use as possible. + +ZeGrapher supports importing and exporting of tabular data from and to CSV files +and polynomial (regression) fits, plotting of tangents (the point can be +selected interactively). Calculation and plotting of derivatives and integrals +is also possible. + +Plots can be exported in various image formats and as PDF files. + +%prep +%autosetup -p1 -n %{altname}-%{version} +sed -i 's|^QMAKE_LFLAGS_RELEASE = -s|QMAKE_LFLAGS_RELEASE =|' ZeGrapher.pro + +%build +mkdir build && cd build +%qmake_qt5 ../ PREFIX=%{_prefix} +%make_build + +%install +%make_install INSTALL_ROOT=%{buildroot} -C build + +%find_lang %{altname} --with-qt + +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/%{altname}.desktop +appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{altname}.appdata.xml + +%files -f %{altname}.lang +%doc README.md +%license LICENSE +%{_bindir}/%{altname} +%{_metainfodir}/%{altname}.appdata.xml +%{_datadir}/applications/%{altname}.desktop +%{_datadir}/icons/hicolor/128x128/apps/%{altname}.png +%dir %{_datadir}/%{altname} + +%changelog +* Wed May 24 2023 wangtaozhi - 3.1.1-1 +- Package init diff --git a/zegrapher.yaml b/zegrapher.yaml new file mode 100644 index 0000000..d4a4028 --- /dev/null +++ b/zegrapher.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: https://github.com/AdelKS/ZeGrapher +tag_prefix: "v" +separator: "."