%define pre 2 
Name: labplot
Version: 1.6.0.2
Release: alt7

Summary: Function and Data Plotter
Summary(ru_RU.UTF-8): Построитель графиков по данным и функциям

Packager: Michael Shigorin <mike@altlinux.org>

Url: http://labplot.sourceforge.net
Group: Sciences/Other
License: GPL

Source: http://dl.sf.net/labplot/LabPlot-%version.tar.bz2
Source1: LabPlot-1.6.0.2.tar.bz2
#Source1: /usr/src/RPM/SOURCES/LabPlot-1.6.0.2.tar.bz2
#Source1: %name-%version.ru.po

# manually removed: boson gcc-g77 hostinfo libnetcdf-devel
# Automatically added by buildreq on Mon Dec 27 2004
BuildRequires: bzlib-devel fontconfig freetype2-devel gcc-c++ kde-settings kdelibs-devel libImageMagick-devel libarts-devel libaudiofile-devel libfftw3-devel libgsl-devel libjasper-devel libjpeg-devel liblcms-devel libpng-devel libqscintilla2-qt3-designer libqt3-devel libqt3-qsa-devel libqt3-settings libqwt-devel libstdc++-devel libtiff-devel pstoedit qt3-designer xml-utils xorg-x11-devel xorg-x11-libs zlib-devel

Requires: ImageMagick >= 5.4.7 gsl pstoedit

%description
This is a program for plotting of functions and data manipulation.

A versatile spreadsheet for data import and editing was added. Also a better
3 dimensional plot with rotation and colormaps is available.
Newly supported are data set operations and image manipulations. One can now 
import over 80 different images formats and export directly to ps, eps or pdf.
The plots now use double buffering and LabPlot supports scripting using
QSA.

%description -l ru_RU.UTF-8
Это программа для построения графиков функций и
обработки данных.

%prep
%setup -q -n LabPlot-%version
#cp -f %{SOURCE1} po/ru.po
%__subst "s/\.la/\.so/g" configure

%build
export QTDIR=%_libdir/qt3
export KDEDIR=%_libdir/kde3
export PATH=$QTDIR/bin:$KDEDIR/bin:$PATH
%configure --disable-static	--disable-rpath \
	--enable-fftw3 --enable-gl --enable-audiofile --enable-jasper \
	--enable-gsl --enable-grass --enable-pstoedit --enable-qsa \
	--disable-cdf
# needed new packages:
#	--enable-cdf 

%make

%install
make DESTDIR="%buildroot" install

mkdir -p %buildroot%_menudir
cat >%buildroot%_menudir/%name <<EOF
?package(%name): command="LabPlot" \\
section="Applications/Sciences/Mathematics" \\
title="LabPlot" \\
longtitle="Function and Data Plotter" \\
genericname="Flowcharting and Diagramming" \\
icon="%name.png" \\
needs="x11"
EOF

%__install -D -m644 src/icons/lo32-app-LabPlot.png %buildroot%_iconsdir/%name.png
%__install -D -m644 src/icons/lo16-app-LabPlot.png %buildroot%_miconsdir/%name.png
%__install -D -m644 src/icons/hi48-app-LabPlot.png %buildroot%_liconsdir/%name.png

%find_lang LabPlot --with-kde

%post
%update_menus

%postun
%clean_menus

%files -f LabPlot.lang
%doc README TODO INSTALL ChangeLog CHANGES FEATURES LabPlot.lsm doc/cephes.doc
%_bindir/*
/usr/share/applnk/Applications/*
/usr/share/mimelnk/application/x-lpl.desktop
/usr/share/apps/LabPlot
%_iconsdir/%{name}*
%_liconsdir/%{name}*
%_miconsdir/%{name}*
%_menudir/%name
%_mandir/man?/*

#/usr/share/icons/locolor/16x16/mimetypes/lpl.png
#/usr/share/icons/locolor/32x32/mimetypes/lpl.png
#/usr/share/icons/hicolor/48x48/mimetypes/lpl.png
#/usr/share/icons/hicolor/64x64/mimetypes/lpl.png
%_libdir/*.so.*

%changelog
* Sun Mar 22 2009 Michael Shigorin <mike@altlinux.org> 1.6.0.2-alt7
Build for brahch 5.0

* Thu Mar 23 2006 Michael Shigorin <mike@altlinux.org> 1.5.0-alt0.0.4.M30.1
- built for 3.0 on request from Turkov Oleg (errata)

* Tue Oct 04 2005 Vitaly Lipatov <lav@altlinux.ru> 1.5.0-alt0.4
- new version

* Mon Dec 27 2004 Vitaly Lipatov <lav@altlinux.ru> 1.4.0-alt1
- new version

* Mon Nov 08 2004 Vitaly Lipatov <lav@altlinux.ru> 1.3.1-alt1
- release

* Fri Sep 17 2004 ALT QA Team Robot <qa-robot@altlinux.org> 1.3.1-alt0.1pre2.1
- Rebuilt with libtiff.so.4.

* Sat Jul 31 2004 Vitaly Lipatov <lav@altlinux.ru> 1.3.1-alt0.1pre2
- new version
- add russian translation

* Sat Jun 19 2004 Vitaly Lipatov <lav@altlinux.ru> 1.3.0-alt1
- first build for Sisyphus
