]>
Commit | Line | Data |
---|---|---|
dbaa9c05 | 1 | %define ver 2023-12-09 |
503cd904 WF |
2 | Summary: QuickJS Javascript Engine |
3 | Summary(pl.UTF-8): Silnik Javascriptu QuickJS | |
4 | Name: quickjs | |
dbaa9c05 JP |
5 | Version: 20231209 |
6 | Release: 1 | |
503cd904 WF |
7 | License: MIT |
8 | Group: Libraries | |
12b6202e | 9 | Source0: https://bellard.org/quickjs/%{name}-%{ver}.tar.xz |
dbaa9c05 | 10 | # Source0-md5: c8d37b54826a11b893c3f5357636ee7d |
503cd904 | 11 | Patch0: rpmpldcflags.patch |
0715a3e2 | 12 | Patch1: q.diff |
503cd904 | 13 | URL: https://bellard.org/quickjs/ |
3e1e79db JP |
14 | %ifnarch %arch_with_atomics64 |
15 | BuildRequires: libatomic-devel | |
16 | %endif | |
503cd904 | 17 | BuildRequires: libtool |
3e1e79db | 18 | BuildRequires: rpmbuild(macros) >= 2.025 |
e60bada4 JP |
19 | BuildRequires: tar >= 1:1.22 |
20 | BuildRequires: xz | |
12b6202e | 21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
503cd904 WF |
22 | |
23 | %description | |
24 | QuickJS is a small and embeddable Javascript engine. It supports the | |
12b6202e KM |
25 | ES2020 specification including modules, asynchronous generators, |
26 | proxies and BigInt. It supports mathematical extensions such as big | |
27 | decimal float float numbers (BigDecimal), big binary floating point | |
28 | numbers (BigFloat), and operator overloading. | |
503cd904 WF |
29 | |
30 | %description -l pl.UTF-8 | |
12b6202e KM |
31 | QuickJS jest małym osadzalnym silnikiem Javascriptu. Wspiera |
32 | specyfikację ES2020, w tym moduły, asynchroniczne generatory, proxy i | |
33 | BigInt. Wspiera też rozszerzenia matematyczne, takie jak liczby | |
34 | BigDecimal, BigFloat i przeciążenia operatorów. | |
503cd904 WF |
35 | |
36 | %package devel | |
4fa31f25 JB |
37 | Summary: Header files for QuickJS library |
38 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki QuickJS | |
503cd904 WF |
39 | Group: Development/Libraries |
40 | Requires: %{name} = %{version}-%{release} | |
41 | ||
42 | %description devel | |
4fa31f25 | 43 | Header files for QuickJS library. |
503cd904 WF |
44 | |
45 | %description devel -l pl.UTF-8 | |
4fa31f25 | 46 | Pliki nagłówkowe biblioteki QuickJS. |
503cd904 WF |
47 | |
48 | %prep | |
49 | %setup -q -n %{name}-%{ver} | |
50 | %patch0 -p1 | |
0715a3e2 | 51 | %patch1 -p1 |
503cd904 WF |
52 | |
53 | %build | |
4fa31f25 JB |
54 | %{__make} \ |
55 | CC="%{__cc}" \ | |
56 | RPMPLDCFLAGS="%{rpmcflags} %{rpmcppflags}" \ | |
00dc7a3c | 57 | LDFLAGS="%{rpmldflags} %{rpmcflags}" \ |
3e1e79db JP |
58 | %ifnarch %arch_with_atomics64 |
59 | EXTRA_LIBS="-latomic" \ | |
60 | %endif | |
503cd904 WF |
61 | prefix="%{_prefix}" |
62 | ||
63 | %install | |
64 | rm -rf $RPM_BUILD_ROOT | |
f720350d | 65 | install -d $RPM_BUILD_ROOT%{_libdir} |
503cd904 WF |
66 | |
67 | %{__make} install \ | |
68 | DESTDIR=$RPM_BUILD_ROOT \ | |
4fa31f25 | 69 | STRIP=true \ |
503cd904 WF |
70 | prefix="%{_prefix}" |
71 | ||
6b9d82ce | 72 | %if "%{_lib}" != "lib" |
f720350d | 73 | %{__mv} $RPM_BUILD_ROOT{%{_prefix}/lib,%{_libdir}}/%{name} |
6b9d82ce | 74 | %endif |
38049685 | 75 | |
503cd904 WF |
76 | %clean |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
79 | %files | |
80 | %defattr(644,root,root,755) | |
4fa31f25 JB |
81 | %attr(755,root,root) %{_bindir}/qjs |
82 | %attr(755,root,root) %{_bindir}/qjsc | |
83 | %attr(755,root,root) %{_bindir}/qjscalc | |
503cd904 WF |
84 | |
85 | %files devel | |
86 | %defattr(644,root,root,755) | |
4fa31f25 | 87 | %doc doc/*.html |
38049685 JR |
88 | %dir %{_libdir}/%{name} |
89 | %{_libdir}/%{name}/libquickjs.a | |
90 | %{_libdir}/%{name}/libquickjs.lto.a | |
503cd904 | 91 | %{_includedir}/%{name} |