#
# Conditional build:
+%bcond_without sysprof # sysprof profiling
%bcond_without systemtap # systemtap/dtrace trace support
#
Summary: JavaScript bindings for GNOME
Summary(pl.UTF-8): Wiązania JavaScriptu dla GNOME
Name: gjs
-Version: 1.48.3
-Release: 1
+Version: 1.58.5
+Release: 2
License: MIT and (MPL v1.1 or GPL v2+ or LGPL v2+)
Group: Libraries
-Source0: http://ftp.gnome.org/pub/GNOME/sources/gjs/1.48/%{name}-%{version}.tar.xz
-# Source0-md5: 9287e4187492fc0ae9a6b7fe5c6de11c
-URL: http://live.gnome.org/Gjs
+Source0: http://ftp.gnome.org/pub/GNOME/sources/gjs/1.58/%{name}-%{version}.tar.xz
+# Source0-md5: 4e74456ccb16d4cc5004a441f6abbec1
+URL: https://wiki.gnome.org/Projects/Gjs
BuildRequires: autoconf >= 2.64
BuildRequires: automake >= 1:1.11.1
BuildRequires: cairo-devel
BuildRequires: cairo-gobject-devel
BuildRequires: gettext-tools
-BuildRequires: glib2-devel >= 1:2.50.0
+BuildRequires: glib2-devel >= 1:2.58.0
BuildRequires: gobject-introspection-devel >= 1.41.4
-BuildRequires: gtk+3-devel >= 3.20
BuildRequires: libffi-devel
-BuildRequires: libstdc++-devel >= 6:4.7
+BuildRequires: libstdc++-devel >= 6:5.0
BuildRequires: libtool >= 2:2.2.0
-BuildRequires: mozjs38-devel
+BuildRequires: mozjs60-devel >= 60
BuildRequires: pkgconfig
BuildRequires: readline-devel
+# pkgconfig(sysprof-capture-3)
+%{?with_sysprof:BuildRequires: sysprof-devel >= 3.34}
%{?with_systemtap:BuildRequires: systemtap-sdt-devel}
-Requires: glib2 >= 1:2.50.0
-Requires: gtk+3 >= 3.20
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
+Requires: glib2 >= 1:2.58.0
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Requires: %{name} = %{version}-%{release}
Requires: cairo-devel
Requires: cairo-gobject-devel
-Requires: glib2-devel >= 1:2.50.0
+Requires: glib2-devel >= 1:2.58.0
Requires: gobject-introspection-devel >= 1.41.4
-Requires: gtk+3-devel >= 3.20
Requires: libffi-devel
-Requires: mozjs38-devel
+Requires: mozjs60-devel >= 60
%description devel
Header files for gjs library.
%{__autoheader}
%{__automake}
%configure \
+ --enable-profiler%{!?with_sysprof:=no} \
--disable-silent-rules \
%{?with_systemtap:--enable-systemtap}
%{__make}
%{__make} -j1 install \
DESTDIR=$RPM_BUILD_ROOT
-cp examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+# obsoleted by pkg-config
%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
+# belongs to installed-tests
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas/org.gnome.GjsTest.gschema.xml
%clean
rm -rf $RPM_BUILD_ROOT
%dir %{_libdir}/gjs
%dir %{_libdir}/gjs/girepository-1.0
%{_libdir}/gjs/girepository-1.0/GjsPrivate-1.0.typelib
+%{_datadir}/gjs-1.0
%files devel
%defattr(644,root,root,755)