don't hardcode API version

This commit is contained in:
Nils Philippsen 2012-04-03 11:18:36 +02:00
parent 6141878e41
commit 0672a2bc9a

View File

@ -6,11 +6,19 @@ Summary: A dynamic, any to any, pixel format conversion library
Name: babl Name: babl
Version: 0.1.10 Version: 0.1.10
Release: 1%{?dist} Release: 1%{?dist}
# Compute some version related macros
# Ugly hack, you need to get your quoting backslashes/percent signs straight
%global major %(ver=%version; echo ${ver%%%%.*})
%global minor %(ver=%version; ver=${ver#%major.}; echo ${ver%%%%.*})
%global micro %(ver=%version; ver=${ver#%major.%minor.}; echo ${ver%%%%.*})
%global apiver %major.%minor
# The gggl codes contained in this package are under the GPL, with exceptions allowing their use under libraries covered under the LGPL # The gggl codes contained in this package are under the GPL, with exceptions allowing their use under libraries covered under the LGPL
License: LGPLv3+ and GPLv3+ License: LGPLv3+ and GPLv3+
Group: System Environment/Libraries Group: System Environment/Libraries
URL: http://www.gegl.org/babl/ URL: http://www.gegl.org/babl/
Source0: ftp://ftp.gimp.org/pub/babl/0.1/%{name}-%{version}.tar.bz2 Source0: ftp://ftp.gimp.org/pub/babl/%{apiver}/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: librsvg2 w3m BuildRequires: librsvg2 w3m
@ -92,11 +100,11 @@ rm -rf %{buildroot}
%defattr(-, root, root, -) %defattr(-, root, root, -)
%doc AUTHORS ChangeLog COPYING README NEWS %doc AUTHORS ChangeLog COPYING README NEWS
%{_libdir}/*.so.* %{_libdir}/*.so.*
%{_libdir}/babl-0.1/ %{_libdir}/babl-%{apiver}/
%files devel %files devel
%defattr(-, root, root, -) %defattr(-, root, root, -)
%{_includedir}/babl-0.1/ %{_includedir}/babl-%{apiver}/
%{_libdir}/*.so %{_libdir}/*.so
%{_libdir}/pkgconfig/%{name}.pc %{_libdir}/pkgconfig/%{name}.pc