]>
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 | |
7594b47f | 19 | BuildRequires: readline-devel |
b8bbb50f | 20 | BuildRequires: scons |
c894b44e | 21 | ExclusiveArch: %{ix86} %{x8664} arm |
b8bbb50f AM |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
24 | %description | |
25 | V8 is Google's open source JavaScript engine. V8 is written in C++ and | |
26 | is used in Google Chrome, the open source browser from Google. V8 | |
27 | implements ECMAScript as specified in ECMA-262, 3rd edition. | |
28 | ||
29 | %package devel | |
30 | Summary: Development headers and libraries for v8 | |
31 | Group: Development/Libraries | |
32 | Requires: %{name} = %{version}-%{release} | |
33 | ||
34 | %description devel | |
35 | Development headers and libraries for v8. | |
36 | ||
37 | %prep | |
38 | %setup -q -n %{name} | |
c894b44e ER |
39 | #%patch0 -p1 |
40 | #%patch1 -p0 | |
7594b47f | 41 | %{__sed} -i -e "s,'-O3','%{rpmcxxflags}'.split(' ')," SConstruct |
b8bbb50f AM |
42 | |
43 | %build | |
44 | %scons \ | |
c894b44e ER |
45 | library=shared \ |
46 | snapshots=on \ | |
7594b47f ER |
47 | soname=off \ |
48 | console=readline \ | |
b8bbb50f | 49 | %ifarch x86_64 |
c894b44e | 50 | arch=x64 \ |
b8bbb50f | 51 | %endif |
c894b44e ER |
52 | env=CCFLAGS:"-fPIC" |
53 | ||
7594b47f ER |
54 | # the soname=on creates soname as libv8-1.3.11.1.so, that's wrong |
55 | rm libv8.so | |
b8bbb50f AM |
56 | # Now, lets make it right. |
57 | %ifarch arm | |
58 | %{__cxx} %{rpmcflags} %{rpmldflags} -fPIC -o libv8.so.0.0.0 -shared -Wl,-soname,libv8.so.0 obj/release/*.os obj/release/arm/*.os | |
59 | %endif | |
60 | %ifarch %{ix86} | |
61 | %{__cxx} %{rpmcflags} %{rpmldflags} -fPIC -o libv8.so.0.0.0 -shared -Wl,-soname,libv8.so.0 obj/release/*.os obj/release/ia32/*.os | |
62 | %endif | |
7594b47f | 63 | %ifarch %{x8664} |
b8bbb50f AM |
64 | %{__cxx} %{rpmcflags} %{rpmldflags} -fPIC -o libv8.so.0.0.0 -shared -Wl,-soname,libv8.so.0 obj/release/*.os obj/release/x64/*.os |
65 | %endif | |
66 | ||
67 | %install | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir}} | |
c894b44e ER |
70 | cp -a include/*.h $RPM_BUILD_ROOT%{_includedir} |
71 | install -p libv8.so.*.*.* $RPM_BUILD_ROOT%{_libdir} | |
b8bbb50f | 72 | |
c894b44e ER |
73 | lib=$(basename $RPM_BUILD_ROOT%{_libdir}/libv8.so.*.*.*) |
74 | ln -s $lib $RPM_BUILD_ROOT%{_libdir}/libv8.so | |
75 | ln -s $lib $RPM_BUILD_ROOT%{_libdir}/libv8.so.0 | |
b8bbb50f AM |
76 | |
77 | %clean | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
c894b44e ER |
80 | %post -p /sbin/ldconfig |
81 | %postun -p /sbin/ldconfig | |
b8bbb50f AM |
82 | |
83 | %files | |
84 | %defattr(644,root,root,755) | |
85 | %doc AUTHORS ChangeLog LICENSE | |
c894b44e ER |
86 | %attr(755,root,root) %{_libdir}/libv8.so.*.*.* |
87 | %attr(755,root,root) %ghost %{_libdir}/libv8.so.0 | |
b8bbb50f AM |
88 | |
89 | %files devel | |
90 | %defattr(644,root,root,755) | |
c894b44e | 91 | %attr(755,root,root) %{_libdir}/libv8.so |
b8bbb50f | 92 | %{_includedir}/*.h |