]> git.pld-linux.org Git - packages/quickjs.git/blob - quickjs.spec
link libatomic on archs without support for 64-bit atomics
[packages/quickjs.git] / quickjs.spec
1 %define         ver     2023-12-09
2 Summary:        QuickJS Javascript Engine
3 Summary(pl.UTF-8):      Silnik Javascriptu QuickJS
4 Name:           quickjs
5 Version:        20231209
6 Release:        1
7 License:        MIT
8 Group:          Libraries
9 Source0:        https://bellard.org/quickjs/%{name}-%{ver}.tar.xz
10 # Source0-md5:  c8d37b54826a11b893c3f5357636ee7d
11 Patch0:         rpmpldcflags.patch
12 Patch1:         q.diff
13 URL:            https://bellard.org/quickjs/
14 %ifnarch %arch_with_atomics64
15 BuildRequires:  libatomic-devel
16 %endif
17 BuildRequires:  libtool
18 BuildRequires:  rpmbuild(macros) >= 2.025
19 BuildRequires:  tar >= 1:1.22
20 BuildRequires:  xz
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 QuickJS is a small and embeddable Javascript engine. It supports the
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.
29
30 %description -l pl.UTF-8
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.
35
36 %package devel
37 Summary:        Header files for QuickJS library
38 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki QuickJS
39 Group:          Development/Libraries
40 Requires:       %{name} = %{version}-%{release}
41
42 %description devel
43 Header files for QuickJS library.
44
45 %description devel -l pl.UTF-8
46 Pliki nagłówkowe biblioteki QuickJS.
47
48 %prep
49 %setup -q -n %{name}-%{ver}
50 %patch0 -p1
51 %patch1 -p1
52
53 %build
54 %{__make} \
55         CC="%{__cc}" \
56         RPMPLDCFLAGS="%{rpmcflags} %{rpmcppflags}" \
57         LDFLAGS="%{rpmldflags} %{rpmcflags}" \
58 %ifnarch %arch_with_atomics64
59         EXTRA_LIBS="-latomic" \
60 %endif
61         prefix="%{_prefix}"
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65 install -d $RPM_BUILD_ROOT%{_libdir}
66
67 %{__make} install \
68         DESTDIR=$RPM_BUILD_ROOT \
69         STRIP=true \
70         prefix="%{_prefix}"
71
72 %if "%{_lib}" != "lib"
73 %{__mv} $RPM_BUILD_ROOT{%{_prefix}/lib,%{_libdir}}/%{name}
74 %endif
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79 %files
80 %defattr(644,root,root,755)
81 %attr(755,root,root) %{_bindir}/qjs
82 %attr(755,root,root) %{_bindir}/qjsc
83 %attr(755,root,root) %{_bindir}/qjscalc
84
85 %files devel
86 %defattr(644,root,root,755)
87 %doc doc/*.html
88 %dir %{_libdir}/%{name}
89 %{_libdir}/%{name}/libquickjs.a
90 %{_libdir}/%{name}/libquickjs.lto.a
91 %{_includedir}/%{name}
This page took 0.117273 seconds and 4 git commands to generate.