[claws-mail] 3.7.10-3 make plugin api isa dependent
Andreas Bierfert
awjb at fedoraproject.org
Tue Sep 27 16:53:17 UTC 2011
commit 2582620af558a56835d7e3adce41db6dd719e24b
Author: Andreas Bierfert <andreas.bierfert at lowlatency.de>
Date: Tue Sep 27 18:52:56 2011 +0200
3.7.10-3
make plugin api isa dependent
claws-mail-plugin-api.sh | 2 ++
claws-mail.spec | 46 +++++++++++++++++++++++++++++++++++++++-------
2 files changed, 41 insertions(+), 7 deletions(-)
---
diff --git a/claws-mail-plugin-api.sh b/claws-mail-plugin-api.sh
new file mode 100644
index 0000000..de6d723
--- /dev/null
+++ b/claws-mail-plugin-api.sh
@@ -0,0 +1,2 @@
+#~/bin/sh
+echo @PLUGINAPI@
diff --git a/claws-mail.spec b/claws-mail.spec
index a5e2fe8..0fbbd27 100644
--- a/claws-mail.spec
+++ b/claws-mail.spec
@@ -1,11 +1,14 @@
+%global pluginapi 3.7.10.0
+
Name: claws-mail
Version: 3.7.10
-Release: 1%{?dist}
+Release: 3%{?dist}
Summary: The extended version of Sylpheed
Group: Applications/Internet
License: GPLv3+
URL: http://claws-mail.org
Source0: http://downloads.sourceforge.net/sylpheed-claws/%{name}-%{version}.tar.bz2
+Source1: claws-mail-plugin-api.sh
# http://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=960
Patch0: claws-gnome-shell-dont-start-minimized.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -33,6 +36,10 @@ BuildRequires: libSM-devel
BuildRequires: NetworkManager-glib-devel dbus-glib-devel
BuildRequires: autoconf automake
+# provide plugin api version (see /usr/include/claws-mail/common/version.h)
+Provides: claws-mail(plugin-api)%{?_isa} = %pluginapi
+%{?_isa:Provides: claws-mail(plugin-api) = %pluginapi}
+
# Dec 2006
Obsoletes: sylpheed-claws <= 2.6.0
Provides: sylpheed-claws = %{version}-%{release}
@@ -56,7 +63,7 @@ Provides: claws-mail-plugins-synce = %{version}-%{release}
# gtkhtml2 is deprecated as of f16
%if 0%{?fedora} >= 16
Obsoletes: claws-mail-plugins-gtkhtml2-viewer <= 3.7.9
-Provides: claws-mail-plugins-htkhtml2-viewer = %{version}-%{release}
+Provides: claws-mail-plugins-gtkhtml2-viewer = %{version}-%{release}
%endif
%description
@@ -80,7 +87,9 @@ and pkgconfig file needed for development with %{name}.
%package plugins-dillo
Summary: Dillo HTML viewer plugin for claws-mail
Group: Applications/Internet
-Requires: %{name} = %{version}-%{release}
+Requires: claws-mail(plugin-api)%{?_isa} = %pluginapi
+%{?_isa:Requires: claws-mail(plugin-api) = %pluginapi}
+
Requires: dillo
# Dec 2006
Obsoletes: sylpheed-claws-plugins-dillo <= 2.6.0
@@ -93,7 +102,8 @@ Provides: sylpheed-claws-plugins-dillo = %{version}-%{release}
%package plugins-spamassassin
Summary: Spamassassin plugin for claws-mail
Group: Applications/Internet
-Requires: %{name} = %{version}-%{release}
+Requires: claws-mail(plugin-api)%{?_isa} = %pluginapi
+%{?_isa:Requires: claws-mail(plugin-api) = %pluginapi}
Requires: spamassassin
# Dec 2006
Obsoletes: sylpheed-claws-plugins-spamassassin <= 2.6.0
@@ -105,7 +115,8 @@ Provides: sylpheed-claws-plugins-spamassassin = %{version}-%{release}
%package plugins-pgp
Summary: PGP plugin for signing and encrypting mail
Group: Applications/Internet
-Requires: %{name} = %{version}-%{release}
+Requires: claws-mail(plugin-api)%{?_isa} = %pluginapi
+%{?_isa:Requires: claws-mail(plugin-api) = %pluginapi}
Requires: pinentry-gui
# Dec 2006
Obsoletes: sylpheed-claws-plugins-pgp <= 2.6.0
@@ -117,7 +128,8 @@ Provides: sylpheed-claws-plugins-pgp = %{version}-%{release}
%package plugins-bogofilter
Summary: Bogofilter plugin for claws-mail
Group: Applications/Internet
-Requires: %{name} = %{version}-%{release}
+Requires: claws-mail(plugin-api)%{?_isa} = %pluginapi
+%{?_isa:Requires: claws-mail(plugin-api) = %pluginapi}
Requires: bogofilter
# Dec 2006
Obsoletes: sylpheed-claws-plugins-bogofilter <= 2.6.0
@@ -129,7 +141,8 @@ Provides: sylpheed-claws-plugins-bogofilter = %{version}-%{release}
%package plugins-smime
Summary: S/MIME signed and/or encrypted
Group: Applications/Internet
-Requires: %{name} = %{version}-%{release}
+Requires: claws-mail(plugin-api)%{?_isa} = %pluginapi
+%{?_isa:Requires: claws-mail(plugin-api) = %pluginapi}
Requires: claws-mail-plugins-pgp = %{version}-%{release}
# Dec 2006
Provides: sylpheed-claws-plugins-smime = %{version}-%{release}
@@ -143,6 +156,10 @@ mails, verify signatures or sign and encrypt your own mails.
%setup -q
%patch0 -p1 -b.3.7.9cvs2
+# guard for pluginapi
+SOURCEAPI=$(grep -A 1 VERSION_NUMERIC src/common/version.h | tr -d '\n' | perl -ne 's/[\\\s]//g; m/(\d+),(\d+),(\d+),(\d+)/; print("$1.$2.$3.$4");')
+[ "%pluginapi" == "$SOURCEAPI" ] || exit -1
+
%build
%configure --enable-ipv6 \
--enable-ldap --enable-jpilot \
@@ -207,6 +224,11 @@ rm -f %{buildroot}%{_datadir}/icons/hicolor/icon-theme.cache
# set same date on config.h across builds for multilib (#340871)
touch -r NEWS %{buildroot}%{_includedir}/%{name}/config.h
+# generate plugin api script for -devel
+install -Dpm755 %{SOURCE1} %{buildroot}%{_bindir}/claws-mail-plugin-api
+perl -i -pe 's/\@PLUGINAPI\@/%pluginapi/' \
+ %{buildroot}%{_bindir}/claws-mail-plugin-api
+
%clean
rm -rf %{buildroot}
@@ -226,6 +248,7 @@ rm -rf %{buildroot}
%files devel
%defattr(-,root,root,-)
+%{_bindir}/claws-mail-plugin-api
%{_includedir}/claws-mail/
%{_libdir}/pkgconfig/claws-mail.pc
@@ -254,6 +277,15 @@ rm -rf %{buildroot}
%{_libdir}/claws-mail/plugins/smime.deps
%changelog
+* Mon Sep 26 2011 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
+- 3.7.10-3
+- make plugin api isa dependent
+
+* Sun Sep 25 2011 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
+- 3.7.10-2
+- change plugin dependencies to depend on plugin api version
+ (rhbz#740662)
+
* Tue Aug 30 2011 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- 3.7.10-1
- version upgrade
More information about the scm-commits
mailing list