[audacious] - Provide versioned capability audacious(plugin-api) as something much more specific for plugin pa

Michael Schwendt mschwendt at fedoraproject.org
Thu Jan 27 10:43:40 UTC 2011


commit f96d7796fa169eb982f7aebef8a0ca91f3d14579
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date:   Thu Jan 27 11:43:28 2011 +0100

    - Provide versioned capability audacious(plugin-api) as something much more
      specific for plugin packages to require.

 audacious.spec |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/audacious.spec b/audacious.spec
index f0977d9..7964666 100644
--- a/audacious.spec
+++ b/audacious.spec
@@ -1,11 +1,17 @@
-# Minimum audacious/audacious-plugins version in inter-package
-# dependencies.
+# Minimum audacious/audacious-plugins version in inter-package dependencies.
 # We enforce 2.4.2 as 2.4.0 and older are insufficient.
-%define aud_ver 2.4.2
+%global aud_ver 2.4.2
+
+# Provide Generic Plugin API value for plugin packages to depend on.
+# As defined in /usr/include/audacious/plugin.h: __AUDACIOUS_PLUGIN_API__
+# This must be an exact match for plugin .so files to load.
+%global aud_plugin_api 17
+Provides: audacious(plugin-api) = %{aud_plugin_api}
+
 
 Name: audacious
 Version: 2.4.3
-Release: 1%{?dist}
+Release: 2%{?dist}
 
 License: GPLv3
 Summary: Advanced audio player
@@ -78,6 +84,11 @@ Files needed when building software for the Audacious audio player.
 
 %prep
 %setup -q -n %{name}-%{version}
+
+# Verify the value of the audacious(plugin-api) Provides.
+api=$(grep '[ ]*#define[ ]*__AUDACIOUS_PLUGIN_API__' ${RPM_BUILD_ROOT}/usr/include/audacious/plugin.h | sed 's!.*__AUDACIOUS_PLUGIN_API__[ ]*\([0-9]\+\).*!\1!')
+[ "${api}" == "%{aud_plugin_api}" ] || exit -1
+
 %patch1 -p1 -b .enable-gnomeshortcuts
 sed -i '\,^.SILENT:,d' buildsys.mk.in
 
@@ -189,6 +200,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 
 %changelog
+* Thu Jan 27 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 2.4.3-2
+- Provide versioned capability audacious(plugin-api) as something much more
+  specific for plugin packages to require.
+
 * Fri Jan 14 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 2.4.3-1
 - Update to 2.4.3 (maintenance release in stable branch, 18k diff).
 


More information about the scm-commits mailing list