gjs/gjs.spec

129 lines
3.8 KiB
RPMSpec

#
# spec file for package gjs
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# Set to 1 to build with xulrunner, else we build with js
%define build_with_xulrunner 0
%define xulrunner_ver 20
Name: gjs
Version: 1.30.0
Release: 1
# FIXME: find out if tapsets should really be in devel package or in main package
License: MIT License (or similar)
Summary: JavaScript bindings based on gobject-introspection and Mozilla
Group: Development/Libraries/GNOME
Url: http://live.gnome.org/Gjs
Source: http://download.gnome.org/sources/gjs/1.30/%{name}-%{version}.tar.bz2
BuildRequires: gcc-c++
%if %{build_with_xulrunner}
BuildRequires: mozilla-xulrunner%{xulrunner_ver}-devel
%endif
BuildRequires: python
BuildRequires: readline-devel
BuildRequires: systemtap-sdt-devel
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.29.16
%if ! %{build_with_xulrunner}
BuildRequires: pkgconfig(mozjs185)
%endif
Requires: libgjs0 = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This module contains JavaScript bindings based on gobject-introspection and the
Mozilla SpiderMonkey JavaScript engine.
%package -n libgjs0
License: MIT License (or similar)
Summary: JavaScript bindings based on gobject-introspection and Mozilla
Group: Development/Libraries/GNOME
%if %{build_with_xulrunner}
# Explicitly requires the xulrunner version we need, instead of hoping we'll
# get the right one with the libmozjs.so Requires.
Requires: mozilla-xulrunner%{xulrunner_ver}
%endif
Provides: libgjs-0 = %{version}
Obsoletes: libgjs-0 < %{version}
%description -n libgjs0
This module contains JavaScript bindings based on gobject-introspection and the
Mozilla SpiderMonkey JavaScript engine.
%package -n libgjs-devel
License: MIT License (or similar)
Summary: JavaScript bindings based on gobject-introspection and Mozilla
Group: Development/Libraries/GNOME
Requires: libgjs0 = %{version}
%if %{build_with_xulrunner}
Requires: mozilla-xulrunner%{xulrunner_ver}-devel
%endif
# Just a helper provides
Provides: gjs-devel = %{version}
%description -n libgjs-devel
This module contains JavaScript bindings based on gobject-introspection and the
Mozilla SpiderMonkey JavaScript engine.
%prep
%setup -q
%build
%configure \
--disable-static \
--enable-systemtap
make %{?_smp_mflags} V=1
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
# fix installation of systemtap files
mv %{buildroot}%{buildroot}%{_datadir}/systemtap %{buildroot}%{_datadir}/systemtap
%clean
rm -rf %{buildroot}
%post -n libgjs0 -p /sbin/ldconfig
%postun -n libgjs0 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_bindir}/gjs
%{_bindir}/gjs-console
%files -n libgjs0
%defattr(-,root,root)
%doc COPYING NEWS README
%{_datadir}/gjs-1.0/
%{_libdir}/*.so.*
%dir %{_libdir}/gjs
%{_libdir}/gjs/GjsDBus-1.0.typelib
%{_libdir}/gjs-1.0/
%files -n libgjs-devel
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/gjs/GjsDBus-1.0.gir
%{_libdir}/pkgconfig/*.pc
%{_datadir}/systemtap/tapset/*.stp
%changelog