%define major 0 %define libname %mklibname %{name}_ %{major} %define develname %mklibname %{name} -d Name: udunits2 Version: 2.1.24 Release: %mkrel 2 Summary: A library for manipulating units of physical quantities License: Freely distributable (BSD-like) Group: Sciences/Mathematics URL: http://www.unidata.ucar.edu/software/udunits/ Source0: ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-%{version}.tar.gz BuildRequires: gcc-gfortran BuildRequires: gcc-c++ BuildRequires: groff BuildRequires: perl-devel BuildRequires: bison BuildRequires: expat-devel %description The Unidata units utility, udunits, supports conversion of unit specifications between formatted and binary forms, arithmetic manipulation of unit specifications, and conversion of values between compatible scales of measurement. A unit is the amount by which a physical quantity is measured. For example: Physical Quantity Possible Unit _________________ _____________ time weeks distance centimeters power watts This utility works interactively and has two modes. In one mode, both an input and output unit specification are given, causing the utility to print the conversion between them. In the other mode, only an input unit specification is given. This causes the utility to print the definition -- in standard units -- of the input unit. %package -n %{libname} Group: System/Libraries Summary: Libraries for udunits Provides: lib%{name} = %{version}-%{release} %description -n %{libname} This package contains the files needed for compiling programs using the udunits library. %package -n %{develname} Group: Development/Other Summary: Headers and libraries for udunits Requires: %{name} = %{version}-%{release} Provides: lib%{name}-devel = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} %description -n %{develname} This package contains the files needed for compiling programs using the udunits library. %prep %setup -q -n udunits-%{version} %build %ifarch x86_64 export CFLAGS="%{optflags} -fPIC" export CXXFLAGS="%{optflags} -fPIC" %endif export LD_MATH=-lm %configure2_5x %make %install %makeinstall mkdir -p %{buildroot}%{_infodir}/ install -p -m0644 *.info %{buildroot}%{_infodir} # We need to do this to avoid conflicting with udunits v1 mkdir -p %{buildroot}%{_includedir}/%{name}/ mv %{buildroot}%{_includedir}/*.h %{buildroot}%{_includedir}/%{name}/ # Don't ship static libs rm -rf %{buildroot}%{_libdir}/*.{,l}a # doc mv %{buildroot}%{_datadir}/doc/udunits/* . rm %{buildroot}%{_datadir}/doc -Rf %files %doc ANNOUNCEMENT CHANGE_LOG LICENSE %doc udunits2.html udunits2.pdf %doc *.xml %{_bindir}/%{name} %{_datadir}/udunits/*.xml %{_infodir}/*.info* %files -n %{libname} %{_libdir}/*.so.%{major}* %files -n %{develname} %{_includedir}/%{name}/*.h %{_libdir}/*.so %changelog * Mon Jan 14 2013 umeabot <umeabot> 2.1.24-2.mga3 + Revision: 384978 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sat Jan 21 2012 kamil <kamil> 2.1.24-1.mga2 + Revision: 199299 - add expat-devel as BR - new version 2.1.24 - fix url (mga#3035) - clean .spec * Thu Feb 24 2011 grenoya <grenoya> 2.1.12-3.mga1 + Revision: 58972 - imported package udunits2