udunits2-vl.spec 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. %define pkg_name udunits2
  2. %define pkg_version 2.2.26
  3. %define pkg_release 1%{?_dist_release}
  4. Summary: A library for manipulating units of physical quantities
  5. Name: %{pkg_name}
  6. Version: %{pkg_version}
  7. Release: %{pkg_release}
  8. License: UCAR
  9. Group: System Environment/Libraries
  10. URL: http://www.unidata.ucar.edu/software/udunits/
  11. Source0: ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-%{version}.tar.gz
  12. BuildRequires: gcc-c++, groff, byacc, expat-devel, CUnit-devel
  13. BuildRequires: chrpath
  14. %description
  15. The Unidata units utility, udunits2, supports conversion of unit specifications
  16. between formatted and binary forms, arithmetic manipulation of unit
  17. specifications, and conversion of values between compatible scales of
  18. measurement. A unit is the amount by which a physical quantity is measured. For
  19. example:
  20. Physical Quantity Possible Unit
  21. _________________ _____________
  22. time weeks
  23. distance centimeters
  24. power watts
  25. This utility works interactively and has two modes. In one mode, both an input
  26. and output unit specification are given, causing the utility to print the
  27. conversion between them. In the other mode, only an input unit specification is
  28. given. This causes the utility to print the definition -- in standard units --
  29. of the input unit.
  30. %package devel
  31. Group: Development/Libraries
  32. Summary: Headers and libraries for udunits2
  33. Requires: %{name} = %{version}-%{release}
  34. %description devel
  35. This package contains the files needed for compiling programs using
  36. the udunits2 library.
  37. %prep
  38. %setup -q -n udunits-%{version}
  39. %build
  40. %configure --disable-static --docdir %{_docdir}/%{name}-%{version}
  41. %{__make} %{?_smp_mflags}
  42. %install
  43. %{__make} DESTDIR=${RPM_BUILD_ROOT} install install-html install-pdf
  44. # Remove rpath
  45. chrpath -d %{buildroot}%{_bindir}/*
  46. # Install info and doc
  47. %{__mkdir_p} ${RPM_BUILD_ROOT}%{_infodir}/
  48. %{__install} -p -m0644 %{name}.info ${RPM_BUILD_ROOT}%{_infodir}
  49. %{__install} -p -m0644 ANNOUNCEMENT ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/
  50. # we get this in %%license
  51. %{__rm} -rf ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/COPYRIGHT
  52. # We need to do this to avoid conflicting with udunits v1
  53. %{__mkdir_p} ${RPM_BUILD_ROOT}%{_includedir}/%{name}/
  54. %{__mv} ${RPM_BUILD_ROOT}%{_includedir}/*.h ${RPM_BUILD_ROOT}%{_includedir}/%{name}/
  55. %{__rm} -rf ${RPM_BUILD_ROOT}%{_libdir}/*.la
  56. %{__rm} -rf ${RPM_BUILD_ROOT}%{_infodir}/dir
  57. %check
  58. %{__make} check
  59. %post
  60. %{_syssbindir}/ldconfig
  61. /sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
  62. %preun
  63. if [ $1 = 0 ] ; then
  64. /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
  65. fi
  66. %postun -p %{_syssbindir}/ldconfig
  67. %files
  68. %{_bindir}/%{name}
  69. %{_libdir}/libudunits2.so.*
  70. %{_datadir}/udunits/
  71. %{_docdir}/%{name}-%{version}
  72. %{_infodir}/%{name}*.info*
  73. %files devel
  74. %{_includedir}/%{name}/
  75. %{_libdir}/libudunits2.so
  76. %changelog
  77. * Tue Mar 12 2019 Toshiaki Ara <ara_t@384.jp> 2.2.26-1
  78. - first release for Vine Linux