From 0672a2bc9a390560f0d96578f8405d766cfb386d Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Apr 03 2012 09:18:36 +0000 Subject: don't hardcode API version --- diff --git a/babl.spec b/babl.spec index 7ae3ec1..5413b7e 100644 --- a/babl.spec +++ b/babl.spec @@ -6,11 +6,19 @@ Summary: A dynamic, any to any, pixel format conversion library Name: babl Version: 0.1.10 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 License: LGPLv3+ and GPLv3+ Group: System Environment/Libraries 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) BuildRequires: librsvg2 w3m @@ -92,11 +100,11 @@ rm -rf %{buildroot} %defattr(-, root, root, -) %doc AUTHORS ChangeLog COPYING README NEWS %{_libdir}/*.so.* -%{_libdir}/babl-0.1/ +%{_libdir}/babl-%{apiver}/ %files devel %defattr(-, root, root, -) -%{_includedir}/babl-0.1/ +%{_includedir}/babl-%{apiver}/ %{_libdir}/*.so %{_libdir}/pkgconfig/%{name}.pc