[packages/double-conversion] install shared lib, requires scons 2.3.0
glen
glen at pld-linux.org
Sun Oct 6 00:01:56 CEST 2013
commit 09cc3773baad68a950e0e992a1908bd97ebf948b
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Oct 6 01:01:05 2013 +0300
install shared lib, requires scons 2.3.0
there's some file exists errors, not sure if it's something wrong in
SConsctruct or there's hack to avoid it
SConstruct | 5 ++++-
double-conversion.spec | 9 +++++++--
2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/double-conversion.spec b/double-conversion.spec
index a49948b..7a91556 100644
--- a/double-conversion.spec
+++ b/double-conversion.spec
@@ -16,7 +16,7 @@ Source0: http://double-conversion.googlecode.com/files/%{name}-%{version}.tar.gz
URL: http://code.google.com/p/double-conversion
Source1: SConstruct
BuildRequires: libstdc++-devel
-BuildRequires: scons
+BuildRequires: scons >= 2.3.0
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -60,6 +60,9 @@ cp -p %{SOURCE1} SConstruct
CXX="%{__cxx}"
CXXFLAGS="%{__cxx}"
+# avoid file exists errors, when entering install
+rm -f libdouble_conversion.so libdouble_conversion.so.0
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/%{name}}
@@ -77,10 +80,12 @@ cp -p src/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}
%files
%defattr(644,root,root,755)
%doc LICENSE README AUTHORS
-%{_libdir}/libdouble_conversion.so
+%attr(755,root,root) %{_libdir}/libdouble_conversion.so.*.*.*
+%ghost %{_libdir}/libdouble_conversion.so.0
%files devel
%defattr(644,root,root,755)
+%{_libdir}/libdouble_conversion.so
%{_includedir}/%{name}
%if %{with static_libs}
diff --git a/SConstruct b/SConstruct
index d8f7035..2508254 100644
--- a/SConstruct
+++ b/SConstruct
@@ -16,6 +16,9 @@ debug = ARGUMENTS.get('debug', 0)
optimize = ARGUMENTS.get('optimize', 0)
env.Replace(CXX = ARGUMENTS.get('CXX', 'g++'))
+# for shared lib, requires scons 2.3.0
+env['SHLIBVERSION'] = '0.0.0'
+
CCFLAGS = []
if int(debug):
CCFLAGS.append(ARGUMENTS.get('CXXFLAGS', '-g -Wall -Werror'))
@@ -39,7 +42,7 @@ shared_lib = env.SharedLibrary(library_name, double_conversion_shared_objects)
env.Program('run_tests', double_conversion_test_sources, LIBS=[static_lib])
-env.Install(libdir, shared_lib)
+env.InstallVersionedLib(libdir, shared_lib)
env.Install(libdir, static_lib)
env.Install(libdir, static_lib_pic)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/double-conversion.git/commitdiff/09cc3773baad68a950e0e992a1908bd97ebf948b
More information about the pld-cvs-commit
mailing list