1 | %define real_version 1.7.0 |
---|
2 | |
---|
3 | Summary: JavaScript interpreter and libraries |
---|
4 | Name: js |
---|
5 | Version: 1.70 |
---|
6 | Release: 1%{?_dist_release} |
---|
7 | # The sources are triple licensed, but when we link against readline which is |
---|
8 | # GPL, the result can only be GPL. |
---|
9 | %if 0%{?_without_readline:1} |
---|
10 | License: GPLv2+ or LGPLv2+ or MPLv1.1 |
---|
11 | %else |
---|
12 | License: GPLv2+ |
---|
13 | %endif |
---|
14 | Group: Development/Languages |
---|
15 | URL: http://www.mozilla.org/js/ |
---|
16 | Source: http://ftp.mozilla.org/pub/mozilla.org/js/js-%{real_version}.tar.gz |
---|
17 | Patch0: js-1.7.0-make.patch |
---|
18 | Patch1: js-shlib.patch |
---|
19 | Patch2: js-1.5-va_copy.patch |
---|
20 | Patch3: js-ldflags.patch |
---|
21 | Patch4: js-1.7.0-threadsafe.patch |
---|
22 | Patch5: js-1.60-ncurses.patch |
---|
23 | |
---|
24 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
25 | BuildRequires: nspr-devel |
---|
26 | BuildRequires: readline-devel, ncurses-devel |
---|
27 | Buildrequires: pkgconfig perl |
---|
28 | Provides: libjs = %{version}-%{release} |
---|
29 | |
---|
30 | %description |
---|
31 | JavaScript is the Netscape-developed object scripting languages. |
---|
32 | This package has been created for purposes of Sablotron and is suitable |
---|
33 | for embedding in applications. |
---|
34 | |
---|
35 | |
---|
36 | %package devel |
---|
37 | Summary: Header files, libraries and development documentation for %{name} |
---|
38 | Group: Development/Libraries |
---|
39 | Requires: %{name} = %{version}-%{release} |
---|
40 | Requires: pkgconfig |
---|
41 | Provides: libjs-devel = %{version}-%{release} |
---|
42 | |
---|
43 | %description devel |
---|
44 | This package contains the header files, static libraries and development |
---|
45 | documentation for %{name}. If you like to develop programs using %{name}, |
---|
46 | you will need to install %{name}-devel. |
---|
47 | |
---|
48 | |
---|
49 | %prep |
---|
50 | %setup -q -n %{name} |
---|
51 | %patch0 -p1 -b .make |
---|
52 | %patch1 -p0 -b .shlib |
---|
53 | %patch2 -p1 -b .vacopy |
---|
54 | %patch3 -p0 -b .ldflags |
---|
55 | %patch4 -p1 -b .threadsafe |
---|
56 | %patch5 -p1 -b .ncurses |
---|
57 | |
---|
58 | # Create pkgconfig file |
---|
59 | %{__cat} > libjs.pc << 'EOF' |
---|
60 | prefix=%{_prefix} |
---|
61 | exec_prefix=%{_prefix} |
---|
62 | libdir=%{_libdir} |
---|
63 | includedir=%{_includedir} |
---|
64 | |
---|
65 | Name: libjs |
---|
66 | Description: JS library |
---|
67 | Requires: |
---|
68 | Version: %{real_version} |
---|
69 | Libs: -L${libdir} -ljs |
---|
70 | Cflags: -I${includedir} |
---|
71 | EOF |
---|
72 | |
---|
73 | |
---|
74 | %build |
---|
75 | export BUILD_OPT=1 |
---|
76 | %{__make} -C src -f Makefile.ref \ |
---|
77 | JS_THREADSAFE="1" \ |
---|
78 | XCFLAGS="%{optflags} -fPIC" \ |
---|
79 | BUILD_OPT="1" \ |
---|
80 | %if 0%{!?_without_readline:1} |
---|
81 | JS_READLINE="1" \ |
---|
82 | %endif |
---|
83 | |
---|
84 | %install |
---|
85 | %{__rm} -rf %{buildroot} |
---|
86 | %{__mkdir_p} %{buildroot}%{_bindir} \ |
---|
87 | %{buildroot}%{_libdir}/pkgconfig \ |
---|
88 | %{buildroot}%{_includedir} |
---|
89 | %{__install} -m 0755 src/Linux_All_OPT.OBJ/{js,jscpucfg} \ |
---|
90 | %{buildroot}%{_bindir}/ |
---|
91 | %{__install} -m 0644 src/Linux_All_OPT.OBJ/libjs.a \ |
---|
92 | %{buildroot}%{_libdir}/ |
---|
93 | %{__install} -m 0755 src/Linux_All_OPT.OBJ/libjs.so \ |
---|
94 | %{buildroot}%{_libdir}/ |
---|
95 | %{__mv} %{buildroot}%{_libdir}/libjs.so %{buildroot}%{_libdir}/libjs.so.1 |
---|
96 | %{__ln_s} -nf libjs.so.1 %{buildroot}%{_libdir}/libjs.so |
---|
97 | %{__install} -m 0644 src/js*.h src/js.msg src/jsopcode.tbl \ |
---|
98 | src/Linux_All_OPT.OBJ/jsautocfg.h \ |
---|
99 | %{buildroot}%{_includedir}/ |
---|
100 | %{__install} -m 0644 libjs.pc \ |
---|
101 | %{buildroot}%{_libdir}/pkgconfig/ |
---|
102 | |
---|
103 | %clean |
---|
104 | %{__rm} -rf %{buildroot} |
---|
105 | |
---|
106 | %post -p /sbin/ldconfig |
---|
107 | |
---|
108 | %postun -p /sbin/ldconfig |
---|
109 | |
---|
110 | |
---|
111 | %files |
---|
112 | %defattr(-,root,root,-) |
---|
113 | %doc src/README*.html |
---|
114 | %{_bindir}/js |
---|
115 | %{_libdir}/*.so.* |
---|
116 | #{perl_vendorarch}/auto/JS/ |
---|
117 | #{perl_vendorarch}/*.pm |
---|
118 | |
---|
119 | %files devel |
---|
120 | %defattr(-,root,root,-) |
---|
121 | %{_bindir}/jscpucfg |
---|
122 | %{_libdir}/pkgconfig/*.pc |
---|
123 | %{_libdir}/*.so |
---|
124 | %{_libdir}/*.a |
---|
125 | %{_includedir}/js*.h |
---|
126 | %{_includedir}/jsopcode.tbl |
---|
127 | %{_includedir}/js.msg |
---|
128 | |
---|
129 | |
---|
130 | %changelog |
---|
131 | * Sun Aug 17 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.70-1 |
---|
132 | - new upstream release |
---|
133 | - applied new versioning policy |
---|
134 | - removed no longer provided perlconnect parts. |
---|
135 | |
---|
136 | * Mon Jun 4 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.60-2vl1 |
---|
137 | - initial build for Vine Linux |
---|
138 | |
---|
139 | * Fri Feb 2 2007 Matthias Saou <http://freshrpms.net/> 1.60-2 |
---|
140 | - Include jsopcode.tbl and js.msg in devel (#235481). |
---|
141 | - Install static lib mode 644 instead of 755. |
---|
142 | |
---|
143 | * Fri Feb 2 2007 Matthias Saou <http://freshrpms.net/> 1.60-1 |
---|
144 | - Update to 1.60. |
---|
145 | - Rebuild in order to link against ncurses instead of termcap (#226773). |
---|
146 | - Add ncurses-devel build requirement and patch s/termcap/ncurses/ in. |
---|
147 | - Change mode of perl library from 555 to 755 (#224603). |
---|
148 | |
---|
149 | * Mon Aug 28 2006 Matthias Saou <http://freshrpms.net/> 1.5-6 |
---|
150 | - Fix pkgconfig file (#204232 & dupe #204236). |
---|
151 | |
---|
152 | * Mon Jul 24 2006 Matthias Saou <http://freshrpms.net/> 1.5-5 |
---|
153 | - FC6 rebuild. |
---|
154 | - Enable JS_THREADSAFE in the build (#199696), add patch and nspr build req. |
---|
155 | |
---|
156 | * Mon Mar 6 2006 Matthias Saou <http://freshrpms.net/> 1.5-4 |
---|
157 | - FC5 rebuild. |
---|
158 | |
---|
159 | * Thu Feb 9 2006 Matthias Saou <http://freshrpms.net/> 1.5-3 |
---|
160 | - Rebuild for new gcc/glibc. |
---|
161 | |
---|
162 | * Mon Jan 30 2006 Matthias Saou <http://freshrpms.net/> 1.5-2 |
---|
163 | - Fix .pc file. |
---|
164 | |
---|
165 | * Thu Jan 26 2006 Matthias Saou <http://freshrpms.net/> 1.5-1 |
---|
166 | - Update to 1.5.0 final. |
---|
167 | - Spec file cleanups. |
---|
168 | - Move docs from devel to main, since we need the license there. |
---|
169 | - Remove no longer needed js-perlconnect.patch. |
---|
170 | - Update js-1.5-va_copy.patch. |
---|
171 | - Include a pkgconfig file (#178993). |
---|
172 | |
---|
173 | * Tue Apr 19 2005 Ville Skyttä <ville.skytta at iki.fi> - 1.5-0.rc6a.6 |
---|
174 | - Link shared lib with libperl. |
---|
175 | |
---|
176 | * Fri Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net> |
---|
177 | - rebuilt |
---|
178 | |
---|
179 | * Mon Feb 14 2005 David Woodhouse <dwmw2@infradead.org> - 1.5-0.rc6a.4 |
---|
180 | - Take js-va_copy.patch out of %%ifarch x86_64 so it fixes the PPC build too |
---|
181 | |
---|
182 | * Sun Feb 13 2005 Thorsten Leemhuis <fedora at leemhuis dot info> - 1.5-0.rc6a.3 |
---|
183 | - Add js-va_copy.patch to fix x86_64; Patch was found in a Mandrake srpm |
---|
184 | |
---|
185 | * Sat Dec 11 2004 Ville Skyttä <ville.skytta at iki.fi> - 1.5-0.rc6a.2 |
---|
186 | - Include perlconnect. |
---|
187 | - Include readline support, rebuild using "--without readline" to disable. |
---|
188 | - Add libjs* provides for upstream compatibility. |
---|
189 | - Install header files in %%{_includedir} instead of %%{_includedir}/js. |
---|
190 | |
---|
191 | * Tue Jun 15 2004 Matthias Saou <http://freshrpms.net> 1.5-0.rc6a |
---|
192 | - Update to 1.5rc6a. |
---|
193 | |
---|
194 | * Tue Mar 02 2004 Dag Wieers <dag@wieers.com> - 1.5-0.rc6 |
---|
195 | - Initial package. (using DAR) |
---|
196 | |
---|