File glade3.spec of Package glade3

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

# norootforbuild


Name:           glade3
BuildRequires:  fdupes
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  gtk-doc
BuildRequires:  intltool
BuildRequires:  libgnomeui-devel
BuildRequires:  python-gtk-devel
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  pkg-config
License:        GPLv2+
Group:          Development/Tools/GUI Builders
Version:        3.7.0
Release:        8
Summary:        User Interface Builder for GTK+ and Gnome
Source:         http://ftp.gnome.org/pub/GNOME/sources/glade3/3.1/%{name}-%{version}.tar.bz2
Url:            http://glade.gnome.org/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Recommends:     %{name}-lang
# The old glade (version 2 -- last version was 2.12.2) is completely replaced by this version
Provides:       glade = 2.12.2
Obsoletes:      glade < 2.12.2

%description
Glade is a RAD tool to enable quick & easy development of user
interfaces for the Gtk+ toolkit and the GNOME desktop environment. The
user interfaces designed in Glade are stored in XML format, enabling
easy integration with external tools. In particular libglade can load
the XML files and create the interfaces at runtime. The DTD for the XML
files is included with libglade, and is also at
http://glade.gnome.org/glade-2.0.dtd. Other tools are available which
can turn the XML files into source code in languages such as C++, Perl
and Python.

%package -n libgladeui-1-9
License:        GPLv2+
Summary:        User Interface Builder for GTK+ and Gnome
Group:          Development/Tools/GUI Builders
Recommends:     %{name}-lang

%description -n libgladeui-1-9
Glade is a RAD tool to enable quick & easy development of user
interfaces for the Gtk+ toolkit and the GNOME desktop environment. The
user interfaces designed in Glade are stored in XML format, enabling
easy integration with external tools. In particular libglade can load
the XML files and create the interfaces at runtime. The DTD for the XML
files is included with libglade, and is also at
http://glade.gnome.org/glade-2.0.dtd. Other tools are available which
can turn the XML files into source code in languages such as C++, Perl
and Python.

%package -n libgladeui-1_0-devel
License:        GPLv2+
Summary:        Development Files for for User Interface Builder for GTK+ and Gnome
Group:          Development/Libraries/C and C++
Requires:       libgladeui-1-9 = %{version} gtk2-devel libxml2-devel
Obsoletes:      libgladeui-1_0-doc <= %{version}
Provides:       libgladeui-1_0-doc = %{version}

%description -n libgladeui-1_0-devel
Glade is a RAD tool to enable quick & easy development of user
interfaces for the Gtk+ toolkit and the GNOME desktop environment. The
user interfaces designed in Glade are stored in XML format, enabling
easy integration with external tools. In particular libglade can load
the XML files and create the interfaces at runtime. The DTD for the XML
files is included with libglade, and is also at
http://glade.gnome.org/glade-2.0.dtd. Other tools are available which
can turn the XML files into source code in languages such as C++, Perl
and Python.

%lang_package
%prep
%setup -q
translation-update-upstream

%build
%configure --disable-static --with-pic\
	--enable-gtk-doc\
	--disable-scrollkeeper\
	--disable-static
make %{?jobs:-j%jobs}

%install
%makeinstall
%if 0%{?suse_version} <= 1120
%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
%endif
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/glade3/pixmaps/16x16
%suse_update_desktop_file -N Glade glade-3
%find_lang %{name} %{?no_lang_C}
%find_lang glade %{name}.lang
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%fdupes $RPM_BUILD_ROOT%{_datadir}

%clean
rm -rf $RPM_BUILD_ROOT

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%post -n libgladeui-1-9 -p /sbin/ldconfig

%postun -n libgladeui-1-9 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc AUTHORS COPYING COPYING.GPL COPYING.LGPL ChangeLog NEWS README TODO
%defattr (-, root, root)
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/glade/
%doc %{_datadir}/gnome/help/glade/C/
%dir %{_datadir}/omf/
%dir %{_datadir}/omf/glade/
%doc %{_datadir}/omf/glade/glade-C.omf
%{_bindir}/*
%{_datadir}/applications/glade-3.desktop
%{_datadir}/glade3/
%{_datadir}/icons/hicolor/*/apps/*.*
%{_libdir}/glade3/modules/libgladegnome.so
%{_libdir}/glade3/modules/libgladegtk.so
%{_libdir}/glade3/modules/libgladepython.so

%files -n libgladeui-1-9
%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}/glade3
%dir %{_datadir}/glade3/catalogs
%dir %{_datadir}/glade3/pixmaps
%dir %{_datadir}/glade3/pixmaps/hicolor
%dir %{_datadir}/glade3/pixmaps/hicolor/*
%dir %{_datadir}/glade3/pixmaps/hicolor/*/actions
%dir %{_libdir}/glade3
%dir %{_libdir}/glade3/modules

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

%files lang -f %{name}.lang

%changelog