]>
Commit | Line | Data |
---|---|---|
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 |
6 | Summary: JavaScript Engine |
7 | Name: v8 | |
8 | Version: 1.2.13 | |
c894b44e | 9 | Release: 0.%{snap}.%{rel} |
b8bbb50f AM |
10 | License: BSD |
11 | Group: Libraries | |
12 | URL: http://code.google.com/p/v8 | |
13 | # No tarballs, pulled from svn | |
14 | # svn export http://v8.googlecode.com/svn/trunk/ v8 | |
15 | Source0: %{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 | 19 | BuildRequires: libstdc++-devel |
7594b47f | 20 | BuildRequires: readline-devel |
b8bbb50f | 21 | BuildRequires: scons |
c894b44e | 22 | ExclusiveArch: %{ix86} %{x8664} arm |
b8bbb50f AM |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | %description | |
26 | V8 is Google's open source JavaScript engine. V8 is written in C++ and | |
27 | is used in Google Chrome, the open source browser from Google. V8 | |
28 | implements ECMAScript as specified in ECMA-262, 3rd edition. | |
29 | ||
30 | %package devel | |
31 | Summary: Development headers and libraries for v8 | |
32 | Group: Development/Libraries | |
33 | Requires: %{name} = %{version}-%{release} | |
34 | ||
35 | %description devel | |
36 | Development 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 |
56 | rm 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 | |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir}} | |
c894b44e ER |
71 | cp -a include/*.h $RPM_BUILD_ROOT%{_includedir} |
72 | install -p libv8.so.*.*.* $RPM_BUILD_ROOT%{_libdir} | |
b8bbb50f | 73 | |
c894b44e ER |
74 | lib=$(basename $RPM_BUILD_ROOT%{_libdir}/libv8.so.*.*.*) |
75 | ln -s $lib $RPM_BUILD_ROOT%{_libdir}/libv8.so | |
76 | ln -s $lib $RPM_BUILD_ROOT%{_libdir}/libv8.so.0 | |
b8bbb50f AM |
77 | |
78 | %clean | |
79 | rm -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 |