%define real_version 1.7.0 Name: spidermonkey Version: 1.70 Release: 5mamba Summary: SpiderMonkey is Gecko's JavaScript engine written in C Group: Graphical Desktop/Applications/Internet Vendor: openmamba Distribution: openmamba Packager: gil URL: http://developer.mozilla.org/en/docs/SpiderMonkey Source: http://ftp.mozilla.org/pub/mozilla.org/js/js-%{real_version}.tar.gz Patch0: spidermonkey-1.7.0-make.patch Patch1: spidermonkey-1.7.0-shlib.patch Patch2: spidermonkey-1.7.0-va_copy.patch Patch3: spidermonkey-1.7.0-ldflags.patch Patch4: spidermonkey-1.7.0-threadsafe.patch Patch5: spidermonkey-1.7.0-ncurses.patch License: GPL, MPL 1.1, LGPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libncurses-devel BuildRequires: libnspr-devel BuildRequires: libreadline-devel ## AUTOBUILDREQ-END BuildRequires: pkgconfig Requires: libjs = %{?epoch:%epoch:}%{version}-%{release} BuildRoot: %{_tmppath}/%{name}-%{version}-root %description SpiderMonkey is the code-name for the Mozilla's C implementation of JavaScript. %package -n libjs Group: Development/Languages Summary: %{name} libraries %description -n libjs libjs is a small, lightweight, object-oriented, cross-platform scripting language. libjs support was introduced in Firefox 2. %package -n libjs-devel Group: Development/Libraries Summary: Static libraries and headers for libjs Requires: libjs = %{?epoch:%epoch:}%{version}-%{release} %description -n libjs-devel libjs is a small, lightweight, object-oriented, cross-platform scripting language. libjs support was introduced in Firefox 2. This package contains documentation, static libraries and header files need for development. %prep %setup -q -n js %patch0 -p1 -b .make %patch1 -p1 -b .shlib %patch2 -p1 -b .vacopy %patch3 -p1 -b .ldflags %patch4 -p1 -b .threadsafe %patch5 -p1 -b .ncurses cat > libjs.pc << EOF prefix=%{_prefix} exec_prefix=%{_prefix} libdir=%{_libdir} includedir=%{_includedir} Name: libjs Description: JS library Requires: Version: 1.70 Libs: -L${libdir} -ljs Cflags: -DXP_UNIX=1 -DJS_THREADSAFE=1 -DJS_C_STRINGS_ARE_UTF8 -I${includedir} EOF %build %make -C src -f Makefile.ref \ JS_THREADSAFE="1" \ XCFLAGS="%{optflags} -fPIC -DJS_C_STRINGS_ARE_UTF8" \ BUILD_OPT="1" \ JS_READLINE="1" # X debug mode #ake -C src -f Makefile.ref %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_libdir}/pkgconfig mkdir -p %{buildroot}%{_includedir} install -m 755 src/Linux_All_OPT.OBJ/js %{buildroot}%{_bindir}/ install -m 755 src/Linux_All_OPT.OBJ/jscpucfg %{buildroot}%{_bindir}/ install -m 644 src/Linux_All_OPT.OBJ/libjs.a %{buildroot}%{_libdir}/ install -m 755 src/Linux_All_OPT.OBJ/libjs.so %{buildroot}%{_libdir}/ mv %{buildroot}%{_libdir}/libjs.so %{buildroot}%{_libdir}/libjs.so.1 ln -s -nf libjs.so.1 %{buildroot}%{_libdir}/libjs.so install -m 644 src/js*.h %{buildroot}%{_includedir}/ install -m 644 src/js.msg %{buildroot}%{_includedir}/ install -m 644 src/*.tbl %{buildroot}%{_includedir}/ install -m 644 src/Linux_All_OPT.OBJ/jsautocfg.h %{buildroot}%{_includedir}/ install -m 644 libjs.pc %{buildroot}%{_exec_prefix}/lib/pkgconfig/ %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %files %defattr(-,root,root) %{_bindir}/js #%{_mandir}/man3/editline.3.gz %doc src/README.html %post -n libjs -p /sbin/ldconfig %postun -n libjs -p /sbin/ldconfig %files -n libjs %defattr(-,root,root) %{_libdir}/libjs.so.1 %doc src/README.html %files -n libjs-devel %defattr(-,root,root) %{_bindir}/jscpucfg %{_includedir}/js.msg %{_includedir}/*.h %{_includedir}/*.tbl %{_libdir}/libjs.a %{_libdir}/libjs.so %{_exec_prefix}/lib/pkgconfig/libjs.pc %changelog * Mon Dec 27 2010 Silvan Calarco 1.70-5mamba - automatic port from devel-gil * Tue May 05 2009 gil 1.70-4mamba - edit Version * Tue Feb 03 2009 gil 1.7.0-3mamba - edit spec file - added libjs packages * Mon Feb 02 2009 Silvan Calarco 1.7.0-2mamba - fixed group and license fields; removed description formatting * Mon Feb 02 2009 Silvan Calarco 1.60-1mamba - update to 1.60 * Fri Jun 20 2008 gil 1.7.0-1mamba - package created by autospec