1 | %define pkg_name udunits2 |
---|
2 | %define pkg_version 2.2.26 |
---|
3 | %define pkg_release 1%{?_dist_release} |
---|
4 | |
---|
5 | Summary: A library for manipulating units of physical quantities |
---|
6 | Name: %{pkg_name} |
---|
7 | Version: %{pkg_version} |
---|
8 | Release: %{pkg_release} |
---|
9 | |
---|
10 | License: UCAR |
---|
11 | Group: System Environment/Libraries |
---|
12 | URL: http://www.unidata.ucar.edu/software/udunits/ |
---|
13 | |
---|
14 | Source0: ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-%{version}.tar.gz |
---|
15 | |
---|
16 | BuildRequires: gcc-c++, groff, byacc, expat-devel, CUnit-devel |
---|
17 | BuildRequires: chrpath |
---|
18 | |
---|
19 | |
---|
20 | %description |
---|
21 | The Unidata units utility, udunits2, supports conversion of unit specifications |
---|
22 | between formatted and binary forms, arithmetic manipulation of unit |
---|
23 | specifications, and conversion of values between compatible scales of |
---|
24 | measurement. A unit is the amount by which a physical quantity is measured. For |
---|
25 | example: |
---|
26 | |
---|
27 | Physical Quantity Possible Unit |
---|
28 | _________________ _____________ |
---|
29 | time weeks |
---|
30 | distance centimeters |
---|
31 | power watts |
---|
32 | |
---|
33 | This utility works interactively and has two modes. In one mode, both an input |
---|
34 | and output unit specification are given, causing the utility to print the |
---|
35 | conversion between them. In the other mode, only an input unit specification is |
---|
36 | given. This causes the utility to print the definition -- in standard units -- |
---|
37 | of the input unit. |
---|
38 | |
---|
39 | %package devel |
---|
40 | Group: Development/Libraries |
---|
41 | Summary: Headers and libraries for udunits2 |
---|
42 | Requires: %{name} = %{version}-%{release} |
---|
43 | |
---|
44 | %description devel |
---|
45 | This package contains the files needed for compiling programs using |
---|
46 | the 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 |
---|
60 | chrpath -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 |
---|
85 | if [ $1 = 0 ] ; then |
---|
86 | /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || : |
---|
87 | fi |
---|
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 |
---|