]> git.pld-linux.org Git - packages/double-conversion.git/blobdiff - double-conversion.spec
simplify headers install
[packages/double-conversion.git] / double-conversion.spec
index 16951a93012755ba95680a7b22bfdc3cf3871492..a49948b4370ba55028191348694300c4f4fd488b 100644 (file)
@@ -1,3 +1,10 @@
+#
+# TODO
+# - versioning in shared lib
+
+# Conditional build:
+%bcond_without static_libs     # don't build static libraries
+
 Summary:       Library providing binary-decimal and decimal-binary routines for IEEE doubles
 Name:          double-conversion
 Version:       1.1.1
@@ -13,8 +20,12 @@ BuildRequires:       scons
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-Library providing binary-decimal and decimal-binary routines for IEEE
-doubles.
+This project (double-conversion) provides binary-decimal and
+decimal-binary routines for IEEE doubles.
+
+The library consists of efficient conversion routines that have been
+extracted from the V8 JavaScript engine. The code has been refactored
+and improved so that it can be used more easily in other projects.
 
 %package devel
 Summary:       Library providing binary-decimal and decimal-binary routines for IEEE doubles
@@ -22,40 +33,59 @@ Group:              Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 
 %description devel
-Contains header files for developing applications that use the %{name} library.
+Contains header files for developing applications that use the %{name}
+library.
+
+There is extensive documentation in src/double-conversion.h. Other
+examples can be found in test/cctest/test-conversions.cc.
+
+%package static
+Summary:       Static %{name} library
+Summary(pl.UTF-8):     Statyczna biblioteka %{name}
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+
+%description static
+Static %{name} library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka %{name}.
 
 %prep
 %setup -q -n %{name}
+cp -p %{SOURCE1} SConstruct
 
 %build
-%scons -f %{SOURCE1}
+%scons \
+       CXX="%{__cxx}"
+       CXXFLAGS="%{__cxx}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/%{name}}
+%scons install \
+       DESTDIR=$RPM_BUILD_ROOT \
 
-cp -p libdouble_conversion.a libdouble_conversion_pic.a $RPM_BUILD_ROOT%{_libdir}
-
-cp -p src/double-conversion.h $RPM_BUILD_ROOT%{_includedir}/%{name}
-cp -p src/bignum.h $RPM_BUILD_ROOT%{_includedir}/%{name}
-cp -p src/bignum-dtoa.h $RPM_BUILD_ROOT%{_includedir}/%{name}
-cp -p src/cached-powers.h $RPM_BUILD_ROOT%{_includedir}/%{name}
-cp -p src/diy-fp.h $RPM_BUILD_ROOT%{_includedir}/%{name}
-cp -p src/fast-dtoa.h $RPM_BUILD_ROOT%{_includedir}/%{name}
-cp -p src/fixed-dtoa.h $RPM_BUILD_ROOT%{_includedir}/%{name}
-cp -p src/ieee.h $RPM_BUILD_ROOT%{_includedir}/%{name}
-cp -p src/strtod.h $RPM_BUILD_ROOT%{_includedir}/%{name}
-cp -p src/utils.h $RPM_BUILD_ROOT%{_includedir}/%{name}
+cp -p src/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}
 
 %clean
 %{__rm} -rf $RPM_BUILD_ROOT
 
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
+
 %files
 %defattr(644,root,root,755)
 %doc LICENSE README AUTHORS
+%{_libdir}/libdouble_conversion.so
 
 %files devel
 %defattr(644,root,root,755)
+%{_includedir}/%{name}
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
 %{_libdir}/libdouble_conversion.a
 %{_libdir}/libdouble_conversion_pic.a
-%{_includedir}/%{name}
+%endif
This page took 0.059218 seconds and 4 git commands to generate.