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