3 %bcond_without systemtap # systemtap/dtrace trace support
4 %bcond_with tests # JS tests (upstream failed to update them, e.g. tests for version < 4.0.0; some require $DISPLAY)
6 Summary: Javascript Bindings for Cinnamon
7 Summary(pl.UTF-8): Wiązania JavaScriptu dla środowiska Cinnamon
12 # The following files contain code from Mozilla which
13 # is triple licensed under MPL1.1/LGPLv2+/GPLv2+:
14 # The console module (modules/console.c)
15 # Stack printer (gjs/stack.c)
16 License: MIT and (MPL v1.1 or GPL v2+ or LGPL v2+)
17 #Source0Download: https://github.com/linuxmint/cjs/releases
18 Source0: https://github.com/linuxmint/cjs/archive/%{version}/%{name}-%{version}.tar.gz
19 # Source0-md5: dd6c63134494c328886ffe34abadbf98
20 URL: https://github.com/linuxmint/Cinnamon
21 BuildRequires: autoconf >= 2.64
22 BuildRequires: automake >= 1:1.11.1
23 BuildRequires: cairo-gobject-devel
24 BuildRequires: glib2-devel >= 1:2.42.0
25 BuildRequires: gobject-introspection-devel >= 1.46.0
26 BuildRequires: gtk+3-devel >= 3.14.0
27 BuildRequires: libffi-devel >= 3.0
28 BuildRequires: libtool >= 2:2.2.0
29 BuildRequires: libstdc++-devel >= 6:4.7
30 BuildRequires: mozjs52-devel >= 52
31 BuildRequires: pkgconfig >= 1:0.14.0
32 BuildRequires: readline-devel
33 %{?with_systemtap:BuildRequires: systemtap-sdt-devel}
34 Requires: glib2 >= 1:2.42.0
35 Requires: gobject-introspection >= 1.46.0
36 Requires: gtk+3 >= 3.14.0
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 Cjs allows using Cinnamon libraries from Javascript. It's based on the
41 Spidermonkey Javascript engine from Mozilla and the GObject
42 introspection framework.
45 Summary: Development package for cjs
46 Summary(pl.UTF-8): Pakiet programistyczny cjs
47 Group: Development/Libraries
48 Requires: %{name} = %{version}-%{release}
49 Requires: cairo-gobject-devel
50 Requires: glib2-devel >= 1:2.42.0
51 Requires: gobject-introspection-devel >= 1.46.0
52 Requires: gtk+3-devel >= 3.14.0
53 Requires: libffi-devel >= 3.0
54 Requires: mozjs52-devel >= 52
57 Files for development with cjs.
59 %description devel -l pl.UTF-8
60 Pliki do tworzenia oprogramowania z użyciem cjs
63 Summary: Tests for the cjs package
64 Summary(pl.UTF-8): Testy dla pakietu cjs
65 Group: Development/Libraries
66 Requires: %{name}-devel = %{version}-%{release}
69 The cjs-tests package contains tests that can be used to verify the
70 functionality of the installed cjs package.
72 %description tests -l pl.UTF-8
73 Ten pakiet zawiera testy, których można użyć do sprawdzenia
74 funkcjonalności zainstalowanego pakietu cjs.
76 %package -n systemtap-cjs
77 Summary: systemtap/dtrace probes for cjs
78 Summary(pl.UTF-8): Sondy systemtap/dtrace dla cjs
79 Group: Development/Tools
80 Requires: %{name} = %{version}-%{release}
81 Requires: systemtap-client
83 %description -n systemtap-cjs
84 systemtap/dtrace probes for cjs.
86 %description -n systemtap-cjs -l pl.UTF-8
87 Sondy systemtap/dtrace dla cjs.
99 --enable-installed-tests \
100 --disable-silent-rules \
101 %{?with_systemtap:--enable-systemtap}
110 rm -rf $RPM_BUILD_ROOT
113 DESTDIR=$RPM_BUILD_ROOT
115 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
116 cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
118 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libcjs.la
119 %{__rm} $RPM_BUILD_ROOT%{_libdir}/cjs/lib*.la
122 rm -rf $RPM_BUILD_ROOT
124 %post -p /sbin/ldconfig
125 %postun -p /sbin/ldconfig
128 %defattr(644,root,root,755)
129 %doc COPYING NEWS README.md debian/changelog
130 %attr(755,root,root) %{_bindir}/cjs
131 %attr(755,root,root) %{_bindir}/cjs-console
132 %attr(755,root,root) %{_libdir}/libcjs.so.*.*.*
133 %ghost %{_libdir}/libcjs.so.0
135 %dir %{_libdir}/cjs/girepository-1.0
136 %{_libdir}/cjs/girepository-1.0/CjsPrivate-1.0.typelib
139 %defattr(644,root,root,755)
140 %attr(755,root,root) %{_libdir}/libcjs.so
141 %{_includedir}/cjs-1.0
142 %{_pkgconfigdir}/cjs-1.0.pc
143 %{_examplesdir}/%{name}-%{version}
146 %defattr(644,root,root,755)
147 %attr(755,root,root) %{_libdir}/cjs/libgimarshallingtests.so
148 %attr(755,root,root) %{_libdir}/cjs/libregress.so
149 %attr(755,root,root) %{_libdir}/cjs/libwarnlib.so
150 %dir %{_libexecdir}/cjs
151 %{_libexecdir}/cjs/installed-tests
152 # FIXME: this is common dir for installed-tests, move to common package (or don't package installed-tests at all)
153 %dir %{_datadir}/installed-tests
154 %{_datadir}/installed-tests/cjs
156 %if %{with systemtap}
157 %files -n systemtap-cjs
158 %defattr(644,root,root,755)
159 %{_datadir}/systemtap/tapset/cjs.stp