]>
Commit | Line | Data |
---|---|---|
9f107e75 ER |
1 | # |
2 | # Conditional build: | |
f38c6e9e | 3 | %bcond_without sysprof # sysprof profiling support |
9793fb5c | 4 | %bcond_without systemtap # systemtap/dtrace trace support |
2151c67b | 5 | %bcond_with installed_tests # tests package |
9793fb5c | 6 | %bcond_with tests # JS tests (upstream failed to update them, e.g. tests for version < 4.0.0; some require $DISPLAY) |
9f107e75 ER |
7 | |
8 | Summary: Javascript Bindings for Cinnamon | |
9793fb5c | 9 | Summary(pl.UTF-8): Wiązania JavaScriptu dla środowiska Cinnamon |
9f107e75 | 10 | Name: cjs |
2151c67b | 11 | Version: 5.8.0 |
34cb1478 | 12 | Release: 1 |
9f107e75 ER |
13 | Group: Libraries |
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) | |
9793fb5c | 18 | License: MIT and (MPL v1.1 or GPL v2+ or LGPL v2+) |
2151c67b | 19 | #Source0Download: https://github.com/linuxmint/cjs/tags |
9f107e75 | 20 | Source0: https://github.com/linuxmint/cjs/archive/%{version}/%{name}-%{version}.tar.gz |
2151c67b | 21 | # Source0-md5: 991e1bbf2ebf7cca4e93cfce66c4a876 |
9793fb5c | 22 | URL: https://github.com/linuxmint/Cinnamon |
9f107e75 | 23 | BuildRequires: cairo-gobject-devel |
2151c67b JB |
24 | BuildRequires: glib2-devel >= 1:2.66.0 |
25 | BuildRequires: gobject-introspection-devel >= 1.66.0 | |
5d0b4be1 | 26 | BuildRequires: gtk4-devel >= 4.0 |
9793fb5c | 27 | BuildRequires: libffi-devel >= 3.0 |
5d0b4be1 | 28 | BuildRequires: libstdc++-devel >= 6:7 |
2151c67b JB |
29 | BuildRequires: meson >= 0.54.0 |
30 | BuildRequires: mozjs102-devel >= 102 | |
5d0b4be1 | 31 | BuildRequires: ninja >= 1.5 |
9793fb5c | 32 | BuildRequires: pkgconfig >= 1:0.14.0 |
9f107e75 | 33 | BuildRequires: readline-devel |
5d0b4be1 JB |
34 | BuildRequires: rpmbuild(macros) >= 1.736 |
35 | BuildRequires: sed >= 4.0 | |
36 | %{?with_sysprof:BuildRequires: sysprof-devel >= 3.38} | |
9793fb5c | 37 | %{?with_systemtap:BuildRequires: systemtap-sdt-devel} |
2151c67b JB |
38 | Requires: glib2 >= 1:2.66.0 |
39 | Requires: gobject-introspection >= 1.66.0 | |
9f107e75 ER |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
41 | ||
42 | %description | |
5d0b4be1 JB |
43 | Cjs allows using Cinnamon libraries from JavaScript. It's based on the |
44 | SpiderMonkey JavaScript engine from Mozilla and the GObject | |
9f107e75 ER |
45 | introspection framework. |
46 | ||
5d0b4be1 JB |
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. | |
51 | ||
9f107e75 | 52 | %package devel |
9793fb5c JB |
53 | Summary: Development package for cjs |
54 | Summary(pl.UTF-8): Pakiet programistyczny cjs | |
9f107e75 ER |
55 | Group: Development/Libraries |
56 | Requires: %{name} = %{version}-%{release} | |
9793fb5c | 57 | Requires: cairo-gobject-devel |
2151c67b JB |
58 | Requires: glib2-devel >= 1:2.66.0 |
59 | Requires: gobject-introspection-devel >= 1.66.0 | |
9793fb5c | 60 | Requires: libffi-devel >= 3.0 |
2151c67b JB |
61 | Requires: mozjs102-devel >= 102 |
62 | %if %{without installed_tests} | |
63 | Obsoletes: cjs-tests < %{version}-%{release} | |
64 | %endif | |
9f107e75 ER |
65 | |
66 | %description devel | |
9793fb5c JB |
67 | Files for development with cjs. |
68 | ||
69 | %description devel -l pl.UTF-8 | |
70 | Pliki do tworzenia oprogramowania z użyciem cjs | |
9f107e75 ER |
71 | |
72 | %package tests | |
73 | Summary: Tests for the cjs package | |
9793fb5c | 74 | Summary(pl.UTF-8): Testy dla pakietu cjs |
9f107e75 | 75 | Group: Development/Libraries |
2151c67b | 76 | Requires(post,postun): glib2-devel >= 1:2.66.0 |
9f107e75 ER |
77 | Requires: %{name}-devel = %{version}-%{release} |
78 | ||
79 | %description tests | |
80 | The cjs-tests package contains tests that can be used to verify the | |
81 | functionality of the installed cjs package. | |
82 | ||
9793fb5c JB |
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. | |
86 | ||
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 | |
93 | ||
94 | %description -n systemtap-cjs | |
95 | systemtap/dtrace probes for cjs. | |
96 | ||
97 | %description -n systemtap-cjs -l pl.UTF-8 | |
98 | Sondy systemtap/dtrace dla cjs. | |
99 | ||
9f107e75 ER |
100 | %prep |
101 | %setup -q | |
9f107e75 | 102 | |
5d0b4be1 JB |
103 | %{__sed} -i -e 's/ library(/ shared_library(/' installed-tests/js/meson.build |
104 | ||
9f107e75 | 105 | %build |
5d0b4be1 JB |
106 | %meson build \ |
107 | %{?with_systemtap:-Ddtrace=true} \ | |
2151c67b | 108 | %{?with_installed_tests:-Dinstalled_tests=true} \ |
5d0b4be1 JB |
109 | %{!?with_sysprof:-Dprofiler=disabled} \ |
110 | %{?with_systemtap:-Dsystemtap=true} | |
111 | ||
112 | %ninja_build -C build | |
9f107e75 ER |
113 | |
114 | %if %{with tests} | |
5d0b4be1 | 115 | %ninja_test -C build |
9f107e75 ER |
116 | %endif |
117 | ||
118 | %install | |
119 | rm -rf $RPM_BUILD_ROOT | |
9793fb5c | 120 | |
5d0b4be1 | 121 | %ninja_install -C build |
9f107e75 | 122 | |
2151c67b JB |
123 | %if %{with systemtap} |
124 | # they forgot to rename again on GNOME merge | |
125 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/{gjs,cjs}.stp | |
126 | %endif | |
127 | ||
9793fb5c JB |
128 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
129 | cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
130 | ||
9f107e75 ER |
131 | %clean |
132 | rm -rf $RPM_BUILD_ROOT | |
133 | ||
134 | %post -p /sbin/ldconfig | |
135 | %postun -p /sbin/ldconfig | |
136 | ||
5d0b4be1 JB |
137 | %post tests |
138 | %glib_compile_schemas | |
139 | ||
140 | %postun tests | |
141 | %glib_compile_schemas | |
142 | ||
9f107e75 ER |
143 | %files |
144 | %defattr(644,root,root,755) | |
188d188f | 145 | %doc COPYING NEWS README.md debian/changelog |
9f107e75 ER |
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 | |
150 | %dir %{_libdir}/cjs | |
151 | %dir %{_libdir}/cjs/girepository-1.0 | |
152 | %{_libdir}/cjs/girepository-1.0/CjsPrivate-1.0.typelib | |
5d0b4be1 | 153 | %{_datadir}/cjs-1.0 |
9f107e75 ER |
154 | |
155 | %files devel | |
156 | %defattr(644,root,root,755) | |
9793fb5c | 157 | %attr(755,root,root) %{_libdir}/libcjs.so |
9f107e75 | 158 | %{_includedir}/cjs-1.0 |
9f107e75 | 159 | %{_pkgconfigdir}/cjs-1.0.pc |
9793fb5c | 160 | %{_examplesdir}/%{name}-%{version} |
9f107e75 | 161 | |
2151c67b | 162 | %if %{with installed_tests} |
9f107e75 ER |
163 | %files tests |
164 | %defattr(644,root,root,755) | |
5d0b4be1 JB |
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 | |
9793fb5c JB |
177 | %dir %{_datadir}/installed-tests |
178 | %{_datadir}/installed-tests/cjs | |
2151c67b | 179 | %endif |
9793fb5c JB |
180 | |
181 | %if %{with systemtap} | |
182 | %files -n systemtap-cjs | |
183 | %defattr(644,root,root,755) | |
184 | %{_datadir}/systemtap/tapset/cjs.stp | |
185 | %endif |