]>
Commit | Line | Data |
---|---|---|
9f107e75 ER |
1 | # |
2 | # Conditional build: | |
f38c6e9e | 3 | %bcond_without sysprof # sysprof profiling support |
9793fb5c JB |
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) | |
9f107e75 ER |
6 | |
7 | Summary: Javascript Bindings for Cinnamon | |
9793fb5c | 8 | Summary(pl.UTF-8): Wiązania JavaScriptu dla środowiska Cinnamon |
9f107e75 | 9 | Name: cjs |
5d0b4be1 | 10 | Version: 4.8.2 |
412e28ef | 11 | Release: 2 |
9f107e75 ER |
12 | Group: Libraries |
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) | |
9793fb5c JB |
17 | License: MIT and (MPL v1.1 or GPL v2+ or LGPL v2+) |
18 | #Source0Download: https://github.com/linuxmint/cjs/releases | |
9f107e75 | 19 | Source0: https://github.com/linuxmint/cjs/archive/%{version}/%{name}-%{version}.tar.gz |
5d0b4be1 | 20 | # Source0-md5: b9444c6e537ebb3838518a16054804ff |
9793fb5c | 21 | URL: https://github.com/linuxmint/Cinnamon |
9f107e75 | 22 | BuildRequires: cairo-gobject-devel |
5d0b4be1 JB |
23 | BuildRequires: glib2-devel >= 1:2.58.0 |
24 | BuildRequires: gobject-introspection-devel >= 1.58.3 | |
25 | BuildRequires: gtk4-devel >= 4.0 | |
9793fb5c | 26 | BuildRequires: libffi-devel >= 3.0 |
5d0b4be1 JB |
27 | BuildRequires: libstdc++-devel >= 6:7 |
28 | BuildRequires: meson >= 0.49.2 | |
29 | BuildRequires: mozjs78-devel >= 78 | |
30 | BuildRequires: ninja >= 1.5 | |
9793fb5c | 31 | BuildRequires: pkgconfig >= 1:0.14.0 |
9f107e75 | 32 | BuildRequires: readline-devel |
5d0b4be1 JB |
33 | BuildRequires: rpmbuild(macros) >= 1.736 |
34 | BuildRequires: sed >= 4.0 | |
35 | %{?with_sysprof:BuildRequires: sysprof-devel >= 3.38} | |
9793fb5c | 36 | %{?with_systemtap:BuildRequires: systemtap-sdt-devel} |
5d0b4be1 JB |
37 | Requires: glib2 >= 1:2.58.0 |
38 | Requires: gobject-introspection >= 1.58.3 | |
9f107e75 ER |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
41 | %description | |
5d0b4be1 JB |
42 | Cjs allows using Cinnamon libraries from JavaScript. It's based on the |
43 | SpiderMonkey JavaScript engine from Mozilla and the GObject | |
9f107e75 ER |
44 | introspection framework. |
45 | ||
5d0b4be1 JB |
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. | |
50 | ||
9f107e75 | 51 | %package devel |
9793fb5c JB |
52 | Summary: Development package for cjs |
53 | Summary(pl.UTF-8): Pakiet programistyczny cjs | |
9f107e75 ER |
54 | Group: Development/Libraries |
55 | Requires: %{name} = %{version}-%{release} | |
9793fb5c | 56 | Requires: cairo-gobject-devel |
5d0b4be1 JB |
57 | Requires: glib2-devel >= 1:2.58.0 |
58 | Requires: gobject-introspection-devel >= 1.58.3 | |
9793fb5c | 59 | Requires: libffi-devel >= 3.0 |
5d0b4be1 | 60 | Requires: mozjs78-devel >= 78 |
9f107e75 ER |
61 | |
62 | %description devel | |
9793fb5c JB |
63 | Files for development with cjs. |
64 | ||
65 | %description devel -l pl.UTF-8 | |
66 | Pliki do tworzenia oprogramowania z użyciem cjs | |
9f107e75 ER |
67 | |
68 | %package tests | |
69 | Summary: Tests for the cjs package | |
9793fb5c | 70 | Summary(pl.UTF-8): Testy dla pakietu cjs |
9f107e75 | 71 | Group: Development/Libraries |
5d0b4be1 | 72 | Requires(post,postun): glib2-devel >= 1:2.58.0 |
9f107e75 ER |
73 | Requires: %{name}-devel = %{version}-%{release} |
74 | ||
75 | %description tests | |
76 | The cjs-tests package contains tests that can be used to verify the | |
77 | functionality of the installed cjs package. | |
78 | ||
9793fb5c JB |
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. | |
82 | ||
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 | |
89 | ||
90 | %description -n systemtap-cjs | |
91 | systemtap/dtrace probes for cjs. | |
92 | ||
93 | %description -n systemtap-cjs -l pl.UTF-8 | |
94 | Sondy systemtap/dtrace dla cjs. | |
95 | ||
9f107e75 ER |
96 | %prep |
97 | %setup -q | |
9f107e75 | 98 | |
5d0b4be1 JB |
99 | %{__sed} -i -e 's/ library(/ shared_library(/' installed-tests/js/meson.build |
100 | ||
9f107e75 | 101 | %build |
5d0b4be1 JB |
102 | %meson build \ |
103 | %{?with_systemtap:-Ddtrace=true} \ | |
104 | %{!?with_sysprof:-Dprofiler=disabled} \ | |
105 | %{?with_systemtap:-Dsystemtap=true} | |
106 | ||
107 | %ninja_build -C build | |
9f107e75 ER |
108 | |
109 | %if %{with tests} | |
5d0b4be1 | 110 | %ninja_test -C build |
9f107e75 ER |
111 | %endif |
112 | ||
113 | %install | |
114 | rm -rf $RPM_BUILD_ROOT | |
9793fb5c | 115 | |
5d0b4be1 | 116 | %ninja_install -C build |
9f107e75 | 117 | |
9793fb5c JB |
118 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
119 | cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
120 | ||
9f107e75 ER |
121 | %clean |
122 | rm -rf $RPM_BUILD_ROOT | |
123 | ||
124 | %post -p /sbin/ldconfig | |
125 | %postun -p /sbin/ldconfig | |
126 | ||
5d0b4be1 JB |
127 | %post tests |
128 | %glib_compile_schemas | |
129 | ||
130 | %postun tests | |
131 | %glib_compile_schemas | |
132 | ||
9f107e75 ER |
133 | %files |
134 | %defattr(644,root,root,755) | |
188d188f | 135 | %doc COPYING NEWS README.md debian/changelog |
9f107e75 ER |
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 | |
140 | %dir %{_libdir}/cjs | |
141 | %dir %{_libdir}/cjs/girepository-1.0 | |
142 | %{_libdir}/cjs/girepository-1.0/CjsPrivate-1.0.typelib | |
5d0b4be1 | 143 | %{_datadir}/cjs-1.0 |
9f107e75 ER |
144 | |
145 | %files devel | |
146 | %defattr(644,root,root,755) | |
9793fb5c | 147 | %attr(755,root,root) %{_libdir}/libcjs.so |
9f107e75 | 148 | %{_includedir}/cjs-1.0 |
9f107e75 | 149 | %{_pkgconfigdir}/cjs-1.0.pc |
9793fb5c | 150 | %{_examplesdir}/%{name}-%{version} |
9f107e75 ER |
151 | |
152 | %files tests | |
153 | %defattr(644,root,root,755) | |
5d0b4be1 JB |
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 | |
9793fb5c JB |
166 | %dir %{_datadir}/installed-tests |
167 | %{_datadir}/installed-tests/cjs | |
168 | ||
169 | %if %{with systemtap} | |
170 | %files -n systemtap-cjs | |
171 | %defattr(644,root,root,755) | |
172 | %{_datadir}/systemtap/tapset/cjs.stp | |
173 | %endif |