# # spec file for package erlang-erlang_js # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: erlang-erlang_js Version: 1.3.0 Release: 1 Summary: Linked-in driver for Erlang to Mozilla's Spidermonkey Javascript runtime License: Apache-2.0 Group: Development/Libraries/Other URL: https://github.com/basho/erlang_js BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: erlang_js-%{version}.tar.gz Patch1: erlang_js-1.3.0-debuginfo.patch Patch2: erlang_js-1.3.0-fix-version.patch Patch3: erlang_js-1.3.0-fix-newer-builds.patch Requires: erlang >= R13B04 BuildRequires: erlang-rebar BuildRequires: gcc-c++ %description erlang_js is a linked-in driver, API, and OTP application that embeds Mozilla’s Spidermonkey Javascript Virtual Machine in Erlang. Originally created to facilitate usage of Riak’s MapReduce by non-Erlang programmers, it supports multiple concurrent Javascript VMs, runtime evaluation of Javascript code, and invocation of Javascript functions. erlang_js builds and executes only on Unix-based platforms, including Linux, Mac OS/X, and Solaris. It includes version 1.8.0 of Spidermonkey and Douglas Crockford’s json2.js JSON parser. More information about the features available to Javascript inside erlang_js are detailed on the Mozilla Developer Center. %package doc Summary: Documentation for erlang-erlang_js Group: Documentation/Other Requires: erlang-erlang_js %description doc Documentation for Erlang linked-in driver to Mozilla's Spidermonkey Javascript runtime. %package src Summary: Linked-in driver for Erlang to Mozilla's Spidermonkey Javascript runtime Group: Development/Libraries/Other Requires: %{name} = %{version} %description src erlang_js is a linked-in driver, API, and OTP application that embeds Mozilla’s Spidermonkey Javascript Virtual Machine in Erlang. Originally created to facilitate usage of Riak’s MapReduce by non-Erlang programmers, it supports multiple concurrent Javascript VMs, runtime evaluation of Javascript code, and invocation of Javascript functions. erlang_js builds and executes only on Unix-based platforms, including Linux, Mac OS/X, and Solaris. It includes version 1.8.0 of Spidermonkey and Douglas Crockford’s json2.js JSON parser. More information about the features available to Javascript inside erlang_js are detailed on the Mozilla Developer Center. %prep %setup -q -n erlang_js-%{version} %patch1 -p1 %patch2 -p1 %patch3 -p1 %build %__make all docs %install for dir in ebin src priv ; do install -d %{buildroot}%{erlang_libdir}/erlang_js-%{version}/${dir} cp -r ${dir}/* %{buildroot}%{erlang_libdir}/erlang_js-%{version}/${dir}/ done %check %__make test %files %defattr(-,root,root) %doc LICENSE %dir %{erlang_libdir}/erlang_js-%{version} %{erlang_libdir}/erlang_js-%{version}/ebin %{erlang_libdir}/erlang_js-%{version}/priv %files doc %defattr(-,root,root) %doc README.org docs test %files src %defattr(-,root,root) %{erlang_libdir}/erlang_js-%{version}/src %changelog