]>
Commit | Line | Data |
---|---|---|
9f107e75 ER |
1 | # |
2 | # Conditional build: | |
9793fb5c JB |
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) | |
9f107e75 ER |
5 | |
6 | Summary: Javascript Bindings for Cinnamon | |
9793fb5c | 7 | Summary(pl.UTF-8): Wiązania JavaScriptu dla środowiska Cinnamon |
9f107e75 | 8 | Name: cjs |
5d0b4be1 | 9 | Version: 4.8.2 |
131922ab | 10 | Release: 1 |
9f107e75 ER |
11 | Group: Libraries |
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) | |
9793fb5c JB |
16 | License: MIT and (MPL v1.1 or GPL v2+ or LGPL v2+) |
17 | #Source0Download: https://github.com/linuxmint/cjs/releases | |
9f107e75 | 18 | Source0: https://github.com/linuxmint/cjs/archive/%{version}/%{name}-%{version}.tar.gz |
5d0b4be1 | 19 | # Source0-md5: b9444c6e537ebb3838518a16054804ff |
9793fb5c | 20 | URL: https://github.com/linuxmint/Cinnamon |
9f107e75 | 21 | BuildRequires: cairo-gobject-devel |
5d0b4be1 JB |
22 | BuildRequires: glib2-devel >= 1:2.58.0 |
23 | BuildRequires: gobject-introspection-devel >= 1.58.3 | |
24 | BuildRequires: gtk4-devel >= 4.0 | |
9793fb5c | 25 | BuildRequires: libffi-devel >= 3.0 |
5d0b4be1 JB |
26 | BuildRequires: libstdc++-devel >= 6:7 |
27 | BuildRequires: meson >= 0.49.2 | |
28 | BuildRequires: mozjs78-devel >= 78 | |
29 | BuildRequires: ninja >= 1.5 | |
9793fb5c | 30 | BuildRequires: pkgconfig >= 1:0.14.0 |
9f107e75 | 31 | BuildRequires: readline-devel |
5d0b4be1 JB |
32 | BuildRequires: rpmbuild(macros) >= 1.736 |
33 | BuildRequires: sed >= 4.0 | |
34 | %{?with_sysprof:BuildRequires: sysprof-devel >= 3.38} | |
9793fb5c | 35 | %{?with_systemtap:BuildRequires: systemtap-sdt-devel} |
5d0b4be1 JB |
36 | Requires: glib2 >= 1:2.58.0 |
37 | Requires: gobject-introspection >= 1.58.3 | |
9f107e75 ER |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
40 | %description | |
5d0b4be1 JB |
41 | Cjs allows using Cinnamon libraries from JavaScript. It's based on the |
42 | SpiderMonkey JavaScript engine from Mozilla and the GObject | |
9f107e75 ER |
43 | introspection framework. |
44 | ||
5d0b4be1 JB |
45 | %description -l pl.UTF-8 |
46 | Cjs pozwala na używanie bibliotek Cinnamona z poziomu JavaScriptu. | |
47 | Jest oparty na silniku JavaScriptu SpiderMonkey z projektu Mozilla | |
48 | oraz szkielecie GObject Introspection. | |
49 | ||
9f107e75 | 50 | %package devel |
9793fb5c JB |
51 | Summary: Development package for cjs |
52 | Summary(pl.UTF-8): Pakiet programistyczny cjs | |
9f107e75 ER |
53 | Group: Development/Libraries |
54 | Requires: %{name} = %{version}-%{release} | |
9793fb5c | 55 | Requires: cairo-gobject-devel |
5d0b4be1 JB |
56 | Requires: glib2-devel >= 1:2.58.0 |
57 | Requires: gobject-introspection-devel >= 1.58.3 | |
9793fb5c | 58 | Requires: libffi-devel >= 3.0 |
5d0b4be1 | 59 | Requires: mozjs78-devel >= 78 |
9f107e75 ER |
60 | |
61 | %description devel | |
9793fb5c JB |
62 | Files for development with cjs. |
63 | ||
64 | %description devel -l pl.UTF-8 | |
65 | Pliki do tworzenia oprogramowania z użyciem cjs | |
9f107e75 ER |
66 | |
67 | %package tests | |
68 | Summary: Tests for the cjs package | |
9793fb5c | 69 | Summary(pl.UTF-8): Testy dla pakietu cjs |
9f107e75 | 70 | Group: Development/Libraries |
5d0b4be1 | 71 | Requires(post,postun): glib2-devel >= 1:2.58.0 |
9f107e75 ER |
72 | Requires: %{name}-devel = %{version}-%{release} |
73 | ||
74 | %description tests | |
75 | The cjs-tests package contains tests that can be used to verify the | |
76 | functionality of the installed cjs package. | |
77 | ||
9793fb5c JB |
78 | %description tests -l pl.UTF-8 |
79 | Ten pakiet zawiera testy, których można użyć do sprawdzenia | |
80 | funkcjonalności zainstalowanego pakietu cjs. | |
81 | ||
82 | %package -n systemtap-cjs | |
83 | Summary: systemtap/dtrace probes for cjs | |
84 | Summary(pl.UTF-8): Sondy systemtap/dtrace dla cjs | |
85 | Group: Development/Tools | |
86 | Requires: %{name} = %{version}-%{release} | |
87 | Requires: systemtap-client | |
88 | ||
89 | %description -n systemtap-cjs | |
90 | systemtap/dtrace probes for cjs. | |
91 | ||
92 | %description -n systemtap-cjs -l pl.UTF-8 | |
93 | Sondy systemtap/dtrace dla cjs. | |
94 | ||
9f107e75 ER |
95 | %prep |
96 | %setup -q | |
9f107e75 | 97 | |
5d0b4be1 JB |
98 | %{__sed} -i -e 's/ library(/ shared_library(/' installed-tests/js/meson.build |
99 | ||
9f107e75 | 100 | %build |
5d0b4be1 JB |
101 | %meson build \ |
102 | %{?with_systemtap:-Ddtrace=true} \ | |
103 | %{!?with_sysprof:-Dprofiler=disabled} \ | |
104 | %{?with_systemtap:-Dsystemtap=true} | |
105 | ||
106 | %ninja_build -C build | |
9f107e75 ER |
107 | |
108 | %if %{with tests} | |
5d0b4be1 | 109 | %ninja_test -C build |
9f107e75 ER |
110 | %endif |
111 | ||
112 | %install | |
113 | rm -rf $RPM_BUILD_ROOT | |
9793fb5c | 114 | |
5d0b4be1 | 115 | %ninja_install -C build |
9f107e75 | 116 | |
9793fb5c JB |
117 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
118 | cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
119 | ||
9f107e75 ER |
120 | %clean |
121 | rm -rf $RPM_BUILD_ROOT | |
122 | ||
123 | %post -p /sbin/ldconfig | |
124 | %postun -p /sbin/ldconfig | |
125 | ||
5d0b4be1 JB |
126 | %post tests |
127 | %glib_compile_schemas | |
128 | ||
129 | %postun tests | |
130 | %glib_compile_schemas | |
131 | ||
9f107e75 ER |
132 | %files |
133 | %defattr(644,root,root,755) | |
188d188f | 134 | %doc COPYING NEWS README.md debian/changelog |
9f107e75 ER |
135 | %attr(755,root,root) %{_bindir}/cjs |
136 | %attr(755,root,root) %{_bindir}/cjs-console | |
137 | %attr(755,root,root) %{_libdir}/libcjs.so.*.*.* | |
138 | %ghost %{_libdir}/libcjs.so.0 | |
139 | %dir %{_libdir}/cjs | |
140 | %dir %{_libdir}/cjs/girepository-1.0 | |
141 | %{_libdir}/cjs/girepository-1.0/CjsPrivate-1.0.typelib | |
5d0b4be1 | 142 | %{_datadir}/cjs-1.0 |
9f107e75 ER |
143 | |
144 | %files devel | |
145 | %defattr(644,root,root,755) | |
9793fb5c | 146 | %attr(755,root,root) %{_libdir}/libcjs.so |
9f107e75 | 147 | %{_includedir}/cjs-1.0 |
9f107e75 | 148 | %{_pkgconfigdir}/cjs-1.0.pc |
9793fb5c | 149 | %{_examplesdir}/%{name}-%{version} |
9f107e75 ER |
150 | |
151 | %files tests | |
152 | %defattr(644,root,root,755) | |
5d0b4be1 JB |
153 | # TODO: move system-side installed-tests dirs somewhere (filesystem?) |
154 | %dir %{_libexecdir}/installed-tests | |
155 | %dir %{_libexecdir}/installed-tests/cjs | |
156 | %attr(755,root,root) %{_libexecdir}/installed-tests/cjs/debugger-test.sh | |
157 | %attr(755,root,root) %{_libexecdir}/installed-tests/cjs/minijasmine | |
158 | %attr(755,root,root) %{_libexecdir}/installed-tests/cjs/lib*.so | |
159 | %{_libexecdir}/installed-tests/cjs/*.typelib | |
160 | %{_libexecdir}/installed-tests/cjs/debugger | |
161 | %{_libexecdir}/installed-tests/cjs/js | |
162 | %dir %{_libexecdir}/installed-tests/cjs/scripts | |
163 | %attr(755,root,root) %{_libexecdir}/installed-tests/cjs/scripts/test*.sh | |
164 | %{_datadir}/glib-2.0/schemas/org.cinnamon.CjsTest.gschema.xml | |
9793fb5c JB |
165 | %dir %{_datadir}/installed-tests |
166 | %{_datadir}/installed-tests/cjs | |
167 | ||
168 | %if %{with systemtap} | |
169 | %files -n systemtap-cjs | |
170 | %defattr(644,root,root,755) | |
171 | %{_datadir}/systemtap/tapset/cjs.stp | |
172 | %endif |