File conglomerate.spec of Package conglomerate

#
# spec file for package conglomerate
#
# 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:           conglomerate
BuildRequires:  enchant-devel fdupes gnutls-devel gtk-doc gtksourceview18-devel
BuildRequires:  intltool libglade2-devel libgnomeprintui-devel libgnomeui-devel
BuildRequires:  libwnck-devel libxslt-devel perl-XML-Parser scrollkeeper sgml-skel
BuildRequires:  shared-mime-info translation-update-upstream update-desktop-files
BuildRequires:  libtool
Summary:        XML Editor for GNOME
Version:        0.9.1
Release:        296
Recommends:     %{name}-lang
Group:          Productivity/Publishing/XML
License:        GPLv2+
Url:            http://www.conglomerate.org/
Source0:        %{name}-%{version}.tar.bz2
Patch:          conglomerate-desktop.patch
Patch1:         conglomerate-dist.patch
Patch2:         conglomerate-readme-xds.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
AutoReqProv:    on
%gconf_schemas_prereq

%description
Conglomerate is a user-friendly XML editor for DocBook and other
document types. It aims to hide the complexity and jargon of XML behind
a friendly GUI.

%package doc
License:        GPLv2+
Summary:        Documentation for Conglomerate
Group:          Productivity/Publishing/XML
Requires:       %{name} = %{version}

%description doc
This package contains the documentation for Conglomerate, a
user-friendly XML editor for DocBook and other document types.

%lang_package
%prep
%setup -q
rename no nb po/no.*
sed -i "/^ALL_LINGUAS/s/ no / nb /" configure.in
%patch1
rm data/conglomerate.keys data/conglomerate.desktop data/conglomerate.schemas
translation-update-upstream
%patch -p 1
%patch2

%build
# - Add enchant and enchant-devel to neededforbuild.
# for the moment do not enable: enchant enchant-devel
# needed for conglomerate-0.9.1:
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
autoreconf -f -i
intltoolize --force
# FIXME: GTKDOC_CFLAGS:
# Silently ignored compilation of uninstalled gtk-doc scanners without RPM_OPT_FLAGS.
%configure\
	--disable-scrollkeeper\
	--disable-schemas-install\
	--enable-printing
make %{?jobs:-j%jobs}

%install
%makeinstall
DESTDIR=$RPM_BUILD_ROOT mime-info-to-mime
%suse_update_desktop_file -N "Conglomerate" %name Utility TextEditor
# Change sr@Latn to sr@latin
mv %{buildroot}%{_datadir}/locale/sr@Latn %{buildroot}%{_datadir}/locale/sr@latin
%find_lang %{name} %{?no_lang_C}
%find_gconf_schemas
cat %{name}.schemas_list >%{name}.lst
rm -r $RPM_BUILD_ROOT%{_datadir}/mime-info $RPM_BUILD_ROOT%{_datadir}/application-registry
%fdupes $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%pre -f %{name}.schemas_pre

%post
%if 0%{?suse_version} > 1130
%desktop_database_post
%mime_database_post
%else
if test -x usr/bin/update-mime-database ; then
  usr/bin/update-mime-database usr/share/mime >/dev/null
fi
%endif

%posttrans -f %{name}.schemas_posttrans

%postun
%if 0%{?suse_version} > 1130
%desktop_database_postun
%mime_database_postun
%else
if test -x usr/bin/update-mime-database ; then
  usr/bin/update-mime-database usr/share/mime >/dev/null
fi
%endif

%preun -f %{name}.schemas_preun

%files -f %{name}.lst
%defattr(-, root, root)
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/%{name}/
%doc %{_datadir}/gnome/help/%{name}/C/
%dir %{_datadir}/omf/
%dir %{_datadir}/omf/%{name}/
%doc %{_datadir}/omf/%{name}/%{name}-C.omf
%{_bindir}/*
%{_datadir}/applications/*.desktop
%{_datadir}/%{name}
%{_datadir}/pixmaps/*
%{_datadir}/mime/packages/*.xml

%files lang -f %{name}.lang

%files doc
%defattr(-, root, root)
%{_datadir}/gtk-doc/html/conglomerate

%changelog
openSUSE Build Service is sponsored by