File v8-3.12.spec of Package v8-3.12

%define bname v8
%define ver 3.12
Name: %bname-%ver
Version: 19
Release: 2
Summary: JavaScript Engine
License: BSD-3-Clause
Group: System/Libraries
Patch: %bname-%ver.%version-git.patch
Requires: lib%name = %version-%release
BuildRequires: gcc-c++ readline-devel gyp
ExclusiveArch: %ix86 x86_64 %arm

V8 is Google's open source JavaScript engine. V8 is written in C++ and is used
in Google Chrome, the open source browser from Google. V8 implements ECMAScript
as specified in ECMA-262, 3rd edition.

%package -n lib%name
Summary: JavaScript Engine
Group: Development/Libraries/Other

%description -n lib%name
Libraries for v8.

%package devel
Summary: Development headers and libraries for v8
Group: Development/Libraries/Other
Requires: lib%name = %version-%release
Provides: %bname-devel = %ver.%version-%release
Provides: lib%bname-devel = %ver.%version-%release

%description devel
Development headers and libraries for v8.

%setup -q -n %bname-%ver.%version
%patch -p1
sed -i \
	"/'cflags':.*'-Wall'/a'-Wno-unused-local-typedefs', '-Wno-aggressive-loop-optimizations', '-Wno-strict-overflow'," \

./build/gyp_v8 -f make build/all.gyp --depth . \
	-Dcomponent=shared_library \
	-Dsoname_version=%ver \
	-Ddebuggersupport=off \
make -C out %{?_smp_mflags} snapshots=on BUILDTYPE=Release V=1

gzip -9c ChangeLog > ChangeLog.gz

install -d -m 0755 %buildroot{%_bindir,%_libdir,%_includedir/%bname/x64}
install -p -m 0644 include/*.h %buildroot%_includedir

install -p -m 0644 src/*.h %buildroot%_includedir/%bname
install -p -m 0644 src/x64/*.h %buildroot%_includedir/%bname/x64

install -p -m 0755 out/out/Release/* %buildroot%_libdir/
install -p -m 0755 out/out/Release/d8 %buildroot%_bindir

ln -sf %buildroot%_libdir/

%post -n lib%name -p /sbin/ldconfig
%postun -n lib%name -p /sbin/ldconfig


%files -n lib%name
%doc AUTHORS ChangeLog.* LICENSE*

%files devel

openSUSE Build Service is sponsored by