]> git.pld-linux.org Git - packages/v8.git/blame - v8.spec
- BR: libstdc++-devel
[packages/v8.git] / v8.spec
CommitLineData
c8c14515 1# TODO
7594b47f
ER
2# - cxx is not passed to build
3# - cleaner way for cxxflags
c894b44e
ER
4%define snap 20090918
5%define rel 1
b8bbb50f
AM
6Summary: JavaScript Engine
7Name: v8
8Version: 1.2.13
c894b44e 9Release: 0.%{snap}.%{rel}
b8bbb50f
AM
10License: BSD
11Group: Libraries
12URL: http://code.google.com/p/v8
13# No tarballs, pulled from svn
14# svn export http://v8.googlecode.com/svn/trunk/ v8
15Source0: %{name}-%{snap}.tar.bz2
16# Source0-md5: 736a6a7a21aa8a2834a583763d37a7af
c894b44e
ER
17#Patch0: %{name}-svn2430-unused-parameter.patch
18#Patch1: http://codereview.chromium.org/download/issue115176_4_1002.diff
54ff92d3 19BuildRequires: libstdc++-devel
7594b47f 20BuildRequires: readline-devel
b8bbb50f 21BuildRequires: scons
c894b44e 22ExclusiveArch: %{ix86} %{x8664} arm
b8bbb50f
AM
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25%description
26V8 is Google's open source JavaScript engine. V8 is written in C++ and
27is used in Google Chrome, the open source browser from Google. V8
28implements ECMAScript as specified in ECMA-262, 3rd edition.
29
30%package devel
31Summary: Development headers and libraries for v8
32Group: Development/Libraries
33Requires: %{name} = %{version}-%{release}
34
35%description devel
36Development headers and libraries for v8.
37
38%prep
39%setup -q -n %{name}
c894b44e
ER
40#%patch0 -p1
41#%patch1 -p0
7594b47f 42%{__sed} -i -e "s,'-O3','%{rpmcxxflags}'.split(' ')," SConstruct
b8bbb50f
AM
43
44%build
45%scons \
c894b44e
ER
46 library=shared \
47 snapshots=on \
7594b47f
ER
48 soname=off \
49 console=readline \
b8bbb50f 50%ifarch x86_64
c894b44e 51 arch=x64 \
b8bbb50f 52%endif
c894b44e
ER
53 env=CCFLAGS:"-fPIC"
54
7594b47f
ER
55# the soname=on creates soname as libv8-1.3.11.1.so, that's wrong
56rm libv8.so
b8bbb50f
AM
57# Now, lets make it right.
58%ifarch arm
59%{__cxx} %{rpmcflags} %{rpmldflags} -fPIC -o libv8.so.0.0.0 -shared -Wl,-soname,libv8.so.0 obj/release/*.os obj/release/arm/*.os
60%endif
61%ifarch %{ix86}
62%{__cxx} %{rpmcflags} %{rpmldflags} -fPIC -o libv8.so.0.0.0 -shared -Wl,-soname,libv8.so.0 obj/release/*.os obj/release/ia32/*.os
63%endif
7594b47f 64%ifarch %{x8664}
b8bbb50f
AM
65%{__cxx} %{rpmcflags} %{rpmldflags} -fPIC -o libv8.so.0.0.0 -shared -Wl,-soname,libv8.so.0 obj/release/*.os obj/release/x64/*.os
66%endif
67
68%install
69rm -rf $RPM_BUILD_ROOT
70install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir}}
c894b44e
ER
71cp -a include/*.h $RPM_BUILD_ROOT%{_includedir}
72install -p libv8.so.*.*.* $RPM_BUILD_ROOT%{_libdir}
b8bbb50f 73
c894b44e
ER
74lib=$(basename $RPM_BUILD_ROOT%{_libdir}/libv8.so.*.*.*)
75ln -s $lib $RPM_BUILD_ROOT%{_libdir}/libv8.so
76ln -s $lib $RPM_BUILD_ROOT%{_libdir}/libv8.so.0
b8bbb50f
AM
77
78%clean
79rm -rf $RPM_BUILD_ROOT
80
c894b44e
ER
81%post -p /sbin/ldconfig
82%postun -p /sbin/ldconfig
b8bbb50f
AM
83
84%files
85%defattr(644,root,root,755)
86%doc AUTHORS ChangeLog LICENSE
c894b44e
ER
87%attr(755,root,root) %{_libdir}/libv8.so.*.*.*
88%attr(755,root,root) %ghost %{_libdir}/libv8.so.0
b8bbb50f
AM
89
90%files devel
91%defattr(644,root,root,755)
c894b44e 92%attr(755,root,root) %{_libdir}/libv8.so
b8bbb50f 93%{_includedir}/*.h
This page took 0.073912 seconds and 4 git commands to generate.