diff --git a/gimp.changes b/gimp.changes index 25b61bc..ecd9b72 100644 --- a/gimp.changes +++ b/gimp.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Thu Aug 20 22:38:00 CEST 2009 - crrodriguez@suse.de + +- add support for versioning external plugins, providing + rpm macros gimp_abi_version and gimp_api_version + +------------------------------------------------------------------- +Wed Aug 19 21:47:53 CEST 2009 - beineri@opensuse.org + +- Everyone calls it "GIMP" so let us follow that in the application + start menu, fixes problem with launcher finding it (bnc#508279). + ------------------------------------------------------------------- Fri Aug 14 11:44:03 CEST 2009 - beineri@opensuse.org diff --git a/gimp.spec b/gimp.spec index 262fe4d..075b789 100644 --- a/gimp.spec +++ b/gimp.spec @@ -17,6 +17,8 @@ # norootforbuild +%global abiver 4 +%global apiver 2.0 Name: gimp BuildRequires: aalib-devel @@ -45,7 +47,7 @@ BuildRequires: update-desktop-files BuildRequires: xorg-x11-libXfixes-devel Url: http://www.gimp.org/ Version: 2.6.7 -Release: 1 +Release: 2 License: GPL v2 or later Group: Productivity/Graphics/Bitmap Editors Suggests: AdobeICCProfiles @@ -55,9 +57,11 @@ Requires: %{name}-lang = %{version} Requires: gtk2 Summary: The GNU Image Manipulation Program Source: ftp://ftp.gimp.org/pub/gimp/v2.6/%{name}-%{version}.tar.bz2 +Source1: macros.gimp BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: %{name}-branding >= 2.4 Recommends: %{name}-plugins-python = %{version} gimp-2.0-scanner-plugin %{name}-help-browser +Provides: gimp(api) = %{apiver} gimp(abi) = %{abiver} %description The GIMP (GNU Image Manipulation Program) is a powerful image @@ -163,6 +167,20 @@ This package contains the help browser for the GIMP. %lang_package %prep %setup -q +# Safety check for ABI version change. +vabi=`printf "%d" $(sed -n '/#define GIMP_MODULE_ABI_VERSION/{s/.* //;p}' libgimpmodule/gimpmodule.h)` +if test "x${vabi}" != "x%{abiver}"; then + : Error: Upstream ABI version is now ${vabi}, expecting %{abiver}. + : Update the apiver macro and rebuild. + exit 1 +fi +# Safety check for API version change. +vapi=`sed -n '/#define GIMP_API_VERSION/{s/.* //;p}' libgimpbase/gimpversion.h | sed -e 's@"@@g'` +if test "x${vapi}" != "x%{apiver}"; then + : Error: Upstream API version is now ${vapi}, expecting %{apiver}. + : Update the apiver macro and rebuild. + exit 1 +fi %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" @@ -175,7 +193,7 @@ make %{?jobs:-j%jobs} %install %makeinstall -%suse_update_desktop_file gimp +%suse_update_desktop_file -N "The GIMP" gimp rm $RPM_BUILD_ROOT%{_libdir}/gimp/2.0/*/*.*a %find_lang gimp20 %find_lang gimp20-libgimp gimp20.lang @@ -193,6 +211,12 @@ for PLUGIN in $RPM_BUILD_ROOT%{_libdir}/gimp/2.0/plug-ins/* ; do fi done rm %{buildroot}%{_libdir}/*.la +# Install the macros file: +install -d $RPM_BUILD_ROOT%{_sysconfdir}/rpm +sed -e "s/@GIMP_APIVER@/%{apiver}/;s/@GIMP_ABIVER@/%{abiver}/" \ + < $RPM_SOURCE_DIR/macros.gimp > macros.gimp +install -m 644 -c macros.gimp \ + $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.gimp %post -p /sbin/ldconfig @@ -256,5 +280,6 @@ rm -rf $RPM_BUILD_ROOT %dir %{_datadir}/gtk-doc %dir %{_datadir}/gtk-doc/html %{_datadir}/gtk-doc/html/* +%config %{_sysconfdir}/rpm/macros.gimp %changelog diff --git a/macros.gimp b/macros.gimp new file mode 100644 index 0000000..0d8210d --- /dev/null +++ b/macros.gimp @@ -0,0 +1,5 @@ +# +# Interface versions exposed by GIMP: +# +%gimp_api_version @GIMP_APIVER@ +%gimp_abi_version @GIMP_ABIVER@ \ No newline at end of file