]> git.pld-linux.org Git - packages/cjs.git/blame - cjs.spec
- updated to 5.8.0; installed_tests disabled by default
[packages/cjs.git] / cjs.spec
CommitLineData
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
8Summary: Javascript Bindings for Cinnamon
9793fb5c 9Summary(pl.UTF-8): Wiązania JavaScriptu dla środowiska Cinnamon
9f107e75 10Name: cjs
2151c67b 11Version: 5.8.0
34cb1478 12Release: 1
9f107e75
ER
13Group: 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 18License: MIT and (MPL v1.1 or GPL v2+ or LGPL v2+)
2151c67b 19#Source0Download: https://github.com/linuxmint/cjs/tags
9f107e75 20Source0: https://github.com/linuxmint/cjs/archive/%{version}/%{name}-%{version}.tar.gz
2151c67b 21# Source0-md5: 991e1bbf2ebf7cca4e93cfce66c4a876
9793fb5c 22URL: https://github.com/linuxmint/Cinnamon
9f107e75 23BuildRequires: cairo-gobject-devel
2151c67b
JB
24BuildRequires: glib2-devel >= 1:2.66.0
25BuildRequires: gobject-introspection-devel >= 1.66.0
5d0b4be1 26BuildRequires: gtk4-devel >= 4.0
9793fb5c 27BuildRequires: libffi-devel >= 3.0
5d0b4be1 28BuildRequires: libstdc++-devel >= 6:7
2151c67b
JB
29BuildRequires: meson >= 0.54.0
30BuildRequires: mozjs102-devel >= 102
5d0b4be1 31BuildRequires: ninja >= 1.5
9793fb5c 32BuildRequires: pkgconfig >= 1:0.14.0
9f107e75 33BuildRequires: readline-devel
5d0b4be1
JB
34BuildRequires: rpmbuild(macros) >= 1.736
35BuildRequires: sed >= 4.0
36%{?with_sysprof:BuildRequires: sysprof-devel >= 3.38}
9793fb5c 37%{?with_systemtap:BuildRequires: systemtap-sdt-devel}
2151c67b
JB
38Requires: glib2 >= 1:2.66.0
39Requires: gobject-introspection >= 1.66.0
9f107e75
ER
40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42%description
5d0b4be1
JB
43Cjs allows using Cinnamon libraries from JavaScript. It's based on the
44SpiderMonkey JavaScript engine from Mozilla and the GObject
9f107e75
ER
45introspection framework.
46
5d0b4be1
JB
47%description -l pl.UTF-8
48Cjs pozwala na używanie bibliotek Cinnamona z poziomu JavaScriptu.
49Jest oparty na silniku JavaScriptu SpiderMonkey z projektu Mozilla
50oraz szkielecie GObject Introspection.
51
9f107e75 52%package devel
9793fb5c
JB
53Summary: Development package for cjs
54Summary(pl.UTF-8): Pakiet programistyczny cjs
9f107e75
ER
55Group: Development/Libraries
56Requires: %{name} = %{version}-%{release}
9793fb5c 57Requires: cairo-gobject-devel
2151c67b
JB
58Requires: glib2-devel >= 1:2.66.0
59Requires: gobject-introspection-devel >= 1.66.0
9793fb5c 60Requires: libffi-devel >= 3.0
2151c67b
JB
61Requires: mozjs102-devel >= 102
62%if %{without installed_tests}
63Obsoletes: cjs-tests < %{version}-%{release}
64%endif
9f107e75
ER
65
66%description devel
9793fb5c
JB
67Files for development with cjs.
68
69%description devel -l pl.UTF-8
70Pliki do tworzenia oprogramowania z użyciem cjs
9f107e75
ER
71
72%package tests
73Summary: Tests for the cjs package
9793fb5c 74Summary(pl.UTF-8): Testy dla pakietu cjs
9f107e75 75Group: Development/Libraries
2151c67b 76Requires(post,postun): glib2-devel >= 1:2.66.0
9f107e75
ER
77Requires: %{name}-devel = %{version}-%{release}
78
79%description tests
80The cjs-tests package contains tests that can be used to verify the
81functionality of the installed cjs package.
82
9793fb5c
JB
83%description tests -l pl.UTF-8
84Ten pakiet zawiera testy, których można użyć do sprawdzenia
85funkcjonalności zainstalowanego pakietu cjs.
86
87%package -n systemtap-cjs
88Summary: systemtap/dtrace probes for cjs
89Summary(pl.UTF-8): Sondy systemtap/dtrace dla cjs
90Group: Development/Tools
91Requires: %{name} = %{version}-%{release}
92Requires: systemtap-client
93
94%description -n systemtap-cjs
95systemtap/dtrace probes for cjs.
96
97%description -n systemtap-cjs -l pl.UTF-8
98Sondy 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
119rm -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
128install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
129cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
130
9f107e75
ER
131%clean
132rm -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
This page took 0.176623 seconds and 4 git commands to generate.