[packages/zathura] provide plugin api and abi versions

atler atler at pld-linux.org
Sun Aug 4 14:03:18 CEST 2024


commit 46495950b27aab0a0d7fe3dcc47f9d93ae73582d
Author: Jan Palus <atler at pld-linux.org>
Date:   Sun Aug 4 14:00:41 2024 +0200

    provide plugin api and abi versions
    
    zathura requires plugins built strictly against matching versions which
    effectively requires plugin rebuild in case any of the two changes

 zathura.spec | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
---
diff --git a/zathura.spec b/zathura.spec
index 29b9faa..f22e663 100644
--- a/zathura.spec
+++ b/zathura.spec
@@ -1,3 +1,6 @@
+%define		_zathura_plugin_api	6
+%define		_zathura_plugin_abi	7
+
 Summary:	A vi-like PDF reader
 Summary(hu.UTF-8):	Egy vi-szerű PDF olvasó
 Summary(pl.UTF-8):	Czytnik PDF podobny do vi
@@ -44,6 +47,8 @@ Requires:	hicolor-icon-theme
 Requires:	libseccomp >= 2.5.5
 Requires:	sqlite3-libs >= 3.6.23
 Requires:	synctex >= 1.19
+Provides:	zathura(plugin-api) = %_zathura_plugin_api
+Provides:	zathura(plugin-abi) = %_zathura_plugin_abi
 Suggests:	zathura-pdf-poppler
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -129,6 +134,18 @@ Dopełnianie linii poleceń programu zathura dla powłoki ZSH.
 %setup -q
 cp %{SOURCE1} config.txt
 
+PLUGIN_API=`sed -n -e '/^plugin_api_version[[:space:]]*=/ s/[^0-9]*\([0-9]*\).*/\1/ p' meson.build`
+PLUGIN_ABI=`sed -n -e '/^plugin_abi_version[[:space:]]*=/ s/[^0-9]*\([0-9]*\).*/\1/ p' meson.build`
+if [ "$PLUGIN_API" != "%_zathura_plugin_api" ] || [ "$PLUGIN_ABI" != "%_zathura_plugin_abi" ]; then
+	if [ "$PLUGIN_API" != "%_zathura_plugin_api" ]; then
+		echo "Set %%_zathura_plugin_api to $PLUGIN_API and rerun."
+	fi
+	if [ "$PLUGIN_ABI" != "%_zathura_plugin_abi" ]; then
+		echo "Set %%_zathura_plugin_abi to $PLUGIN_ABI and rerun."
+	fi
+	exit 1
+fi
+
 %build
 %meson build
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/zathura.git/commitdiff/46495950b27aab0a0d7fe3dcc47f9d93ae73582d



More information about the pld-cvs-commit mailing list