# # spec file for package dia # # 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/ # Name: dia BuildRequires: docbook-xsl-stylesheets BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: intltool %ifarch %ix86 # libEMF is not on x86_64 BuildRequires: libEMF-devel %endif BuildRequires: libgnomeui-devel BuildRequires: libtool BuildRequires: libxslt-devel BuildRequires: python-devel BuildRequires: python-gtk-devel BuildRequires: scrollkeeper BuildRequires: sgml-skel BuildRequires: swig BuildRequires: translation-update-upstream BuildRequires: update-desktop-files License: GPLv2+ Group: Productivity/Graphics/Other Requires: ghostscript-fonts-std Requires: python-gtk # for xdg-open Requires: xdg-utils Summary: A Diagram Creation Program Version: 0.97.1 Release: 11 Source: ftp://ftp.gnome.org/pub/GNOME/stable/sources/dia/%{name}-%{version}.tar.bz2 Source1: font-test-japanese.dia Source2: font-test-czech.dia Source3: font-test-german-euro.dia # PATCH-FIX-OPENSUSE dia-0.92.2-no-strict-aliasing.patch Patch3: dia-0.92.2-no-strict-aliasing.patch # PATCH-FIX-UPSTREAM bgo581533 dia-python-acinclude.patch Patch14: dia-python-acinclude.patch # PATCH-FIX-OPENSUSE dia-remove-datetime.patch vuntz@novell.com -- Do not put date/time in the compiled binary (needed for build-compare) Patch17: dia-remove-datetime.patch # PATCH-FIX-UPSTREAM dia-swig-2x.patch bgo#651127 idoenmez@suse.de -- Support swig 2.x Patch18: dia-swig-2x.patch # PATCH-FIX-UPSTREAM dia-glib-2.31.patch bgo#655335 dimstar@opensuse.org -- Fix build with glib 2.31. Patch19: dia-glib-2.31.patch Url: http://live.gnome.org/Dia BuildRoot: %{_tmppath}/%{name}-%{version}-build Recommends: %{name}-lang %description Dia is designed to be much like the commercial program 'Visio.' It can be used to draw many different kinds of diagrams. It has special objects to help draw entity relationship diagrams, UML diagrams, SADT, flowcharts, network diagrams, and simple circuits. It is possible to add support for new shapes by writing simple XML files, and using a subset of SVG to draw the shape. Dia can load and save diagrams to a custom XML format (gzipped by default to save space), can export diagrams to EPS, PNG, CGM, or SVG formats, and can print diagrams (including ones that span multiple pages). %lang_package %prep %setup -q translation-update-upstream %patch3 %patch14 %patch17 -p1 %patch18 %patch19 -p1 cp $RPM_SOURCE_DIR/font-test*dia . %build autoreconf -f -i intltoolize --force %configure\ --disable-static\ --enable-db2html\ --enable-gnome\ --with-python\ --with-cairo\ --with-swig make %{?_smp_mflags} %install %makeinstall find %{buildroot} -type f -name "*.la" -exec %{__rm} -fv {} + %suse_update_desktop_file -r -N Dia -C "" -G "Diagram Editor" dia Office FlowChart # Change sr@Latn to sr@latin mv %{buildroot}%{_datadir}/locale/sr@Latn %{buildroot}%{_datadir}/locale/sr@latin # Workaround for bgo#581537: the C help is just a symlink to the en help. But # find_lang doesn't like this rm %{buildroot}%{_datadir}/gnome/help/dia/C mv %{buildroot}%{_datadir}/gnome/help/dia/en %{buildroot}%{_datadir}/gnome/help/dia/C %find_lang %{name} %{?no_lang_C} # No need for mime-info-to-mime, application/x-dia-diagram is defined in freedesktop.org.xml rm -r $RPM_BUILD_ROOT%{_datadir}/mime-info rm samples/Makefile* samples/*png %fdupes -s $RPM_BUILD_ROOT %if 0%{?suse_version} > 1130 %post %desktop_database_post %icon_theme_cache_post %endif %if 0%{?suse_version} > 1130 %postun %desktop_database_postun %icon_theme_cache_postun %endif %files %defattr(-,root,root) %doc AUTHORS COPYING ChangeLog INSTALL KNOWN_BUGS NEWS README TODO samples/ font-test*dia %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}/* %{_libdir}/dia %{_datadir}/applications/*.desktop %{_datadir}/dia %{_datadir}/icons/hicolor/*/apps/dia.* %doc %{_datadir}/doc/dia %doc %{_mandir}/man1/*.* %doc %{_mandir}/fr/man1/*.* %files lang -f %{name}.lang %changelog