File cjs.spec of Package cjs

#
# spec file for package cjs
#
# Copyright (c) 2016 SUSE LINUX 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/
#


%define soname  libcjs
%define sover   0
%define typelib typelib-1_0-CjsPrivate-1_0
Name:           cjs
Version:        3.0.1
Release:        1.4
Summary:        JavaScript module used by Cinnamon
License:        MIT and (MPL-1.1 or GPL-2.0+ or LGPL-2.1+)
Group:          System/GUI/Other
Url:            https://github.com/linuxmint/cjs
Source:         https://github.com/linuxmint/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:        baselibs.conf
BuildRequires:  gcc-c++
BuildRequires:  gnome-common
BuildRequires:  mozjs24-devel
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(gobject-introspection-1.0)

%description
JavaScript bindings based on GObject Introspection for the
Cinnamon Desktop.

%package -n %{soname}%{sover}
Summary:        Shared Libraries for Cinnamon JS module
Group:          System/Libraries

%description -n %{soname}%{sover}
JavaScript bindings based on GObject Introspection for the
Cinnamon Desktop.

This package provides libraries for cjs.

%package -n %{typelib}
Summary:        Cinnamon JS module -- Introspection Bindings
Group:          System/Libraries

%description -n %{typelib}
JavaScript bindings based on GObject Introspection for the
Cinnamon Desktop.

This package provides the GObject Introspection bindings for
Cinnamon JS.

%package devel
Summary:        Development Files for Cinnamon JS module
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}
Requires:       %{soname}%{sover} = %{version}
Requires:       %{typelib} = %{version}

%description devel
JavaScript bindings based on GObject Introspection for the
Cinnamon Desktop.

This package contains development files for cjs.

%prep
%setup -q

%build
NOCONFIGURE=1 gnome-autogen.sh
%configure
make %{?_smp_mflags}

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print

%post -n %{soname}%{sover} -p /sbin/ldconfig

%postun -n %{soname}%{sover} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc COPYING* README debian/changelog
%{_bindir}/%{name}*

%files -n %{soname}%{sover}
%defattr(-,root,root)
%{_libdir}/libcjs.so.%{sover}*

%files -n %{typelib}
%defattr(-,root,root)
%dir %{_libdir}/cjs/
%dir %{_libdir}/cjs/girepository-1.0/
%{_libdir}/cjs/girepository-1.0/CjsPrivate-1.0.typelib

%files devel
%defattr(-,root,root)
%{_includedir}/%{name}-1.0/
%{_libdir}/%{soname}.so
%{_libdir}/pkgconfig/%{name}*.pc

%changelog
* Thu May 12 2016 sor.alexei@meowr.ru
- Update to version 3.0.1:
  * repo.cpp: Add Gvc->Cvc mapping for backward compatibility of
    sound xlets.
* Sat Apr 23 2016 sor.alexei@meowr.ru
- Update to version 3.0.0.
* Sun Oct 18 2015 sor.alexei@meowr.ru
- Update to 2.8.0:
  * importer.cpp: Add a method to the global imports object
    addSubImporter(name, path).
- Remove cjs from baselibs.conf.
* Mon Aug 10 2015 i@marguerite.su
- update version 2.6.2
  * signals.js: add signalHandlerIsConnected method
- add baselibs.conf
* Tue Jun  2 2015 stefan@fam-elser.de
- update to version 2.6.0
* Thu Apr 23 2015 stefan@fam-elser.de
- update to version 2.4.2
* Wed Nov  5 2014 i@marguerite.su
- update version 2.4.0
  * js version update to mozjs24
- add patch: cjf-2.4.0-lower_versions.patch
  * lower version requirements for gobject-introspection
    and gobject-2.0
* Mon Jul 14 2014 i@marguerite.su
- update version 2.3.0
  * prevent start-on-demand dbus service from working
* Thu Apr 17 2014 i@marguerite.su
- update version 2.2.0
* Mon Oct 21 2013 i@marguerite.su
- copypac from home:cyberorg:cinnamon
- clean work
- spli libcjs0 and typelib-1_0-CjsPrivate-1_0 sub-packages
* Fri Oct  4 2013 stefan@fam-elser.de
- Updated to version 2.0.0
* Mon Sep 30 2013 stefan@fam-elser.de
- Initial Release with git version from 2013/09/30