Sisyphus repository
Last update: 13 october 2019 | SRPMs: 17513 | Visits: 15259961
en ru br
ALT Linux repos
S:0.97.4-alt0.7
5.0: 0.97-alt2
4.1: 0.96.1-alt3.1
4.0: 0.96.1-alt1
3.0: 0.94-alt9cvs20050730

Other repositories
Upstream:0.96-pre9

Group :: Office
RPM: dia

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Name: dia
Version: 0.94
Release: alt9cvs20050730

Summary: A gtk+ based diagram creation program
Summary(ru_RU.KOI8-R): Программа для создания диаграмм, основанная на GTK+

License: GPL
Group: Office
URL: http://www.gnome.org/projects/dia

Packager: Vitaly Lipatov <lav at altlinux.ru>

Source: ftp://ftp.gnome.org/pub/GNOME/stable/sources/dia/%name-%version.tar.bz2
Source1: %name.menu
Source2: %{name}_icons.tar.bz2
Source3: %name-%version.ru.po
Patch: %name-%version-alt.patch
Patch1: %name-0.94-alt-m4.patch

# Typical environment for GNOME program

#Requires(post): GConf2
Requires(post,postun): scrollkeeper
Requires(post,postun): desktop-file-utils
#BuildPreReq: GConf2
BuildPreReq: desktop-file-utils
BuildPreReq: menu-devel

%add_python_req_skip dia
%add_findprov_lib_path %_libdir/%name

# manually removed: eric gcc-g77

# Automatically added by buildreq on Sun Mar 20 2005
BuildRequires: ORBit2-devel docbook-utils esound fontconfig-devel freetype2-devel gcc-c++ glib2-devel gnome-vfs2-devel hostinfo libGConf2-devel libart_lgpl-devel libatk-devel libbonobo2-devel libbonoboui-devel libgnome-devel libgnome-keyring libgnomecanvas-devel libgnomeprint2-devel libgnomeui-devel libgtk+2-devel libpango-devel libpng-devel libpopt-devel libstdc++-devel libxml2-devel libxslt-devel perl-XML-Parser pkgconfig python-base python-dev python-devel-static python-module-pygtk python-modules-encodings python-modules-xml xorg-x11-devel xorg-x11-libs xorg-x11-locales xsltproc zlib-devel
BuildPreReq: python-devel-static >= %__python_version

#BuildRequires: python-devel-static

BuildPreReq: grep, sed

%description
Dia is a GNU program designed to be much like the Windows
program 'Visio'. It can be used to draw different kind of diagrams.

It can be used to draw a variety of diagram types, including UML, Network,
flowchart and others.  The native file format for Dia is XML (optionally
gzip compressed).  It has print support, and can export to a number of formats such as EPS, SVG, CGM and PNG.

%description -l ru_RU.KOI8-R
Dia -- это GNU-программа, разработанная по подобию
Windows-программы 'Visio'. Она может быть использована
для рисования самых различных диаграмм.

Dia можно применять для рисования разнообразных типов диаграмм,
включая UML, структур компьютерных сетей, диаграмм потоков
и других. Родным форматом файлов для Dia является XML
(который может быть сжат gzip).
В Dia есть возможность наспечатать созданную диаграмму,
или экспортировать её в различные форматы,
такие как EPS, SVG, CGM или PNG.

%package python

Summary: DIA python plugin
Group: Office
Requires: %name = %version-%release

%description python
DIA python plugin

%package gnome

Summary: DIA compiled with GNOME
Group: Office
Requires: %name = %version-%release

%description gnome
DIA compiled with GNOME
flags:
--enable-unicode --enable-freetype
--enable-cairo --enable-gnome --enable-bonobo
--with-gnomeprint --with--python

%prep
%setup -q
%patch -p0
%patch1 -p1
tar xvfj %SOURCE2
cp -f %SOURCE3 po/ru.po

%build
autoreconf -fisv
%configure  \
--enable-unicode --enable-freetype \
--enable-db2html --disable-gnome
%make_build

# Save gtk version of dia and libdia

%__mv app/.libs/%name %name-gtk
%__mv lib/.libs/lib%name.so lib%name-gtk.so
(cd doc && make install datadir=buildroot)

subst 's|"dia"|"dia-gnome"|' %name.desktop
subst "s|Editor|Editor for GNOME|" %name.desktop
subst 's|title="Dia"|title="Dia GNOME"|' %name.desktop

%configure  \
--enable-unicode --enable-freetype \
--enable-cairo --enable-gnome \
--enable-bonobo --with-gnomeprint \
--enable-db2html --with-python
%make_build

%install
%makeinstall
%__mv %buildroot/%_bindir/%name %buildroot/%_bindir/%name-gnome
%__install %name-gtk %buildroot/%_bindir/%name
%__install lib%name-gtk.so %buildroot/%_libdir/%name/lib%name.so
(cd doc/buildroot/%name && %__cp -rp help %buildroot/%datadir/%name)

# menu

%__mkdir_p %buildroot%_menudir
install -m 644 %SOURCE1 $RPM_BUILD_ROOT%_menudir/%name

freedesktop2menu.pl %name-gnome "Office/Graphs" \
%buildroot%_datadir/applications/%name.desktop \
%buildroot%_menudir/%name-gnome

mkdir -p $RPM_BUILD_ROOT/%_miconsdir
mkdir -p $RPM_BUILD_ROOT/%_liconsdir
install -m 644 %{name}_16.xpm $RPM_BUILD_ROOT/%_miconsdir/%name.xpm
install -m 644 %{name}_32.xpm $RPM_BUILD_ROOT/%_iconsdir/%name.xpm
install -m 644 %{name}_48.xpm $RPM_BUILD_ROOT/%_liconsdir/%name.xpm

%find_lang %name --with-gnome
%__mv %name.lang %name-gnome.tmp
%find_lang %name
diff -u %name.lang %name-gnome.tmp | grep -v "^++" | grep "^+" | sed -e "s|^+||g" >%name-gnome.lang

%__rm -rf %buildroot%_localstatedir/scrollkeeper

%post
%update_menus

%postun
%clean_menus

%post gnome
%update_menus
%update_scrollkeeper
%update_desktopdb

%postun gnome
%clean_menus
%clean_scrollkeeper
%clean_desktopdb

%files -f %name.lang
%doc README TODO NEWS INSTALL ChangeLog AUTHORS
%_bindir/%name
%_libdir/%name
%_datadir/%name
%_mandir/*/*
%_datadir/pixmaps/*
%_menudir/%name
%_iconsdir/%name.xpm
%_miconsdir/%name.xpm
%_liconsdir/%name.xpm
%exclude %_datadir/%name/python
%exclude %_libdir/%name/libpython*
%exclude %_libdir/%name/libgprint*

%files gnome -f %name-gnome.lang
%_bindir/%name-gnome
%_datadir/applications/*
%_datadir/mime-info/*
%_menudir/%name-gnome
%_libdir/%name/libgprint*

%files python
%_datadir/%name/python
%_libdir/%name/libpython*

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin