Name: gwyddion
Version: 2.10
Release: alt1
Summary: An SPM data visualization and analysis tool

Group: Applications/Engineering
License: GNU GPL
Url: http://gwyddion.net/
Packager: Eugene Ostapets <eostapets@altlinux.ru>

Source: http://gwyddion.net/download/%version/%name-%version.tar.bz2

%define pkglibdir %_libdir/%name
%define pkglibexecdir %_libexecdir/%name
%define pkgdatadir %_datadir/%name
%define pkgincludedir %_includedir/%name
%define gtkdocdir %_datadir/gtk-doc/html

# Automatically added by buildreq on Thu Mar 13 2008
BuildRequires: desktop-file-utils glibc-devel-static gtk-doc imake libfftw3-devel libgtkglext-devel libmesa-devel libtiff-devel libxml2-devel python-dev xorg-cf-files

%package devel
Summary: Headers, libraries and tools for Gwyddion module development
Group: Development/Libraries
Requires: %name = %version

%description
Gwyddion is a modular SPM (Scanning Probe Microsopy) data visualization and
analysis tool written with Gtk+.

It can be used for all most frequently used data processing operations
including: leveling, false color plotting, shading, filtering, denoising, data
editing, integral transforms, grain analysis, profile extraction, fractal
analysis, and many more.  The program is primarily focused on SPM data analysis
(e.g. data obtained from AFM, STM, NSOM, and similar microscopes).  However, it
can also be used for analysis of SEM (Scanning Electron Microscopy) data or any
other 2D data.

%description devel
Header files, libraries and tools for Gwyddion module and plug-in development.
This package also contains the API docmentation and sample plug-ins in various
programming languages.

%prep
%setup -q
# Don't install .la files.
%__subst '/# Install the pseudo-library/,/^$/d' ltmain.sh
# Replace universal %_bindir/env shbang with the real thing.
%__subst '1s/env *//' plugins/process/*.{py,rb,pl}

%build
%configure \
	--enable-gtk-doc \
	--enable-python \
	--disable-pygwy \
	--enable-library-bloat
%make_build

%install
%make_install install DESTDIR=%buildroot
%find_lang %name

find %buildroot%pkglibexecdir -type f -name \*.rgi -print0 | xargs -0 chmod 644

%post
/sbin/ldconfig
update-mime-database %_datadir/mime &>/dev/null || :
update-desktop-database &>/dev/null || :

%postun
/sbin/ldconfig
update-mime-database %_datadir/mime &>/dev/null || :
update-desktop-database &>/dev/null || :

%files -f %name.lang

%_bindir/%name

%doc AUTHORS COPYING INSTALL.%name NEWS README THANKS
%pkgdatadir/pixmaps/*.png
%pkgdatadir/pixmaps/*.ico
%pkgdatadir/gradients/*
%pkgdatadir/glmaterials/*
%pkgdatadir/ui/*
%dir %pkgdatadir/pixmaps
%dir %pkgdatadir/gradients
%dir %pkgdatadir/glmaterials
%dir %pkgdatadir/ui
%dir %pkgdatadir
%_man1dir/%name.1*
%_datadir/icons/hicolor/48x48/apps/%name.png
%pkglibdir/modules/file/*.so
%pkglibdir/modules/graph/*.so
%pkglibdir/modules/layer/*.so
%pkglibdir/modules/process/*.so
%pkglibdir/modules/tool/*.so
%pkglibdir/modules/*.so
%dir %pkglibdir/modules/file
%dir %pkglibdir/modules/graph
%dir %pkglibdir/modules/layer
%dir %pkglibdir/modules/process
%dir %pkglibdir/modules/tool
%dir %pkglibdir/modules
%dir %pkglibdir
%_libdir/*.so.*
%_desktopdir/%name.desktop
%_datadir/mime/packages/%name.xml

%_datadir/mime/application/*.xml
%exclude %_datadir/applications/*.cache
%exclude %_datadir/mime/globs
%exclude %_datadir/mime/magic
%exclude %_datadir/mime/subclasses
%exclude %_datadir/mime/aliases
%exclude %_datadir/mime/XMLnamespaces
%exclude %_datadir/mime/mime.cache

%files devel
%doc devel-docs/CODING-STANDARDS
%exclude %pkglibdir/modules/file/*.la
%exclude %pkglibdir/modules/tool/*.la
%exclude %pkglibdir/modules/process/*.la
%exclude %pkglibdir/modules/layer/*.la
%exclude %pkglibdir/modules/graph/*.la
%exclude %pkglibdir/modules/*.la
%exclude %_man3dir/Gwyddion::dump.3pm*
%pkgincludedir/app/*.h
%pkgincludedir/libdraw/*.h
%pkgincludedir/libprocess/*.h
%pkgincludedir/libgwyddion/*.h
%pkgincludedir/libgwydgets/*.h
%pkgincludedir/libgwymodule/*.h
%dir %pkgincludedir/app
%dir %pkgincludedir/libdraw
%dir %pkgincludedir/libprocess
%dir %pkgincludedir/libgwyddion
%dir %pkgincludedir/libgwydgets
%dir %pkgincludedir/libgwymodule
%dir %pkgincludedir
%_libdir/*.so
%_pkgconfigdir/gwyddion.pc
%dir %_pkgconfigdir
# Documentation
%doc %gtkdocdir/libgwyapp/*
%doc %gtkdocdir/libgwydraw/*
%doc %gtkdocdir/libgwyprocess/*
%doc %gtkdocdir/libgwyddion/*
%doc %gtkdocdir/libgwydgets/*
%doc %gtkdocdir/libgwymodule/*
%doc %dir %gtkdocdir/libgwyapp
%doc %dir %gtkdocdir/libgwydraw
%doc %dir %gtkdocdir/libgwyprocess
%doc %dir %gtkdocdir/libgwyddion
%doc %dir %gtkdocdir/libgwydgets
%doc %dir %gtkdocdir/libgwymodule
%doc %dir %gtkdocdir
%doc %dir %_datadir/gtk-doc
%pkglibdir/include/gwyconfig.h
%dir %pkglibdir/include
# Plug-ins and plug-in devel stuff
%pkglibdir/perl/Gwyddion/*
%dir %pkglibdir/perl/Gwyddion
%dir %pkglibdir/perl
%pkglibdir/python/Gwyddion/*
%dir %pkglibdir/python/Gwyddion
%dir %pkglibdir/python
#%pkglibdir/ruby/gwyddion/*
#%dir %pkglibdir/ruby/gwyddion
#%dir %pkglibdir/ruby
# Use filesystem permissions here.

%pkglibexecdir/plugins/file/*
%pkglibexecdir/plugins/process/*
%dir %pkglibexecdir/plugins/file
%dir %pkglibexecdir/plugins/process
%dir %pkglibexecdir/plugins
%dir %pkglibexecdir

%changelog

* Mon Jul 14 2008 Andrii Dobrovol`s`kii <dobr@iop.kiev.ua> 2.10-alt1
- New version

* Thu Mar 13 2008 Eugene Ostapets <eostapets@altlinux.ru> 2.9-alt1
- Initial build

