a8ffbc5
%define real_version 1.7.0
cvsextras 3f47eb8
a1a1ce8
Summary: JavaScript interpreter and libraries
cvsextras 3f47eb8
Name: js
a8ffbc5
Version: 1.70
d0117eb
Release: 3%{?dist}
9db529a
# The sources are triple licensed, but when we link against readline which is
9db529a
# GPL, the result can only be GPL.
a1a1ce8
%if 0%{?_without_readline:1}
9db529a
License: GPLv2+ or LGPLv2+ or MPLv1.1
a1a1ce8
%else
9db529a
License: GPLv2+
a1a1ce8
%endif
cvsextras 3f47eb8
Group: Development/Languages
cvsextras 3f47eb8
URL: http://www.mozilla.org/js/
a8ffbc5
Source: http://ftp.mozilla.org/pub/mozilla.org/js/js-%{real_version}.tar.gz
a8ffbc5
Patch0: js-1.7.0-make.patch
cvsextras 3f47eb8
Patch1: js-shlib.patch
66acb20
Patch2: js-1.5-va_copy.patch
66acb20
Patch3: js-ldflags.patch
a8ffbc5
Patch4: js-1.7.0-threadsafe.patch
1f0cfbc
Patch5: js-1.60-ncurses.patch
cvsextras 3f47eb8
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
a8ffbc5
Buildrequires: nspr-devel
a8ffbc5
Buildrequires: readline-devel, ncurses-devel
a1a1ce8
Provides: libjs = %{version}-%{release}
cvsextras 3f47eb8
cvsextras 3f47eb8
%description
cvsextras 3f47eb8
JavaScript is the Netscape-developed object scripting languages.
cvsextras 3f47eb8
This package has been created for purposes of Sablotron and is suitable
cvsextras 3f47eb8
for embedding in applications.
cvsextras 3f47eb8
66acb20
cvsextras 3f47eb8
%package devel
cvsextras 3f47eb8
Summary: Header files, libraries and development documentation for %{name}
cvsextras 3f47eb8
Group: Development/Libraries
a8ffbc5
Requires: %{name} = %{version}-%{release}
a8ffbc5
Requires: pkgconfig
a1a1ce8
Provides: libjs-devel = %{version}-%{release}
cvsextras 3f47eb8
cvsextras 3f47eb8
%description devel
cvsextras 3f47eb8
This package contains the header files, static libraries and development
cvsextras 3f47eb8
documentation for %{name}. If you like to develop programs using %{name},
cvsextras 3f47eb8
you will need to install %{name}-devel.
cvsextras 3f47eb8
66acb20
cvsextras 3f47eb8
%prep
a1a1ce8
%setup -q -n %{name}
a8ffbc5
%patch0 -p1 -b .make
1a04be1
%patch1 -p0 -b .shlib
66acb20
%patch2 -p1 -b .vacopy
1a04be1
%patch3 -p0 -b .ldflags
1a04be1
%patch4 -p1 -b .threadsafe
1f0cfbc
%patch5 -p1 -b .ncurses
66acb20
66acb20
# Create pkgconfig file
cf5e96c
%{__cat} > libjs.pc << 'EOF'
66acb20
prefix=%{_prefix}
4c95482
exec_prefix=%{_prefix}
4c95482
libdir=%{_libdir}
4c95482
includedir=%{_includedir}
66acb20
66acb20
Name: libjs
66acb20
Description: JS library
66acb20
Requires:
a8ffbc5
Version: %{real_version}
66acb20
Libs: -L${libdir} -ljs
66acb20
Cflags: -I${includedir}
66acb20
EOF
66acb20
cvsextras 3f47eb8
cvsextras 3f47eb8
%build
a1a1ce8
export BUILD_OPT=1
a8ffbc5
%{__make} %{?_smp_mflags} -C src -f Makefile.ref \
1a04be1
    JS_THREADSAFE="1" \
66acb20
    XCFLAGS="%{optflags} -fPIC" \
66acb20
    BUILD_OPT="1" \
