%define _requires_exceptions devel(libnspr4\\|devel(libplc4\\|devel(libplds4 %define major 1 %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d %define epoch 1 %define real_version 1.7.0 Summary: JavaScript engine Name: js Version: 1.70 Release: %mkrel 6 License: MPL Group: Development/Other URL: http://www.mozilla.org/js/ Source0: http://ftp.mozilla.org/pub/mozilla.org/js/js-%{real_version}.tar.gz Patch1: js-va_copy.diff Patch2: js-editline.diff Patch3: js-1.7.0-make.patch Patch4: js-shlib.patch Patch5: js-ldflags.patch Patch6: js-1.7.0-threadsafe.patch Patch7: js-format_not_a_string_literal_and_no_format_arguments.diff BuildRequires: multiarch-utils >= 1.0.3 BuildRequires: edit-devel BuildRequires: nspr-devel Requires: %{libname} = %{epoch}:%{version}-%{release} Epoch: %{epoch} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %description 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 %{libname} Summary: JavaScript engine library Group: System/Libraries Epoch: %{epoch} %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 %{develname} Summary: The header files for %{libname} Group: Development/C Requires: %{libname} = %{epoch}:%{version}-%{release} Provides: %{name}-devel = %{epoch}:%{version}-%{release} Provides: libjs-devel = %{epoch}:%{version}-%{release} Obsoletes: %{mklibname -d js 1} Requires: nspr-devel Epoch: %{epoch} %description -n %{develname} These are the header files for %{libname} %prep %setup -q -n %{name} for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do if [ -e "$i" ]; then rm -rf $i; fi >&/dev/null done %patch1 -p1 -b .va_copy %patch2 -p0 -b .editline %patch3 -p1 -b .make %patch4 -p0 -b .shlib %patch5 -p0 -b .ldflags %patch6 -p1 -b .threadsafe %patch7 -p0 -b .format_not_a_string_literal_and_no_format_arguments %build export CFLAGS="%{optflags} -fno-stack-protector -DPIC -fPIC -D_REENTRANT" export XCFLAGS="$CFLAGS" export BUILD_OPT=1 export LDFLAGS="%{ldflags}" make -C src -f Makefile.ref \ JS_THREADSAFE="1" \ XCFLAGS="$CFLAGS" \ BUILD_OPT="1" \ JS_EDITLINE="1" \ LDFLAGS="%{ldflags}" # create pkgconfig file # pkgconfig can't find libjs without it %{__cat} > libjs.pc << 'EOF' prefix=%{_prefix} exec_prefix=%{_prefix} libdir=%{_libdir} includedir=%{_includedir} Name: libjs Description: %{summary} Version: %{version} Libs: -L\${libdir} -ljs Cflags: -I\${includedir}/js-%{version} EOF %install rm -rf %{buildroot} install -d %{buildroot}%{_bindir} install -d %{buildroot}%{_libdir} install -d %{buildroot}%{_includedir}/js-%{version} # install headers install -m0644 src/*.h %{buildroot}%{_includedir}/js-%{version}/ install -m0644 src/js.msg %{buildroot}%{_includedir}/js-%{version}/ install -m0644 src/*.tbl %{buildroot}%{_includedir}/js-%{version}/ install -m0644 src/Linux_All_OPT.OBJ/jsautocfg.h %{buildroot}%{_includedir}/js-%{version}/ # install shared library install -m0755 src/Linux_All_OPT.OBJ/lib%{name}.so \ %{buildroot}%{_libdir}/lib%{name}.so.%{major} ln -snf lib%{name}.so.%{major} %{buildroot}%{_libdir}/lib%{name}.so # install static library install -m0644 src/Linux_All_OPT.OBJ/lib%{name}.a %{buildroot}%{_libdir}/ # install binary install -m0755 src/Linux_All_OPT.OBJ/%{name} %{buildroot}%{_bindir}/ install -m0755 src/Linux_All_OPT.OBJ/jscpucfg %{buildroot}%{_bindir}/ # install pkgconfig file mkdir -p %{buildroot}%{_libdir}/pkgconfig/ install -m0644 libjs.pc %{buildroot}%{_libdir}/pkgconfig/ %multiarch_includes %{buildroot}%{_includedir}/js-%{version}/jsautocfg.h %if %mdkversion < 200900 %post -n %{libname} -p /sbin/ldconfig %endif %if %mdkversion < 200900 %postun -n %{libname} -p /sbin/ldconfig %endif %clean rm -rf %{buildroot} %files %defattr(-,root,root) %{_bindir}/* %files -n %{libname} %defattr(-,root,root) %doc src/README.html %{_libdir}/*.so.* %files -n %{develname} %defattr(-,root,root) %dir %{_includedir}/js-%{version} %multiarch %{multiarch_includedir}/js-%{version}/jsautocfg.h %{_includedir}/js-%{version}/* %{_libdir}/*.so %{_libdir}/*.a %{_libdir}/pkgconfig/*.pc %changelog * Sun Mar 14 2010 Oden Eriksson <oeriksson@mandriva.com> 1:1.70-6mdv2010.1 + Revision: 519013 - rebuild * Wed Sep 02 2009 Christophe Fergeau <cfergeau@mandriva.com> 1:1.70-5mdv2010.0 + Revision: 425472 - rebuild * Sun Dec 21 2008 Oden Eriksson <oeriksson@mandriva.com> 1:1.70-4mdv2009.1 + Revision: 316955 - fix build with -Werror=format-security (P7) - use %%{ldflags} and fix linkage - link against libedit and not editline * Tue Jun 24 2008 Oden Eriksson <oeriksson@mandriva.com> 1:1.70-3mdv2009.0 + Revision: 228617 - fix the exceptions to work on 64bit too * Tue Jun 24 2008 Oden Eriksson <oeriksson@mandriva.com> 1:1.70-2mdv2009.0 + Revision: 228590 - rule out some borked auto deps * Tue Jun 24 2008 Oden Eriksson <oeriksson@mandriva.com> 1:1.70-1mdv2009.0 + Revision: 228540 - 1.70 - sync with fedora * Tue Jun 17 2008 Thierry Vignaud <tv@mandriva.org> 1:1.5-6mdv2009.0 + Revision: 221762 - rebuild + Pixel <pixel@mandriva.com> - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers * Mon Feb 04 2008 Götz Waschk <waschk@mandriva.org> 1:1.5-5mdv2008.1 + Revision: 161913 - fix devel provides and obsoletes * Sun Jan 13 2008 Thierry Vignaud <tv@mandriva.org> 1:1.5-4mdv2008.1 + Revision: 150422 - rebuild - kill re-definition of %%buildroot on Pixel's request + Olivier Blin <oblin@mandriva.com> - restore BuildRoot * Wed Aug 29 2007 Oden Eriksson <oeriksson@mandriva.com> 1:1.5-3mdv2008.0 + Revision: 73850 - bump release - 1.5 - rediffed patches - build it against system editline libs - have to use -fno-stack-protector, otherwise it won't build * Wed Oct 11 2006 Oden Eriksson <oeriksson@mandriva.com> + 2006-10-10 18:04:13 (63395) - bunzip patches * Wed Oct 11 2006 Oden Eriksson <oeriksson@mandriva.com> + 2006-10-10 17:59:17 (63394) - Import js * Fri Sep 01 2006 UTUMI Hirosi <utuhiro78@yahoo.co.jp> 1.5-0.rc5a.10mdv2007.0 - add pkgconfig file * Fri Feb 10 2006 Oden Eriksson <oeriksson@mandriva.com> 1.5-0.rc5a.9mdk - rebuild * Mon Jan 31 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 1.5-0.rc5a.8mdk - fix deps and conditional %%multiarch * Wed Dec 29 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.5-0.rc5a.7mdk - revert latest "lib64 fixes" * Wed Dec 29 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.5-0.rc5a.6mdk - lib64 fixes * Mon Nov 22 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.5-0.rc5a.5mdk - relocate the headers as many dev moz packages seems to conflict - nuke redundant provides * Thu Sep 30 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.5-0.rc5a.4mdk - fix fork off mozilla/js, our system knows about ISO C va_copy() macro * Sun Jun 20 2004 Christiaan Welvaart <cjw@daneel.dyndns.org> 1.5-0.rc5a.3mdk - fix ppc build * Tue Jun 08 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.5-0.rc5a.2mdk - third try... (duh!) * Tue Jun 08 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.5-0.rc5a.1mdk - second try... * Tue Jun 08 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.5-0.rc5a.1mdk - 1.5-0.rc5a * Mon Jun 07 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.5-0.rc5.6mdk - rebuilt with gcc v3.4.x