File glade.spec of Package glade

#
# spec file for package glade
#
# 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/
#


Name:           glade
Version:        3.20.0
Release:        0
Summary:        User Interface Builder for GTK+ 3
License:        GPL-2.0+
Group:          Development/Tools/GUI Builders
Url:            http://glade.gnome.org/
Source:         http://download.gnome.org/sources/glade/3.20/%{name}-%{version}.tar.xz
BuildRequires:  docbook-xsl-stylesheets
BuildRequires:  fdupes
BuildRequires:  gobject-introspection-devel
BuildRequires:  intltool
BuildRequires:  python-devel
BuildRequires:  update-desktop-files
BuildRequires:  yelp-tools
BuildRequires:  pkgconfig(gmodule-2.0)
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.20.0
BuildRequires:  pkgconfig(libxml-2.0) >= 2.4.0
BuildRequires:  pkgconfig(pygobject-3.0) >= 3.8.0
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Glade is a RAD tool to enable quick & easy development of user
interfaces for the Gtk+ 3 toolkit and the GNOME desktop environment.

%package -n libgladeui-2-6
Summary:        User Interface Builder for GTK+ 3
Group:          System/Libraries
Recommends:     %{name}-lang

%description -n libgladeui-2-6
Glade is a RAD tool to enable quick & easy development of user
interfaces for the Gtk+ 3 toolkit and the GNOME desktop environment.

%package -n typelib-1_0-Gladeui-2_0
Summary:        User Interface Builder for GTK+ 3 -- Introspection bindings
Group:          System/Libraries

%description -n typelib-1_0-Gladeui-2_0
Glade is a RAD tool to enable quick & easy development of user
interfaces for the Gtk+ 3 toolkit and the GNOME desktop environment.

This package provides the GObject Introspection bindings for the
libgladeui library.

%package -n libgladeui-2-devel
Summary:        User Interface Builder for GTK+ 3 -- Development Files
Group:          Development/Libraries/C and C++
Requires:       libgladeui-2-6 = %{version}
Requires:       typelib-1_0-Gladeui-2_0 = %{version}
# The gtk-doc documentation is not parallel installable (bnc#646997)
Conflicts:      libgladeui-1-devel

%description -n libgladeui-2-devel
Glade is a RAD tool to enable quick & easy development of user
interfaces for the Gtk+ 3 toolkit and the GNOME desktop environment.

%lang_package
%prep
%setup -q

%build
%configure --disable-static --with-pic
make %{?jobs:-j%jobs} V=1

%install
%makeinstall
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%suse_update_desktop_file glade
%find_lang %{name} %{?no_lang_C}
%fdupes %{buildroot}%{_datadir}

%clean
rm -rf %{buildroot}

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%post -n libgladeui-2-6 -p /sbin/ldconfig

%postun -n libgladeui-2-6 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc AUTHORS COPYING COPYING.GPL COPYING.LGPL ChangeLog NEWS README TODO
%defattr (-, root, root)
%doc %{_datadir}/help/C/%{name}/
%{_bindir}/glade
%{_bindir}/glade-previewer
%dir %{_datadir}/appdata
%{_datadir}/appdata/glade.appdata.xml
%{_datadir}/applications/glade.desktop
%{_datadir}/glade/
%{_datadir}/icons/hicolor/*/apps/*.*
%{_libdir}/glade/modules/libgladegtk.so
%{_libdir}/glade/modules/libgladepython.so
%{_mandir}/man1/glade-previewer.1%{?ext_man}
%{_mandir}/man1/glade.1%{?ext_man}

%files -n libgladeui-2-6
%defattr (-, root, root)
%{_libdir}/libgladeui*.so.*
# These directories are needed by third-party catalogs, and are explicitly
# referenced in the pkg-config file, so it makes sense to own them here
%dir %{_datadir}/glade
%dir %{_datadir}/glade/catalogs
%dir %{_datadir}/glade/pixmaps
%dir %{_datadir}/glade/pixmaps/hicolor
%dir %{_datadir}/glade/pixmaps/hicolor/*
%dir %{_datadir}/glade/pixmaps/hicolor/*/actions
%dir %{_libdir}/glade
%dir %{_libdir}/glade/modules

%files -n typelib-1_0-Gladeui-2_0
%defattr (-, root, root)
%{_libdir}/girepository-1.0/Gladeui-2.0.typelib

%files -n libgladeui-2-devel
%defattr (-, root, root)
%{_includedir}/libgladeui-2.0/
%{_libdir}/pkgconfig/gladeui-2.0.pc
%{_libdir}/libgladeui*.so
%{_datadir}/gir-1.0/*.gir
%doc %{_datadir}/gtk-doc/html/gladeui-2/

%files lang -f %{name}.lang

%changelog