-
-%define snap 20030123.0823
-
-Summary: Dia - a gtk+ based diagram creation program
+Summary: Dia - a GTK+ based diagram creation program
Summary(es): Programa para dibujo de diagramas
Summary(pl): Dia - program do tworzenia diagramów
Summary(pt_BR): Programa para desenho de diagramas
Summary(ru): ðÒÏÇÒÁÍÍÁ ÄÌÑ ÒÉÓÏ×ÁÎÉÑ ÄÉÁÇÒÁÍÍ
Summary(uk): ðÒÏÇÒÁÍÁ ÄÌÑ ÍÁÌÀ×ÁÎÎÑ Ä¦ÁÇÒÁÍ
-Summary(zh_CN): »ùÓÚgtk+µÄÁ÷³Ìͼ³ÌÐò
+Summary(zh_CN): »ùÓÚGTK+µÄÁ÷³Ìͼ³ÌÐò
Name: dia
-Version: 0.90
-Release: 1.%{snap}
+%define _ver 0.96
+%define _extraver pre3
+Version: %{_ver}.%{_extraver}
+Release: 0.5
Epoch: 1
License: GPL
Group: X11/Applications/Graphics
-Vendor: James Henstridge <james@daa.com.au>
-# this for final releases
-#Source0: ftp://ftp.gnome.org/pub/GNOME/sources/dia/%{version}/%{name}-%{version}.tar.gz
-# this only for snapshots
-Source0: http://www.crans.org/~chepelov/dia/snapshots/%{name}-CVS-%(echo %snap | sed 's/\./-/').tar.gz
-URL: http://www.lysator.liu.se/~alla/dia/dia.html
-BuildRequires: autoconf
+Source0: ftp://ftp.gnome.org/pub/gnome/sources/dia/%{_ver}/%{name}-%{_ver}-%{_extraver}.tar.bz2
+# Source0-md5: abcb045a4f0c88d9d91ca2dbcdc7be37
+Patch0: %{name}-python.patch
+Patch1: %{name}-desktop.patch
+Patch2: %{name}-gcc4.patch
+URL: http://www.gnome.org/projects/dia/
+BuildRequires: autoconf >= 2.50
BuildRequires: automake
+BuildRequires: docbook-utils
BuildRequires: gettext-devel
-BuildRequires: intltool
-BuildRequires: libgnomeui-devel
+BuildRequires: gtk+2-devel >= 2:2.6.0
+BuildRequires: intltool >= 0.21
+BuildRequires: libart_lgpl-devel >= 2.0
+BuildRequires: libgnomeui-devel >= 2.0.0
+BuildRequires: libpng-devel
+BuildRequires: libstdc++-devel
+BuildRequires: libtool >= 2:1.5
+BuildRequires: libxml2-devel >= 2.3.9
BuildRequires: libxslt-devel
+BuildRequires: libxslt-progs
+BuildRequires: pkgconfig
+BuildRequires: popt-devel
+BuildRequires: python-PyXML
+BuildRequires: python-devel >= 1:2.3
+BuildRequires: python-pygtk-devel
+BuildRequires: rpm-pythonprov
+Requires(post,postun): desktop-file-utils
+Requires: python-modules >= 1:2.3
+Requires: python-pygtk-gtk
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _sysconfdir /etc/X11/GNOME
-
%description
Dia is a program designed to be much like the Windows program 'Visio'.
It can be used to draw different kind of diagrams. In this first
Á ÔÁËÏÖ ÅËÓÐÏÒÔÕ×ÁÔÉ §È × PostScript(TM).
%prep
-#%setup -q
-%setup -q -n dia-cvs-snapshot
+%setup -q -n %{name}-%{_ver}-%{_extraver}
+%patch0 -p1
+%patch1 -p0
+#%patch2 -p1 -- needs check
%build
-./autogen.sh
+%{__libtoolize}
+%{__aclocal}
+%{__autoheader}
+%{__autoconf}
+%{__automake}
%configure \
- --enable-gnome
+ --enable-gnome \
+ --with-python
+
%{__make}
%install
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT \
- Applicationsdir=%{_applnkdir}/Graphics
+ desktopdir=%{_desktopdir}
+
+rm -rf $RPM_BUILD_ROOT%{_datadir}/mime-info
%find_lang %{name} --with-gnome
%clean
rm -rf $RPM_BUILD_ROOT
+%post
+%update_desktop_database_post
+
+%postun
+%update_desktop_database_postun
+
%files -f %{name}.lang
%defattr(644,root,root,755)
%doc AUTHORS NEWS README TODO
%attr(755,root,root) %{_bindir}/*
%dir %{_libdir}/dia
-%attr(755,root,root) %{_libdir}/dia/lib*.so.*
%attr(755,root,root) %{_libdir}/dia/lib*.so
%{_libdir}/dia/lib*.la
+%{_docdir}/dia/*.xml
+%dir %{_docdir}/dia
+%dir %{_docdir}/dia/graphics
+%{_docdir}/dia/graphics/*.png
%{_mandir}/man1/*
-%{_applnkdir}/Graphics/dia.desktop
%{_datadir}/dia
-%{_datadir}/mime-info/*
+%{_desktopdir}/dia.desktop
%{_pixmapsdir}/*