3 %bcond_without sysprof # sysprof profiling support
4 %bcond_without systemtap # systemtap/dtrace trace support
5 %bcond_with tests # JS tests (upstream failed to update them, e.g. tests for version < 4.0.0; some require $DISPLAY)
7 Summary: Javascript Bindings for Cinnamon
8 Summary(pl.UTF-8): Wiązania JavaScriptu dla środowiska Cinnamon
13 # The following files contain code from Mozilla which
14 # is triple licensed under MPL1.1/LGPLv2+/GPLv2+:
15 # The console module (modules/console.c)
16 # Stack printer (gjs/stack.c)
17 License: MIT and (MPL v1.1 or GPL v2+ or LGPL v2+)
18 #Source0Download: https://github.com/linuxmint/cjs/releases
19 Source0: https://github.com/linuxmint/cjs/archive/%{version}/%{name}-%{version}.tar.gz
20 # Source0-md5: b9444c6e537ebb3838518a16054804ff
21 URL: https://github.com/linuxmint/Cinnamon
22 BuildRequires: cairo-gobject-devel
23 BuildRequires: glib2-devel >= 1:2.58.0
24 BuildRequires: gobject-introspection-devel >= 1.58.3
25 BuildRequires: gtk4-devel >= 4.0
26 BuildRequires: libffi-devel >= 3.0
27 BuildRequires: libstdc++-devel >= 6:7
28 BuildRequires: meson >= 0.49.2
29 BuildRequires: mozjs78-devel >= 78
30 BuildRequires: ninja >= 1.5
31 BuildRequires: pkgconfig >= 1:0.14.0
32 BuildRequires: readline-devel
33 BuildRequires: rpmbuild(macros) >= 1.736
34 BuildRequires: sed >= 4.0
35 %{?with_sysprof:BuildRequires: sysprof-devel >= 3.38}
36 %{?with_systemtap:BuildRequires: systemtap-sdt-devel}
37 Requires: glib2 >= 1:2.58.0
38 Requires: gobject-introspection >= 1.58.3
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 Cjs allows using Cinnamon libraries from JavaScript. It's based on the
43 SpiderMonkey JavaScript engine from Mozilla and the GObject
44 introspection framework.
46 %description -l pl.UTF-8
47 Cjs pozwala na używanie bibliotek Cinnamona z poziomu JavaScriptu.
48 Jest oparty na silniku JavaScriptu SpiderMonkey z projektu Mozilla
49 oraz szkielecie GObject Introspection.
52 Summary: Development package for cjs
53 Summary(pl.UTF-8): Pakiet programistyczny cjs
54 Group: Development/Libraries
55 Requires: %{name} = %{version}-%{release}
56 Requires: cairo-gobject-devel
57 Requires: glib2-devel >= 1:2.58.0
58 Requires: gobject-introspection-devel >= 1.58.3
59 Requires: libffi-devel >= 3.0
60 Requires: mozjs78-devel >= 78
63 Files for development with cjs.
65 %description devel -l pl.UTF-8
66 Pliki do tworzenia oprogramowania z użyciem cjs
69 Summary: Tests for the cjs package
70 Summary(pl.UTF-8): Testy dla pakietu cjs
71 Group: Development/Libraries
72 Requires(post,postun): glib2-devel >= 1:2.58.0
73 Requires: %{name}-devel = %{version}-%{release}
76 The cjs-tests package contains tests that can be used to verify the
77 functionality of the installed cjs package.
79 %description tests -l pl.UTF-8
80 Ten pakiet zawiera testy, których można użyć do sprawdzenia
81 funkcjonalności zainstalowanego pakietu cjs.
83 %package -n systemtap-cjs
84 Summary: systemtap/dtrace probes for cjs
85 Summary(pl.UTF-8): Sondy systemtap/dtrace dla cjs
86 Group: Development/Tools
87 Requires: %{name} = %{version}-%{release}
88 Requires: systemtap-client
90 %description -n systemtap-cjs
91 systemtap/dtrace probes for cjs.
93 %description -n systemtap-cjs -l pl.UTF-8
94 Sondy systemtap/dtrace dla cjs.
99 %{__sed} -i -e 's/ library(/ shared_library(/' installed-tests/js/meson.build
103 %{?with_systemtap:-Ddtrace=true} \
104 %{!?with_sysprof:-Dprofiler=disabled} \
105 %{?with_systemtap:-Dsystemtap=true}
107 %ninja_build -C build
114 rm -rf $RPM_BUILD_ROOT
116 %ninja_install -C build
118 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
119 cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
122 rm -rf $RPM_BUILD_ROOT
124 %post -p /sbin/ldconfig
125 %postun -p /sbin/ldconfig
128 %glib_compile_schemas
131 %glib_compile_schemas
134 %defattr(644,root,root,755)
135 %doc COPYING NEWS README.md debian/changelog
136 %attr(755,root,root) %{_bindir}/cjs
137 %attr(755,root,root) %{_bindir}/cjs-console
138 %attr(755,root,root) %{_libdir}/libcjs.so.*.*.*
139 %ghost %{_libdir}/libcjs.so.0
141 %dir %{_libdir}/cjs/girepository-1.0
142 %{_libdir}/cjs/girepository-1.0/CjsPrivate-1.0.typelib
146 %defattr(644,root,root,755)
147 %attr(755,root,root) %{_libdir}/libcjs.so
148 %{_includedir}/cjs-1.0
149 %{_pkgconfigdir}/cjs-1.0.pc
150 %{_examplesdir}/%{name}-%{version}
153 %defattr(644,root,root,755)
154 # TODO: move system-side installed-tests dirs somewhere (filesystem?)
155 %dir %{_libexecdir}/installed-tests
156 %dir %{_libexecdir}/installed-tests/cjs
157 %attr(755,root,root) %{_libexecdir}/installed-tests/cjs/debugger-test.sh
158 %attr(755,root,root) %{_libexecdir}/installed-tests/cjs/minijasmine
159 %attr(755,root,root) %{_libexecdir}/installed-tests/cjs/lib*.so
160 %{_libexecdir}/installed-tests/cjs/*.typelib
161 %{_libexecdir}/installed-tests/cjs/debugger
162 %{_libexecdir}/installed-tests/cjs/js
163 %dir %{_libexecdir}/installed-tests/cjs/scripts
164 %attr(755,root,root) %{_libexecdir}/installed-tests/cjs/scripts/test*.sh
165 %{_datadir}/glib-2.0/schemas/org.cinnamon.CjsTest.gschema.xml
166 %dir %{_datadir}/installed-tests
167 %{_datadir}/installed-tests/cjs
169 %if %{with systemtap}
170 %files -n systemtap-cjs
171 %defattr(644,root,root,755)
172 %{_datadir}/systemtap/tapset/cjs.stp