%define pkgname mozjs %define api 24 %define libname %mklibname %{pkgname} %{api} %define libdev %mklibname %{pkgname} %{api} -d Summary: JavaScript interpreter and libraries Name: mozjs24 Version: 24.2.0 Release: %mkrel 5 License: GPLv2+ or LGPLv2+ or MPLv1.1 Group: Development/Other URL: http://www.mozilla.org/js/ Source0: http://ftp.mozilla.org/pub/mozilla.org/js/mozjs-%{version}.tar.bz2 # From fedora Patch0: js17-build-fixes.patch BuildRequires: pkgconfig(nspr) BuildRequires: pkgconfig(python3) BuildRequires: readline-devel BuildRequires: autoconf2.1 %description JavaScript is the Netscape-developed object scripting language used in millions of web pages and server applications worldwide. Netscape's JavaScript is a superset of the ECMA-262 Edition 3 (ECMAScript) standard scripting language, with only mild differences from the published standard. %package -n %{libname} Summary: JavaScript engine library Group: System/Libraries %description -n %{libname} JavaScript is the Netscape-developed object scripting languages. This package has been created for purposes of Sablotron and is suitable for embedding in applications. See http://www.mozilla.org/js for details and sources. %package -n %{libdev} Summary: The header files for %{name} Group: Development/Other Provides: %{name}-devel = %{version}-%{release} Requires: %{libname} = %{version}-%{release} %if "%{?_lib}" == "lib64" Provides: devel(libmozjs-24(64bit)) = %{version}-%{release} %else Provides: devel(libmozjs-24) = %{version}-%{release} %endif %description -n %{libdev} This package contains the header files, static libraries and development documentation for %{name}. If you like to develop programs using %{name}, you will need to install %{name}-devel. %prep %setup -q -n %pkgname-%version %apply_patches # Delete bundled sources rm -rf js/src/editline rm -rf js/src/ctypes/libffi chmod a+x configure pushd js/src autoconf-2.13 popd %build %configure2_5x --disable-static --with-system-nspr --enable-threadsafe --enable-readline %make %check cat > js/src/config/find_vanilla_new_calls << EOF #!/bin/bash exit 0 EOF %make -C js/src check %install %makeinstall_std # For some reason the headers and pkg-config file are executable find %{buildroot}%{_includedir} -type f -exec chmod a-x {} \; chmod a-x %{buildroot}%{_libdir}/pkgconfig/*.pc # Upstream does not honor --disable-static yet rm -f %{buildroot}%{_libdir}/*.a # This is also statically linked; once that is fixed that we could # consider shipping it. rm -f %{buildroot}%{_bindir}/js%{api} # However, delete js-config since everything should use # the pkg-config file. rm -f %{buildroot}%{_bindir}/js%{api}-config %files -n %{libname} %doc LICENSE README %{_libdir}/*.so %files -n %{libdev} %{_libdir}/pkgconfig/*.pc %{_includedir}/mozjs-%{api} %changelog * Sat Nov 22 2014 joequant <joequant> 24.2.0-5.mga5 + Revision: 798352 - add "devel" RPM provides. * Wed Oct 15 2014 umeabot <umeabot> 24.2.0-4.mga5 + Revision: 748998 - Second Mageia 5 Mass Rebuild * Sat Sep 27 2014 tv <tv> 24.2.0-3.mga5 + Revision: 727348 - rebuild for missing pythoneggs deps * Tue Sep 16 2014 umeabot <umeabot> 24.2.0-2.mga5 + Revision: 682618 - Mageia 5 Mass Rebuild * Wed Feb 05 2014 ovitters <ovitters> 24.2.0-1.mga5 + Revision: 582917 - imported package mozjs24