a1a1ce8
%if 0%{!?_without_readline:1}
a8ffbc5
    JS_READLINE="1"
a1a1ce8
%endif
cvsextras 3f47eb8
66acb20
cvsextras 3f47eb8
%install
cvsextras 3f47eb8
%{__rm} -rf %{buildroot}
66acb20
%{__mkdir_p} %{buildroot}%{_bindir} \
66acb20
             %{buildroot}%{_libdir}/pkgconfig \
66acb20
             %{buildroot}%{_includedir}
66acb20
%{__install} -m 0755 src/Linux_All_OPT.OBJ/{js,jscpucfg} \
66acb20
    %{buildroot}%{_bindir}/
bcd34b6
%{__install} -m 0644 src/Linux_All_OPT.OBJ/libjs.a \
bcd34b6
    %{buildroot}%{_libdir}/
bcd34b6
%{__install} -m 0755 src/Linux_All_OPT.OBJ/libjs.so \
66acb20
    %{buildroot}%{_libdir}/
66acb20
%{__mv} %{buildroot}%{_libdir}/libjs.so %{buildroot}%{_libdir}/libjs.so.1
cvsextras 3f47eb8
%{__ln_s} -nf libjs.so.1 %{buildroot}%{_libdir}/libjs.so
d0117eb
%{__install} -m 0644 src/js*.h src/js.msg src/*.tbl \
bcd34b6
    src/Linux_All_OPT.OBJ/jsautocfg.h \
bcd34b6
    %{buildroot}%{_includedir}/
66acb20
%{__install} -m 0644 libjs.pc \
66acb20
    %{buildroot}%{_libdir}/pkgconfig/
66acb20
66acb20
66acb20
%clean
66acb20
%{__rm} -rf %{buildroot}
66acb20
a1a1ce8
a1a1ce8
%post -p /sbin/ldconfig
cvsextras 3f47eb8
a1a1ce8
%postun -p /sbin/ldconfig
cvsextras 3f47eb8
cvsextras 3f47eb8
cvsextras 3f47eb8
%files
bcd34b6
%defattr(-,root,root,-)
a8ffbc5
%doc src/README.html
cvsextras 3f47eb8
%{_bindir}/js
cvsextras 3f47eb8
%{_libdir}/*.so.*
cvsextras 3f47eb8
cvsextras 3f47eb8
%files devel
bcd34b6
%defattr(-,root,root,-)
cvsextras 3f47eb8
%{_bindir}/jscpucfg
66acb20
%{_libdir}/pkgconfig/*.pc
cvsextras 3f47eb8
%{_libdir}/*.so
cvsextras 3f47eb8
%{_libdir}/*.a
a1a1ce8
%{_includedir}/js*.h
d0117eb
%{_includedir}/*.tbl
bcd34b6
%{_includedir}/js.msg
cvsextras 3f47eb8
66acb20
cvsextras 3f47eb8
%changelog
d0117eb
* Wed Jun  4 2008 Jon McCann <jmccann@redhat.com> - 1.70-3
d0117eb
- Add two missing files (#449715)
d0117eb
4c68153
* Wed Feb 27 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.70-2
4c68153
- Rebuild for perl 5.10 (again)
4c68153
a8ffbc5
* Sun Feb  3 2008 Matthias Saou <http://freshrpms.net/> 1.70-1
a8ffbc5
- Update to 1.7.0, as 1.70 to avoid introducing an epoch for now...
a8ffbc5
- Remove no longer provided perlconnect parts.
a8ffbc5
b1d8277
* Thu Jan 24 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.60-6
b1d8277
- BR: perl(ExtUtils::Embed)
b1d8277
05d54e5
* Sun Jan 20 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.60-5
05d54e5
- rebuild for new perl
05d54e5
d5e0166
* Wed Aug 22 2007 Matthias Saou <http://freshrpms.net/> 1.60-4
d5e0166
- Rebuild for new BuildID feature.
d5e0166
9db529a
* Mon Aug  6 2007 Matthias Saou <http://freshrpms.net/> 1.60-3
9db529a
- Update License field.
9db529a
- Add perl(ExtUtils::MakeMaker) build requirement to pull in perl-devel.
9db529a
bcd34b6
* Fri Feb  2 2007 Matthias Saou <http://freshrpms.net/> 1.60-2
bcd34b6
- Include jsopcode.tbl and js.msg in devel (#235481).
bcd34b6
- Install static lib mode 644 instead of 755.
bcd34b6
1f0cfbc
* Fri Feb  2 2007 Matthias Saou <http://freshrpms.net/> 1.60-1
1f0cfbc
- Update to 1.60.
1f0cfbc
- Rebuild in order to link against ncurses instead of termcap (#226773).
1f0cfbc
- Add ncurses-devel build requirement and patch s/termcap/ncurses/ in.
1f0cfbc
- Change mode of perl library from 555 to 755 (#224603).
1f0cfbc
4c95482
* Mon Aug 28 2006 Matthias Saou <http://freshrpms.net/> 1.5-6
4c95482
- Fix pkgconfig file (#204232 & dupe #204236).
4c95482
1a04be1
* Mon Jul 24 2006 Matthias Saou <http://freshrpms.net/> 1.5-5
1a04be1
- FC6 rebuild.
1a04be1
- Enable JS_THREADSAFE in the build (#199696), add patch and nspr build req.
1a04be1
12fbd59
* Mon Mar  6 2006 Matthias Saou <http://freshrpms.net/> 1.5-4
12fbd59
- FC5 rebuild.
12fbd59
4c2dc08
* Thu Feb  9 2006 Matthias Saou <http://freshrpms.net/> 1.5-3
4c2dc08
- Rebuild for new gcc/glibc.
4c2dc08
4c2dc08
* Mon Jan 30 2006 Matthias Saou <http://freshrpms.net/> 1.5-2
cf5e96c
- Fix .pc file.
cf5e96c
4c2dc08
* Thu Jan 26 2006 Matthias Saou <http://freshrpms.net/> 1.5-1
66acb20
- Update to 1.5.0 final.
66acb20
- Spec file cleanups.
66acb20
- Move docs from devel to main, since we need the license there.
66acb20
- Remove no longer needed js-perlconnect.patch.
66acb20
- Update js-1.5-va_copy.patch.
66acb20
- Include a pkgconfig file (#178993).
66acb20
c8a2017
* Tue Apr 19 2005 Ville Skyttä <ville.skytta at iki.fi> - 1.5-0.rc6a.6
c8a2017
- Link shared lib with libperl.
c8a2017
729fd8a
* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
729fd8a
- rebuilt
729fd8a
0c0b411
* Mon Feb 14 2005 David Woodhouse <dwmw2@infradead.org> - 1.5-0.rc6a.4
bcd34b6
- Take js-va_copy.patch out of %%ifarch x86_64 so it fixes the PPC build too
0c0b411
30fe851
* Sun Feb 13 2005 Thorsten Leemhuis <fedora at leemhuis dot info> - 1.5-0.rc6a.3
30fe851
- Add js-va_copy.patch to fix x86_64; Patch was found in a Mandrake srpm
30fe851
a1a1ce8
* Sat Dec 11 2004 Ville Skyttä <ville.skytta at iki.fi> - 1.5-0.rc6a.2
a1a1ce8
- Include perlconnect.
a1a1ce8
- Include readline support, rebuild using "--without readline" to disable.
a1a1ce8
- Add libjs* provides for upstream compatibility.
a1a1ce8
- Install header files in %%{_includedir} instead of %%{_includedir}/js.
a1a1ce8
cvsextras 3f47eb8
* Tue Jun 15 2004 Matthias Saou <http://freshrpms.net> 1.5-0.rc6a
cvsextras 3f47eb8
- Update to 1.5rc6a.
cvsextras 3f47eb8
cvsextras 3f47eb8
* Tue Mar 02 2004 Dag Wieers <dag@wieers.com> - 1.5-0.rc6
cvsextras 3f47eb8
- Initial package. (using DAR)
66acb20