]>
Commit | Line | Data |
---|---|---|
19c3fbcd JB |
1 | # |
2 | # Conditional build: | |
3baa2563 JB |
3 | %bcond_without threads # thread-safe library (requires nspr) |
4 | %bcond_with java # libjsj and lshell | |
19c3fbcd | 5 | # |
10a30063 AM |
6 | %ifarch i386 i486 ppc ppc64 |
7 | %undefine with_java | |
8 | %endif | |
9 | # | |
286739a7 | 10 | %include /usr/lib/rpm/macros.perl |
19c3fbcd | 11 | Summary: JavaScript Reference Implementation |
d603892a | 12 | Summary(pl.UTF-8): Wzorcowa implementacja JavaScriptu |
19c3fbcd | 13 | Name: js |
6744a6ec | 14 | Version: 1.60 |
4406d986 | 15 | Release: 4 |
08fdfead | 16 | Epoch: 1 |
19c3fbcd JB |
17 | License: GPL or Netscape Public License 1.1 |
18 | Group: Libraries | |
e1bd9563 | 19 | Source0: http://ftp.mozilla.org/pub/mozilla.org/js/%{name}-%{version}.tar.gz |
6744a6ec | 20 | # Source0-md5: bd8f021e43a8fbbec55ac2cd3d483243 |
19c3fbcd JB |
21 | Patch0: %{name}-makefile.patch |
22 | URL: http://www.mozilla.org/js/ | |
354a2ac8 | 23 | %{?with_java:BuildRequires: jdk} |
6744a6ec | 24 | %{?with_java:BuildRequires: jpackage-utils} |
354a2ac8 | 25 | %{?with_threads:BuildRequires: nspr-devel} |
c2b7e186 | 26 | BuildRequires: perl-devel |
19c3fbcd JB |
27 | BuildRequires: readline-devel |
28 | BuildRequires: rpm-perlprov | |
7ffb0d7b | 29 | BuildRequires: rpmbuild(macros) >= 1.294 |
9fd95202 | 30 | Conflicts: njs |
08550a4a | 31 | %{?with_threads:Provides: js(threads)} |
19c3fbcd JB |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
33 | ||
2629887b | 34 | %define classdir %{_datadir}/java |
9fd95202 | 35 | |
19c3fbcd JB |
36 | %description |
37 | JavaScript Reference Implementation (codename SpiderMonkey). The | |
38 | package contains JavaScript runtime (compiler, interpreter, | |
39 | decompiler, garbage collector, atom manager, standard classes) and | |
40 | small "shell" program that can be used interactively and with .js | |
41 | files to run scripts. | |
42 | ||
e925599b | 43 | %description -l pl.UTF-8 |
19c3fbcd | 44 | Wzorcowa implementacja JavaScriptu (o nazwie kodowej SpiderMonkey). |
e925599b JR |
45 | Pakiet zawiera środowisko uruchomieniowe (kompilator, interpreter, |
46 | dekompilator, odśmiecacz, standardowe klasy) i niewielką powłokę, | |
47 | która może być używana interaktywnie lub z plikami .js do uruchamiania | |
48 | skryptów. | |
19c3fbcd JB |
49 | |
50 | %package devel | |
51 | Summary: Header files for JavaScript reference library | |
d603892a | 52 | Summary(pl.UTF-8): Pliki nagłówkowe do biblioteki JavaScript |
19c3fbcd | 53 | Group: Development/Libraries |
5ae6f060 | 54 | Requires: %{name} = %{epoch}:%{version}-%{release} |
9fd95202 | 55 | Conflicts: njs-devel |
08550a4a | 56 | %{?with_threads:Provides: js-devel(threads)} |
19c3fbcd JB |
57 | |
58 | %description devel | |
59 | Header files for JavaScript reference library. | |
60 | ||
e925599b JR |
61 | %description devel -l pl.UTF-8 |
62 | Pliki nagłówkowe do biblioteki JavaScript. | |
19c3fbcd JB |
63 | |
64 | %package static | |
65 | Summary: Static JavaScript reference library | |
d603892a | 66 | Summary(pl.UTF-8): Statyczna biblioteka JavaScript |
19c3fbcd | 67 | Group: Development/Libraries |
5ae6f060 | 68 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
9fd95202 | 69 | Conflicts: njs-static |
08550a4a | 70 | %{?with_threads:Provides: js-static(threads)} |
19c3fbcd JB |
71 | |
72 | %description static | |
73 | Static version of JavaScript reference library. | |
74 | ||
e925599b | 75 | %description static -l pl.UTF-8 |
19c3fbcd JB |
76 | Statyczna wersja biblioteki JavaScript. |
77 | ||
9fd95202 JB |
78 | %package java |
79 | Summary: JavaScript LiveConnect Version 3 implementation | |
d603892a | 80 | Summary(pl.UTF-8): Implementacja JavaScript LiveConnect w wersji 3 |
9fd95202 | 81 | Group: Libraries |
5ae6f060 | 82 | Requires: %{name} = %{epoch}:%{version}-%{release} |
9fd95202 JB |
83 | Conflicts: mozilla |
84 | Conflicts: mozilla-embedded | |
85 | ||
86 | %description java | |
87 | LiveConnect is a library that permits JavaScript and Java virtual | |
88 | machines to interoperate. Specifically, it enables JavaScript to | |
89 | access Java fields, invoke Java methods and enables Java to access | |
90 | JavaScript object properties and evaluate arbitrary JavaScript. | |
91 | LiveConnect was originally an integrated feature of both the Netscape | |
92 | Navigator browser and Netscape's server-side JavaScript. Now, it is a | |
93 | standalone library that can be embedded within other projects, such as | |
94 | the Mozilla browser. | |
95 | ||
e925599b JR |
96 | %description java -l pl.UTF-8 |
97 | LiveConnect to biblioteka pozwalająca na współpracę maszyn wirtualnych | |
98 | JavaScriptu i Javy. W szczególności pozwala z poziomu JavaScriptu na | |
99 | dostęp do pól Javy, wywoływanie metod Javy oraz z poziomu Javy na | |
100 | dostęp do składowych obiektów JavaScriptu i wykonywanie dowolnego kodu | |
101 | w JavaScripcie. LiveConnect oryginalnie był zintegrowaną częścią | |
102 | przeglądarki Netscape Navigator oraz Netscape JavaScript działającego | |
103 | po stronie serwera. Teraz jest to samodzielna biblioteka, którą można | |
104 | osadzać w innych projektach, takich jak przeglądarka Mozilla. | |
9fd95202 JB |
105 | |
106 | %package java-devel | |
107 | Summary: JavaScript LiveConnect 3 implementation header files | |
d603892a | 108 | Summary(pl.UTF-8): Pliki nagłówkowe implementacji JavaScript LiveConnect 3 |
9fd95202 | 109 | Group: Development/Libraries |
5ae6f060 | 110 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
111 | Requires: %{name}-java = %{epoch}:%{version}-%{release} | |
9fd95202 JB |
112 | |
113 | %description java-devel | |
114 | JavaScript LiveConnect 3 implementation header files. | |
115 | ||
e925599b JR |
116 | %description java-devel -l pl.UTF-8 |
117 | Pliki nagłówkowe implementacji JavaScript LiveConnect 3. | |
9fd95202 JB |
118 | |
119 | %package java-static | |
120 | Summary: JavaScript Live Connect 3 implementation static library | |
d603892a | 121 | Summary(pl.UTF-8): Biblioteka statyczna implementacji JavaScript LiveConnect 3 |
9fd95202 | 122 | Group: Development/Libraries |
5ae6f060 | 123 | Requires: %{name}-java-devel = %{epoch}:%{version}-%{release} |
9fd95202 JB |
124 | |
125 | %description java-static | |
126 | JavaScript Live Connect 3 implementation static library. | |
127 | ||
e925599b | 128 | %description java-static -l pl.UTF-8 |
9fd95202 JB |
129 | Biblioteka statyczna implementacji JavaScript LiveConnect 3. |
130 | ||
19c3fbcd | 131 | %package -n perl-JS |
a994495f | 132 | Summary: JS Perl module - interface to JavaScript |
d603892a | 133 | Summary(pl.UTF-8): Moduł Perla JS - interfejs do JavaScriptu |
19c3fbcd | 134 | Group: Development/Languages/Perl |
5ae6f060 | 135 | Requires: %{name} = %{epoch}:%{version}-%{release} |
19c3fbcd JB |
136 | |
137 | %description -n perl-JS | |
a994495f | 138 | JS Perl module allows calling JavaScript from Perl. |
19c3fbcd | 139 | |
e925599b JR |
140 | %description -n perl-JS -l pl.UTF-8 |
141 | Moduł Perla JS pozwalający na wywoływanie JavaScriptu z Perla. | |
19c3fbcd JB |
142 | |
143 | %prep | |
144 | %setup -q -n %{name} | |
380c9ee3 | 145 | %patch0 -p1 |
19c3fbcd | 146 | |
0f6791fd JB |
147 | echo 'SONAME=libjs.so.0' >> src/Makefile.ref |
148 | echo 'SONAME=libjsj.so.0' >> src/liveconnect/Makefile.ref | |
149 | ||
19c3fbcd | 150 | %build |
ff5e3b1d | 151 | %{__make} -j1 -C src -f Makefile.ref \ |
19c3fbcd | 152 | %{!?debug:BUILD_OPT=1} \ |
7021d39e | 153 | OPTIMIZER="%{rpmcflags} -DHAVE_VA_COPY -DVA_COPY=va_copy" \ |
19c3fbcd | 154 | JS_READLINE=1 \ |
cef40177 | 155 | CC="%{__cc}" \ |
380c9ee3 | 156 | LDFLAGS="%{rpmldflags}" \ |
0f6791fd | 157 | MKSHLIB="%{__cc} -shared -Wl,-soname=\$(SONAME)" \ |
354a2ac8 | 158 | %{?with_threads:JS_THREADSAFE=1} \ |
6744a6ec | 159 | %{?with_java:JS_LIVECONNECT=1 JDK=%{java_home}} |
19c3fbcd JB |
160 | |
161 | # js segfaults when jsperl is compiled in | |
162 | # JS_PERLCONNECT=1 | |
163 | ||
164 | cd src/perlconnect | |
8b39df70 | 165 | %{!?debug:BUILD_OPT=1} \ |
bf92696b | 166 | %{__perl} Makefile.PL \ |
4277c399 | 167 | INSTALLDIRS=vendor |
19c3fbcd JB |
168 | |
169 | %{__make} \ | |
170 | OPTIMIZE="%{rpmcflags}" | |
171 | ||
172 | # no UNIX makefiles | |
173 | # %{__make} -C jsd | |
174 | ||
175 | %install | |
176 | rm -rf $RPM_BUILD_ROOT | |
9fd95202 | 177 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/js,%{classdir}} |
19c3fbcd JB |
178 | |
179 | cd src | |
180 | install Linux*/{js,jscpucfg} $RPM_BUILD_ROOT%{_bindir} | |
70d3437e | 181 | install Linux*/libjs.a $RPM_BUILD_ROOT%{_libdir} |
182 | install Linux*/libjs.so $RPM_BUILD_ROOT%{_libdir}/libjs.so.0.1.0 | |
3d1ec0b0 | 183 | ln -sf libjs.so.0.1.0 $RPM_BUILD_ROOT%{_libdir}/libjs.so |
19c3fbcd JB |
184 | install Linux*/jsautocfg.h $RPM_BUILD_ROOT%{_includedir}/js |
185 | install js.msg jsapi.h jsarray.h jsarena.h jsatom.h jsbit.h jsbool.h \ | |
186 | jsclist.h jscntxt.h jscompat.h jsconfig.h jsdate.h jsdbgapi.h \ | |
187 | jsdhash.h jsemit.h jsfun.h jsgc.h jshash.h jsinterp.h jslock.h \ | |
188 | jslong.h jsmath.h jsnum.h jsobj.h jsopcode.tbl jsopcode.h jsosdep.h \ | |
189 | jsotypes.h jsparse.h jsprf.h jsprvtd.h jspubtd.h jsregexp.h jsscan.h \ | |
190 | jsscope.h jsscript.h jsstr.h jstypes.h jsutil.h jsxdrapi.h jsstddef.h \ | |
191 | $RPM_BUILD_ROOT%{_includedir}/js | |
192 | ||
354a2ac8 | 193 | %if %{with java} |
0f6791fd JB |
194 | install liveconnect/Linux*/libjsj.a $RPM_BUILD_ROOT%{_libdir} |
195 | install liveconnect/Linux*/libjsj.so $RPM_BUILD_ROOT%{_libdir}/libjsj.so.0.1.0 | |
3d1ec0b0 | 196 | ln -sf libjsj.so.0.1.0 $RPM_BUILD_ROOT%{_libdir}/libjsj.so |
9fd95202 JB |
197 | install liveconnect/Linux*/lcshell $RPM_BUILD_ROOT%{_bindir} |
198 | install liveconnect/classes/Linux*/*.jar $RPM_BUILD_ROOT%{classdir} | |
199 | install liveconnect/{jsjava.h,nsI*.h,_jni/*.h} $RPM_BUILD_ROOT%{_includedir}/js | |
200 | %endif | |
19c3fbcd | 201 | |
6744a6ec | 202 | %{__make} -C perlconnect pure_install \ |
19c3fbcd JB |
203 | DESTDIR=$RPM_BUILD_ROOT |
204 | ||
a4797d07 | 205 | cp -f perlconnect/README.html README-perlconnect.html |
19c3fbcd | 206 | |
6bdc1260 AM |
207 | /sbin/ldconfig -n -N $RPM_BUILD_ROOT%{_libdir} |
208 | ||
19c3fbcd JB |
209 | %clean |
210 | rm -rf $RPM_BUILD_ROOT | |
211 | ||
212 | %post -p /sbin/ldconfig | |
213 | %postun -p /sbin/ldconfig | |
214 | ||
9fd95202 JB |
215 | %post java -p /sbin/ldconfig |
216 | %postun java -p /sbin/ldconfig | |
217 | ||
19c3fbcd JB |
218 | %files |
219 | %defattr(644,root,root,755) | |
220 | %doc src/README*.html | |
9fd95202 | 221 | %attr(755,root,root) %{_bindir}/js* |
3d1ec0b0 JB |
222 | %attr(755,root,root) %{_libdir}/libjs.so.*.*.* |
223 | %attr(755,root,root) %ghost %{_libdir}/libjs.so.0 | |
19c3fbcd JB |
224 | |
225 | %files devel | |
226 | %defattr(644,root,root,755) | |
70d3437e | 227 | %attr(755,root,root) %{_libdir}/libjs.so |
9fd95202 JB |
228 | %dir %{_includedir}/js |
229 | %{_includedir}/js/js.msg | |
230 | %{_includedir}/js/jsopcode.tbl | |
231 | %{_includedir}/js/js[!j]*.h | |
19c3fbcd JB |
232 | |
233 | %files static | |
234 | %defattr(644,root,root,755) | |
9fd95202 JB |
235 | %{_libdir}/libjs.a |
236 | ||
354a2ac8 | 237 | %if %{with java} |
9fd95202 JB |
238 | %files java |
239 | %defattr(644,root,root,755) | |
240 | %doc src/liveconnect/README.html | |
241 | %attr(755,root,root) %{_bindir}/lcshell | |
3d1ec0b0 JB |
242 | %attr(755,root,root) %{_libdir}/libjsj.so.*.*.* |
243 | %attr(755,root,root) %ghost %{_libdir}/libjsj.so.0 | |
9fd95202 JB |
244 | %{classdir}/*.jar |
245 | ||
246 | %files java-devel | |
247 | %defattr(644,root,root,755) | |
0f6791fd | 248 | %attr(755,root,root) %{_libdir}/libjsj.so |
9fd95202 JB |
249 | %{_includedir}/js/jsjava.h |
250 | %{_includedir}/js/n*.h | |
251 | ||
252 | %files java-static | |
253 | %defattr(644,root,root,755) | |
254 | %{_libdir}/libjsj.a | |
255 | %endif | |
19c3fbcd JB |
256 | |
257 | %files -n perl-JS | |
258 | %defattr(644,root,root,755) | |
4277c399 JB |
259 | %{perl_vendorarch}/JS.pm |
260 | %{perl_vendorarch}/jsperlbuild.pl | |
261 | %dir %{perl_vendorarch}/auto/JS | |
262 | %{perl_vendorarch}/auto/JS/JS.bs | |
263 | %attr(755,root,root) %{perl_vendorarch}/auto/JS/JS.so | |
19c3fbcd | 264 | # unusable now (helper module for PerlConnect in libjs, which is not built) |
bf92696b | 265 | #%%{perl_vendorarch}/PerlConnect.pm |