]>
Commit | Line | Data |
---|---|---|
b8bbb50f AM |
1 | %define snap 20090918 |
2 | ||
3 | Summary: JavaScript Engine | |
4 | Name: v8 | |
5 | Version: 1.2.13 | |
6 | Release: 0.%{snap}.1 | |
7 | License: BSD | |
8 | Group: Libraries | |
9 | URL: http://code.google.com/p/v8 | |
10 | # No tarballs, pulled from svn | |
11 | # svn export http://v8.googlecode.com/svn/trunk/ v8 | |
12 | Source0: %{name}-%{snap}.tar.bz2 | |
13 | # Source0-md5: 736a6a7a21aa8a2834a583763d37a7af | |
14 | #Patch0: %{name}-svn2430-unused-parameter.patch | |
15 | #Patch1: http://codereview.chromium.org/download/issue115176_4_1002.diff | |
16 | BuildRequires: scons | |
17 | ExclusiveArch: %{ix86} x86_64 arm | |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %description | |
21 | V8 is Google's open source JavaScript engine. V8 is written in C++ and | |
22 | is used in Google Chrome, the open source browser from Google. V8 | |
23 | implements ECMAScript as specified in ECMA-262, 3rd edition. | |
24 | ||
25 | %package devel | |
26 | Summary: Development headers and libraries for v8 | |
27 | Group: Development/Libraries | |
28 | Requires: %{name} = %{version}-%{release} | |
29 | ||
30 | %description devel | |
31 | Development headers and libraries for v8. | |
32 | ||
33 | %prep | |
34 | %setup -q -n %{name} | |
35 | #%patch0 -p1 -b .unused-parameter | |
36 | #%patch1 -p0 -b .issue115176 | |
37 | ||
38 | %build | |
39 | %scons \ | |
40 | library=shared snapshots=on \ | |
41 | %ifarch x86_64 | |
42 | arch=x64 \ | |
43 | %endif | |
44 | env=CCFLAGS:"-fPIC" | |
45 | # When will people learn to create versioned shared libraries by default? | |
46 | # first, lets get rid of the old .so | |
47 | rm -rf libv8.so | |
48 | # Now, lets make it right. | |
49 | %ifarch arm | |
50 | %{__cxx} %{rpmcflags} %{rpmldflags} -fPIC -o libv8.so.0.0.0 -shared -Wl,-soname,libv8.so.0 obj/release/*.os obj/release/arm/*.os | |
51 | %endif | |
52 | %ifarch %{ix86} | |
53 | %{__cxx} %{rpmcflags} %{rpmldflags} -fPIC -o libv8.so.0.0.0 -shared -Wl,-soname,libv8.so.0 obj/release/*.os obj/release/ia32/*.os | |
54 | %endif | |
55 | %ifarch x86_64 | |
56 | %{__cxx} %{rpmcflags} %{rpmldflags} -fPIC -o libv8.so.0.0.0 -shared -Wl,-soname,libv8.so.0 obj/release/*.os obj/release/x64/*.os | |
57 | %endif | |
58 | ||
59 | %install | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir}} | |
62 | ||
63 | ||
64 | install -p include/*.h $RPM_BUILD_ROOT%{_includedir} | |
65 | install -p libv8.so.0.0.0 $RPM_BUILD_ROOT%{_libdir} | |
66 | ||
67 | cd $RPM_BUILD_ROOT%{_libdir} | |
68 | ln -sf libv8.so.0.0.0 libv8.so | |
69 | ln -sf libv8.so.0.0.0 libv8.so.0 | |
70 | ln -sf libv8.so.0.0.0 libv8.so.0.0 | |
71 | ||
72 | chmod -x $RPM_BUILD_ROOT%{_includedir}/v8*.h | |
73 | ||
74 | %clean | |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | ||
77 | %post -p /sbin/ldconfig | |
78 | %postun -p /sbin/ldconfig | |
79 | ||
80 | %files | |
81 | %defattr(644,root,root,755) | |
82 | %doc AUTHORS ChangeLog LICENSE | |
83 | %attr(755,root,root) %{_libdir}/*.so.* | |
84 | ||
85 | %files devel | |
86 | %defattr(644,root,root,755) | |
87 | %{_includedir}/*.h | |
88 | %attr(755,root,root) %{_libdir}/*.so |