]> git.pld-linux.org Git - packages/v8.git/blame - v8.spec
- build with our cflags, builds now in carme-i686
[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
7594b47f 19BuildRequires: readline-devel
b8bbb50f 20BuildRequires: scons
c894b44e 21ExclusiveArch: %{ix86} %{x8664} arm
b8bbb50f
AM
22BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24%description
25V8 is Google's open source JavaScript engine. V8 is written in C++ and
26is used in Google Chrome, the open source browser from Google. V8
27implements ECMAScript as specified in ECMA-262, 3rd edition.
28
29%package devel
30Summary: Development headers and libraries for v8
31Group: Development/Libraries
32Requires: %{name} = %{version}-%{release}
33
34%description devel
35Development 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
55rm 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
68rm -rf $RPM_BUILD_ROOT
69install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir}}
c894b44e
ER
70cp -a include/*.h $RPM_BUILD_ROOT%{_includedir}
71install -p libv8.so.*.*.* $RPM_BUILD_ROOT%{_libdir}
b8bbb50f 72
c894b44e
ER
73lib=$(basename $RPM_BUILD_ROOT%{_libdir}/libv8.so.*.*.*)
74ln -s $lib $RPM_BUILD_ROOT%{_libdir}/libv8.so
75ln -s $lib $RPM_BUILD_ROOT%{_libdir}/libv8.so.0
b8bbb50f
AM
76
77%clean
78rm -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
This page took 0.141407 seconds and 4 git commands to generate.