]> git.pld-linux.org Git - packages/cjs.git/blob - cjs.spec
- updated to 5.8.0; installed_tests disabled by default
[packages/cjs.git] / cjs.spec
1 #
2 # Conditional build:
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)
7
8 Summary:        Javascript Bindings for Cinnamon
9 Summary(pl.UTF-8):      Wiązania JavaScriptu dla środowiska Cinnamon
10 Name:           cjs
11 Version:        5.8.0
12 Release:        1
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)
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)
41
42 %description
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.
46
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
52 %package devel
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}
64 %endif
65
66 %description devel
67 Files for development with cjs.
68
69 %description devel -l pl.UTF-8
70 Pliki do tworzenia oprogramowania z użyciem cjs
71
72 %package tests
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}
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
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
100 %prep
101 %setup -q
102
103 %{__sed} -i -e 's/ library(/ shared_library(/' installed-tests/js/meson.build
104
105 %build
106 %meson build \
107         %{?with_systemtap:-Ddtrace=true} \
108         %{?with_installed_tests:-Dinstalled_tests=true} \
109         %{!?with_sysprof:-Dprofiler=disabled} \
110         %{?with_systemtap:-Dsystemtap=true}
111
112 %ninja_build -C build
113
114 %if %{with tests}
115 %ninja_test -C build
116 %endif
117
118 %install
119 rm -rf $RPM_BUILD_ROOT
120
121 %ninja_install -C build
122
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
128 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
129 cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
130
131 %clean
132 rm -rf $RPM_BUILD_ROOT
133
134 %post   -p /sbin/ldconfig
135 %postun -p /sbin/ldconfig
136
137 %post tests
138 %glib_compile_schemas
139
140 %postun tests
141 %glib_compile_schemas
142
143 %files
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
150 %dir %{_libdir}/cjs
151 %dir %{_libdir}/cjs/girepository-1.0
152 %{_libdir}/cjs/girepository-1.0/CjsPrivate-1.0.typelib
153 %{_datadir}/cjs-1.0
154
155 %files devel
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}
161
162 %if %{with installed_tests}
163 %files 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
179 %endif
180
181 %if %{with systemtap}
182 %files -n systemtap-cjs
183 %defattr(644,root,root,755)
184 %{_datadir}/systemtap/tapset/cjs.stp
185 %endif
This page took 0.117292 seconds and 4 git commands to generate.