]> git.pld-linux.org Git - packages/cjs.git/blobdiff - cjs.spec
- added missing sysprof bcond
[packages/cjs.git] / cjs.spec
index e9a6a494a0e97619733099a63e1d7993d371a846..25130a7c3e959edb0ff4faddd4fdb9c21f0359f8 100644 (file)
--- a/cjs.spec
+++ b/cjs.spec
 #
 # Conditional build:
-%bcond_without tests           # build without tests
+%bcond_without sysprof         # sysprof profiling support
+%bcond_without systemtap       # systemtap/dtrace trace support
+%bcond_with    tests           # JS tests (upstream failed to update them, e.g. tests for version < 4.0.0; some require $DISPLAY)
 
 Summary:       Javascript Bindings for Cinnamon
+Summary(pl.UTF-8):     Wiązania JavaScriptu dla środowiska Cinnamon
 Name:          cjs
-Version:       2.4.1
+Version:       4.8.2
 Release:       1
 Group:         Libraries
 # The following files contain code from Mozilla which
 # is triple licensed under MPL1.1/LGPLv2+/GPLv2+:
 # The console module (modules/console.c)
 # Stack printer (gjs/stack.c)
-License:       MIT and (MPLv1.1 or GPLv2+ or LGPLv2+)
+License:       MIT and (MPL v1.1 or GPL v2+ or LGPL v2+)
+#Source0Download: https://github.com/linuxmint/cjs/releases
 Source0:       https://github.com/linuxmint/cjs/archive/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 846940e9cf97b15a5b3940cf5c7b2591
-URL:           http://cinnamon.linuxmint.com/
+# Source0-md5: b9444c6e537ebb3838518a16054804ff
+URL:           https://github.com/linuxmint/Cinnamon
 BuildRequires: cairo-gobject-devel
-BuildRequires: dbus-glib-devel
-BuildRequires: gobject-introspection-devel >= 1.38.0
-BuildRequires: gtk+3-devel
-BuildRequires: intltool
-BuildRequires: mozjs24-devel
+BuildRequires: glib2-devel >= 1:2.58.0
+BuildRequires: gobject-introspection-devel >= 1.58.3
+BuildRequires: gtk4-devel >= 4.0
+BuildRequires: libffi-devel >= 3.0
+BuildRequires: libstdc++-devel >= 6:7
+BuildRequires: meson >= 0.49.2
+BuildRequires: mozjs78-devel >= 78
+BuildRequires: ninja >= 1.5
+BuildRequires: pkgconfig >= 1:0.14.0
 BuildRequires: readline-devel
+BuildRequires: rpmbuild(macros) >= 1.736
 BuildRequires: sed >= 4.0
-# Require for checks
-BuildRequires: dbus-x11
-# Bootstrap requirements
-BuildRequires: gnome-common
-BuildRequires: gtk-doc
+%{?with_sysprof:BuildRequires: sysprof-devel >= 3.38}
+%{?with_systemtap:BuildRequires:       systemtap-sdt-devel}
+Requires:      glib2 >= 1:2.58.0
+Requires:      gobject-introspection >= 1.58.3
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-Cjs allows using Cinnamon libraries from Javascript. It's based on the
-Spidermonkey Javascript engine from Mozilla and the GObject
+Cjs allows using Cinnamon libraries from JavaScript. It's based on the
+SpiderMonkey JavaScript engine from Mozilla and the GObject
 introspection framework.
 
+%description -l pl.UTF-8
+Cjs pozwala na używanie bibliotek Cinnamona z poziomu JavaScriptu.
+Jest oparty na silniku JavaScriptu SpiderMonkey z projektu Mozilla
+oraz szkielecie GObject Introspection.
+
 %package devel
-Summary:       Development package for %{name}
+Summary:       Development package for cjs
+Summary(pl.UTF-8):     Pakiet programistyczny cjs
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
+Requires:      cairo-gobject-devel
+Requires:      glib2-devel >= 1:2.58.0
+Requires:      gobject-introspection-devel >= 1.58.3
+Requires:      libffi-devel >= 3.0
+Requires:      mozjs78-devel >= 78
 
 %description devel
-Files for development with %{name}.
+Files for development with cjs.
+
+%description devel -l pl.UTF-8
+Pliki do tworzenia oprogramowania z użyciem cjs
 
 %package tests
 Summary:       Tests for the cjs package
+Summary(pl.UTF-8):     Testy dla pakietu cjs
 Group:         Development/Libraries
+Requires(post,postun): glib2-devel >= 1:2.58.0
 Requires:      %{name}-devel = %{version}-%{release}
 
 %description tests
 The cjs-tests package contains tests that can be used to verify the
 functionality of the installed cjs package.
 
