Browse Source

udunits2: initial release for Vine Linux

git-svn-id: ec354946-7b23-47d6-9f5a-488ba84defc7
ara_t 3 years ago
1 changed files with 106 additions and 0 deletions
  1. 106 0

+ 106 - 0

@@ -0,0 +1,106 @@
+%define pkg_name    udunits2
+%define pkg_version 2.2.26
+%define pkg_release 1%{?_dist_release}
+Summary: A library for manipulating units of physical quantities
+Name:    %{pkg_name}
+Version: %{pkg_version}
+Release: %{pkg_release}
+License: UCAR
+Group:   System Environment/Libraries
+BuildRequires: gcc-c++, groff, byacc, expat-devel, CUnit-devel
+BuildRequires: chrpath
+The Unidata units utility, udunits2, 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 
+                  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 devel
+Group:    Development/Libraries
+Summary:  Headers and libraries for udunits2
+Requires: %{name} = %{version}-%{release}
+%description devel
+This package contains the files needed for compiling programs using
+the udunits2 library.
+%setup -q -n udunits-%{version}
+%configure --disable-static --docdir %{_docdir}/%{name}-%{version}
+%{__make} %{?_smp_mflags}
+%{__make} DESTDIR=${RPM_BUILD_ROOT} install install-html install-pdf
+# Remove rpath
+chrpath -d %{buildroot}%{_bindir}/*
+# Install info and doc
+%{__mkdir_p} ${RPM_BUILD_ROOT}%{_infodir}/
+%{__install} -p -m0644 %{name}.info ${RPM_BUILD_ROOT}%{_infodir}
+%{__install} -p -m0644 ANNOUNCEMENT ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/
+# we get this in %%license
+%{__rm} -rf ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/COPYRIGHT
+# We need to do this to avoid conflicting with udunits v1
+%{__mkdir_p} ${RPM_BUILD_ROOT}%{_includedir}/%{name}/
+%{__mv} ${RPM_BUILD_ROOT}%{_includedir}/*.h ${RPM_BUILD_ROOT}%{_includedir}/%{name}/
+%{__rm} -rf ${RPM_BUILD_ROOT}%{_libdir}/*.la
+%{__rm} -rf ${RPM_BUILD_ROOT}%{_infodir}/dir
+%{__make} check
+/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
+if [ $1 = 0 ] ; then
+  /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
+%postun -p %{_syssbindir}/ldconfig
+%files devel
+* Tue Mar 12 2019 Toshiaki Ara <> 2.2.26-1
+- first release for Vine Linux