Group :: Development/Other
RPM: js
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Summary: Mozilla SpiderMonkey (JavaScript-C) Engine
Name: js
%define lname lib%name
Version: 1.7.0
Release: alt1
License: %lgpl2only
URL: http://www.mozilla.org/%name/spidermonkey/
Group: Development/Other
Source: ftp://ftp.mozilla.org/pub/mozilla.org/%name/%name-%version.tar.bz2
Patch: %name-1.7.0-alt.patch
Requires: %lname = %version-%release
Conflicts: libmozjs-tools
# Automatically added by buildreq on Tue Feb 12 2008
BuildRequires: libnspr-devel libreadline-devel
BuildRequires: rpm-build-licenses
%description
SpiderMonkey is the code-name for the Mozilla's C implementation of
JavaScript.
%package -n %lname
Summary: Shared library of SpiderMonkey
Group: System/Libraries
%description -n %lname
Shared library of SpiderMonkey.
%package -n %lname-devel
Summary: Development files for SpiderMonkey
Group: Development/C
Requires: %lname = %version-%release
Conflicts: libmozjs
%description -n %lname-devel
Header and library files for doing development with %lname.
%package -n %lname-devel-static
Summary: Static library of SpiderMonkey
Group: Development/C
Requires: %lname-devel = %version-%release
Conflicts: libmozjs-devel
%description -n %lname-devel-static
Static library of SpiderMonkey.
%prep
%setup -c
%patch -p0
%build
# BUILD_OPT=1 build with optimization
# BUILD_IDG=1 build with integrated debugger
# NO_LIBM=1 to omit -lm
# JS_EDITLINE=1 to use own line editor
# JS_HAS_FILE_OBJECT=1 for file object support
# JS_HAS_XML_SUPPORT=1 for XML (E4X) support
# JS_LIVECONNECT=1 for LiveConnect (Java) support
# JS_NO_THIN_LOCKS=1 for coarser locks
# JS_PERLCONNECT=1 for PerlConnect support
# JS_READLINE=1 to get readline support
# JS_THREADSAFE=1 for thread safety (requires NSPR)
# NES40=1 for NetScape 4.x compatibility
# XCFLAGS=... miscellaneous build-time CFLAGS:
# -DJS_GCMETER to turn on GC instrumentation
# -DGC_MARK_DEBUG to turn on GC mark-phase debugging,
# useful to find leaked objects by their address,
# and to dump the GC heap
# -DJS_ARENAMETER to turn on the arena package's instrumentation
# -DJS_HASHMETER to turn on the hash table package's metering
# -DJS_VERSION=150 to define JavaScript version (e.g. 150)
#
# Client-side -D options (not needed in $XCFLAGS, but in $CLIENT_DEFS):
# -DJS_THREADSAFE for the thread-safe variant
# -DDEBUG unless built by "make BUILD_(OPT|IDG)=1"
# -DNAME_ALL_GC_ROOTS to add debug info to JS_AddRoot calls
# -DHAVE_SYS_INTTYPES_H for AIX
# -DHAVE_WATCOM_BUG_2 for the WatCom compiler
# -DXP_<OS> where <OS> ::= BEOS|MAC|OS2|UNIX|WIN
%add_optflags %optflags_shared
%make -C %name/src -f Makefile.ref \
LD=%__cc \
XCFLAGS="%optflags $(nspr-config --cflags)" \
BUILD_OPT=1 \
JS_HAS_FILE_OBJECT=1 \
JS_NO_THIN_LOCKS=1 \
JS_THREADSAFE=1 \
JS_HAS_XML_SUPPORT=1 \
JS_READLINE=1 \
XMKSHLIBOPTS="-Wl,-soname,%lname.so.1" \
VERSION=%version \
all export
%install
install -d -m 0755 %buildroot{%_bindir,%_libdir,%_includedir/%name}
install -m 0755 dist/bin/* %buildroot%_bindir/
install -m 0644 dist/%_lib/* %buildroot%_libdir/
ln -sf %lname.so.%version %buildroot%_libdir/%lname.so
install -m 0644 dist/include/* %name/src/jsutil.h %buildroot/%_includedir/%name/
%post -n %lname -p %post_ldconfig
%postun -n %lname -p %postun_ldconfig
%files
%_bindir/*
%files -n %lname
%_libdir/*.so.*
%files -n %lname-devel
%doc %name/src/README*
%_includedir/%name
%_libdir/*.so
%files -n %lname-devel-static
%_libdir/*.a
%changelog
…
Full changelog you can see here
Name: js
%define lname lib%name
Version: 1.7.0
Release: alt1
License: %lgpl2only
URL: http://www.mozilla.org/%name/spidermonkey/
Group: Development/Other
Source: ftp://ftp.mozilla.org/pub/mozilla.org/%name/%name-%version.tar.bz2
Patch: %name-1.7.0-alt.patch
Requires: %lname = %version-%release
Conflicts: libmozjs-tools
# Automatically added by buildreq on Tue Feb 12 2008
BuildRequires: libnspr-devel libreadline-devel
BuildRequires: rpm-build-licenses
%description
SpiderMonkey is the code-name for the Mozilla's C implementation of
JavaScript.
%package -n %lname
Summary: Shared library of SpiderMonkey
Group: System/Libraries
%description -n %lname
Shared library of SpiderMonkey.
%package -n %lname-devel
Summary: Development files for SpiderMonkey
Group: Development/C
Requires: %lname = %version-%release
Conflicts: libmozjs
%description -n %lname-devel
Header and library files for doing development with %lname.
%package -n %lname-devel-static
Summary: Static library of SpiderMonkey
Group: Development/C
Requires: %lname-devel = %version-%release
Conflicts: libmozjs-devel
%description -n %lname-devel-static
Static library of SpiderMonkey.
%prep
%setup -c
%patch -p0
%build
# BUILD_OPT=1 build with optimization
# BUILD_IDG=1 build with integrated debugger
# NO_LIBM=1 to omit -lm
# JS_EDITLINE=1 to use own line editor
# JS_HAS_FILE_OBJECT=1 for file object support
# JS_HAS_XML_SUPPORT=1 for XML (E4X) support
# JS_LIVECONNECT=1 for LiveConnect (Java) support
# JS_NO_THIN_LOCKS=1 for coarser locks
# JS_PERLCONNECT=1 for PerlConnect support
# JS_READLINE=1 to get readline support
# JS_THREADSAFE=1 for thread safety (requires NSPR)
# NES40=1 for NetScape 4.x compatibility
# XCFLAGS=... miscellaneous build-time CFLAGS:
# -DJS_GCMETER to turn on GC instrumentation
# -DGC_MARK_DEBUG to turn on GC mark-phase debugging,
# useful to find leaked objects by their address,
# and to dump the GC heap
# -DJS_ARENAMETER to turn on the arena package's instrumentation
# -DJS_HASHMETER to turn on the hash table package's metering
# -DJS_VERSION=150 to define JavaScript version (e.g. 150)
#
# Client-side -D options (not needed in $XCFLAGS, but in $CLIENT_DEFS):
# -DJS_THREADSAFE for the thread-safe variant
# -DDEBUG unless built by "make BUILD_(OPT|IDG)=1"
# -DNAME_ALL_GC_ROOTS to add debug info to JS_AddRoot calls
# -DHAVE_SYS_INTTYPES_H for AIX
# -DHAVE_WATCOM_BUG_2 for the WatCom compiler
# -DXP_<OS> where <OS> ::= BEOS|MAC|OS2|UNIX|WIN
%add_optflags %optflags_shared
%make -C %name/src -f Makefile.ref \
LD=%__cc \
XCFLAGS="%optflags $(nspr-config --cflags)" \
BUILD_OPT=1 \
JS_HAS_FILE_OBJECT=1 \
JS_NO_THIN_LOCKS=1 \
JS_THREADSAFE=1 \
JS_HAS_XML_SUPPORT=1 \
JS_READLINE=1 \
XMKSHLIBOPTS="-Wl,-soname,%lname.so.1" \
VERSION=%version \
all export
%install
install -d -m 0755 %buildroot{%_bindir,%_libdir,%_includedir/%name}
install -m 0755 dist/bin/* %buildroot%_bindir/
install -m 0644 dist/%_lib/* %buildroot%_libdir/
ln -sf %lname.so.%version %buildroot%_libdir/%lname.so
install -m 0644 dist/include/* %name/src/jsutil.h %buildroot/%_includedir/%name/
%post -n %lname -p %post_ldconfig
%postun -n %lname -p %postun_ldconfig
%files
%_bindir/*
%files -n %lname
%_libdir/*.so.*
%files -n %lname-devel
%doc %name/src/README*
%_includedir/%name
%_libdir/*.so
%files -n %lname-devel-static
%_libdir/*.a
%changelog
…
Full changelog you can see here