source: projects/specs/trunk/u/udunits2/udunits2-vl.spec @ 12051

Revision 12051, 3.0 KB checked in by ara_t, 5 years ago (diff)

udunits2: initial release for Vine Linux

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