From 03d6088378688e3b1273acd9d3fbedff20f912412fc5f8d43476c29c9b644556 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 20 Oct 2014 06:44:22 +0000 Subject: [PATCH] Accepting request 257638 from home:dimstar:appdata - Add dia.appdata.xml: allow DIA to show up as an application in gnome-software (installation will abort when upstream ships the file). - Run spec-cleaner. OBS-URL: https://build.opensuse.org/request/show/257638 OBS-URL: https://build.opensuse.org/package/show/GNOME:Apps/dia?expand=0&rev=32 --- dia.appdata.xml | 36 ++++++++++++++++++++++++ dia.changes | 8 ++++++ dia.spec | 75 ++++++++++++++++++++++++++++--------------------- 3 files changed, 87 insertions(+), 32 deletions(-) create mode 100644 dia.appdata.xml diff --git a/dia.appdata.xml b/dia.appdata.xml new file mode 100644 index 0000000..0b82fba --- /dev/null +++ b/dia.appdata.xml @@ -0,0 +1,36 @@ + + + + + + + dia.desktop + CC0-1.0 + Dia is a GTK+ based diagram creation program + +

+ Dia is roughly inspired by the commercial Windows program 'Visio,' though + more geared towards informal diagrams for casual use. + It can be used to draw many different kinds of diagrams. + It currently has special objects to help draw entity relationship diagrams, + UML diagrams, flowcharts, network diagrams, and many other diagrams. + It is also possible to add support for new shapes by writing simple XML files, + using a subset of SVG to draw the shape. +

+

+ It can load and save diagrams to a custom XML format (gzipped by default, + to save space), can export diagrams to a number of formats, including EPS, + SVG, XFIG, WMF and PNG, and can print diagrams (including ones that span + multiple pages). +

+
+ https://wiki.gnome.org/Apps/Dia + + https://wiki.gnome.org/Apps/Dia/Screenshots?action=AttachFile&do=get&target=dia-0.97-integrated-ui.png + https://wiki.gnome.org/Apps/Dia/Screenshots?action=AttachFile&do=get&target=UML+properties.png + + dia-list@gnome.org +
diff --git a/dia.changes b/dia.changes index fb0ef11..f067a72 100644 --- a/dia.changes +++ b/dia.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sun Oct 19 10:44:44 UTC 2014 - dimstar@opensuse.org + +- Add dia.appdata.xml: allow DIA to show up as an application in + gnome-software (installation will abort when upstream ships the + file). +- Run spec-cleaner. + ------------------------------------------------------------------- Wed Sep 17 23:44:48 UTC 2014 - dimstar@opensuse.org diff --git a/dia.spec b/dia.spec index 91791b7..f8ff627 100644 --- a/dia.spec +++ b/dia.spec @@ -17,19 +17,30 @@ Name: dia +Version: 0.97.3 +Release: 0 +Summary: A Diagram Creation Program +License: GPL-2.0+ +Group: Productivity/Graphics/Other +Url: http://live.gnome.org/Dia +Source0: http://download.gnome.org/sources/dia/0.97/%{name}-%{version}.tar.xz +Source1: font-test-japanese.dia +Source2: font-test-czech.dia +Source3: font-test-german-euro.dia +Source4: dia.appdata.xml +# PATCH-FIX-OPENSUSE dia-0.92.2-no-strict-aliasing.patch +Patch3: dia-0.92.2-no-strict-aliasing.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-libemf-64bit.patch bgo#675495 sbrabec@suse.cz -- Fix build with libEMF on 64-bit platforms. +Patch20: dia-libemf-64bit.patch +# PATCH-FIX-OPENSUSE dia-enable-html-doc.patch mgorse@suse.com -- Always enable html docs if xsltproc present. +Patch23: dia-enable-html-doc.patch BuildRequires: docbook-toys BuildRequires: docbook-xsl-stylesheets BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: intltool -%if 0%{?suse_version} > 1210 -BuildRequires: libEMF-devel -%else -%ifarch %ix86 -# libEMF was not on x86_64 before 12.2 -BuildRequires: libEMF-devel -%endif -%endif BuildRequires: libtool BuildRequires: libxslt-devel BuildRequires: python-devel @@ -45,26 +56,16 @@ Requires: ghostscript-fonts-std Requires: python-gtk # for xdg-open Requires: xdg-utils -Summary: A Diagram Creation Program -License: GPL-2.0+ -Group: Productivity/Graphics/Other -Version: 0.97.3 -Release: 0 -Source: http://download.gnome.org/sources/dia/0.97/%{name}-%{version}.tar.xz -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-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-libemf-64bit.patch bgo#675495 sbrabec@suse.cz -- Fix build with libEMF on 64-bit platforms. -Patch20: dia-libemf-64bit.patch -# PATCH-FIX-OPENSUSE dia-enable-html-doc.patch mgorse@suse.com -- Always enable html docs if xsltproc present. -Patch23: dia-enable-html-doc.patch -Url: http://live.gnome.org/Dia -BuildRoot: %{_tmppath}/%{name}-%{version}-build Recommends: %{name}-lang +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if 0%{?suse_version} > 1210 +BuildRequires: libEMF-devel +%else +%ifarch %ix86 +# libEMF was not on x86_64 before 12.2 +BuildRequires: libEMF-devel +%endif +%endif %description Dia is designed to be much like the commercial program 'Visio.' It can @@ -80,6 +81,7 @@ formats, and can print diagrams (including ones that span multiple pages). %lang_package + %prep %setup -q translation-update-upstream @@ -102,24 +104,30 @@ intltoolize --force make %{?_smp_mflags} %install -%makeinstall -find %{buildroot} -type f -name "*.la" -exec %{__rm} -fv {} + +make DESTDIR=%{buildroot} install %{?_smp_mflags} +find %{buildroot} -type f -name "*.la" -delete -print %suse_update_desktop_file -r -N Dia -C "" -G "Diagram Editor" dia Office FlowChart %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 -r %{buildroot}%{_datadir}/mime-info rm samples/Makefile* samples/*png +if [ -f %{buildroot}%{_datadir}/appdata/dia.appdata.xml ]; then + echo "Please remove the added dia.appdata.xml file from the sources - the tarball installs it" + false +else + mkdir -p %{buildroot}%{_datadir}/appdata + cp %{S:4} %{buildroot}%{_datadir}/appdata/ +fi + %fdupes %{buildroot}%{_datadir} %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 @@ -130,6 +138,8 @@ rm samples/Makefile* samples/*png %doc AUTHORS COPYING ChangeLog INSTALL KNOWN_BUGS NEWS README TODO samples/ font-test*dia %{_bindir}/* %{_libdir}/dia +%dir %{_datadir}/appdata +%{_datadir}/appdata/dia.appdata.xml %{_datadir}/applications/*.desktop %{_datadir}/dia %{_datadir}/icons/hicolor/*/apps/dia.* @@ -138,5 +148,6 @@ rm samples/Makefile* samples/*png %doc %{_mandir}/fr/man1/*.* %files lang -f %{name}.lang +%defattr(-,root,root) %changelog