+%description tests -l pl.UTF-8
+Ten pakiet zawiera testy, których można użyć do sprawdzenia
+funkcjonalności zainstalowanego pakietu cjs.
+
+%package -n systemtap-cjs
+Summary:       systemtap/dtrace probes for cjs
+Summary(pl.UTF-8):     Sondy systemtap/dtrace dla cjs
+Group:         Development/Tools
+Requires:      %{name} = %{version}-%{release}
+Requires:      systemtap-client
+
+%description -n systemtap-cjs
+systemtap/dtrace probes for cjs.
+
+%description -n systemtap-cjs -l pl.UTF-8
+Sondy systemtap/dtrace dla cjs.
+
 %prep
 %setup -q
-sed -i -e 's@{ACLOCAL_FLAGS}@{ACLOCAL_FLAGS} -I m4@g' Makefile.am
-echo "AC_CONFIG_MACRO_DIR([m4])" >> configure.ac
+
+%{__sed} -i -e 's/ library(/ shared_library(/' installed-tests/js/meson.build
 
 %build
-NOCONFIGURE=1 ./autogen.sh
-%configure \
-       --disable-silent-rules \
-       --disable-static \
-       --enable-installed-tests \
+%meson build \
+       %{?with_systemtap:-Ddtrace=true} \
+       %{!?with_sysprof:-Dprofiler=disabled} \
+       %{?with_systemtap:-Dsystemtap=true}
 
-%{__make}
+%ninja_build -C build
 
 %if %{with tests}
-%{__make} check
+%ninja_test -C build
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__make} install \
-       DESTDIR=$RPM_BUILD_ROOT
 
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/libcjs.la
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/cjs/lib*.la
+%ninja_install -C build
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -84,9 +124,15 @@ rm -rf $RPM_BUILD_ROOT
 %post  -p /sbin/ldconfig
 %postun        -p /sbin/ldconfig
 
+%post tests
+%glib_compile_schemas
+
+%postun tests
+%glib_compile_schemas
+
 %files
 %defattr(644,root,root,755)
-%doc COPYING COPYING.LGPL NEWS README
+%doc COPYING NEWS README.md debian/changelog
 %attr(755,root,root) %{_bindir}/cjs
 %attr(755,root,root) %{_bindir}/cjs-console
 %attr(755,root,root) %{_libdir}/libcjs.so.*.*.*
@@ -94,19 +140,34 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{_libdir}/cjs
 %dir %{_libdir}/cjs/girepository-1.0
 %{_libdir}/cjs/girepository-1.0/CjsPrivate-1.0.typelib
+%{_datadir}/cjs-1.0
 
 %files devel
 %defattr(644,root,root,755)
-%doc examples/*
+%attr(755,root,root) %{_libdir}/libcjs.so
 %{_includedir}/cjs-1.0
-%{_libdir}/libcjs.so
 %{_pkgconfigdir}/cjs-1.0.pc
-%{_pkgconfigdir}/cjs-internals-1.0.pc
-%attr(755,root,root) %{_libdir}/cjs/libgimarshallingtests.so
-%attr(755,root,root) %{_libdir}/cjs/libregress.so
-%attr(755,root,root) %{_libdir}/cjs/libwarnlib.so
+%{_examplesdir}/%{name}-%{version}
 
 %files tests
 %defattr(644,root,root,755)
-%{_libdir}/cjs/installed-tests
-%{_datadir}/installed-tests
+# TODO: move system-side installed-tests dirs somewhere (filesystem?)
+%dir %{_libexecdir}/installed-tests
+%dir %{_libexecdir}/installed-tests/cjs
+%attr(755,root,root) %{_libexecdir}/installed-tests/cjs/debugger-test.sh
+%attr(755,root,root) %{_libexecdir}/installed-tests/cjs/minijasmine
+%attr(755,root,root) %{_libexecdir}/installed-tests/cjs/lib*.so
+%{_libexecdir}/installed-tests/cjs/*.typelib
+%{_libexecdir}/installed-tests/cjs/debugger
+%{_libexecdir}/installed-tests/cjs/js
+%dir %{_libexecdir}/installed-tests/cjs/scripts
+%attr(755,root,root) %{_libexecdir}/installed-tests/cjs/scripts/test*.sh
+%{_datadir}/glib-2.0/schemas/org.cinnamon.CjsTest.gschema.xml
+%dir %{_datadir}/installed-tests
+%{_datadir}/installed-tests/cjs
+
+%if %{with systemtap}
+%files -n systemtap-cjs
+%defattr(644,root,root,755)
+%{_datadir}/systemtap/tapset/cjs.stp
+%endif
This page took 0.050736 seconds and 4 git commands to generate.