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