# Installs in dir /usr

%define prefix /usr

Summary: A data viewing program for KDE.
Name: kst
Version: 1.0.0
Release: 1
Source0: kst-%{version}.tar.gz
Group: X11/Applications/Scientific
License: GNU GENERAL PUBLIC LICENSE
URL: http://omega.astro.utoronto.ca/kst/kst-%{version}.tar.gz
Vendor: Barth Netterfield <netterfield@astro.utoronto.ca>
BuildRoot: /var/tmp/kst-%{version}.root

Requires(post,postun): /sbin/ldconfig

%description
A data viewing application for KDE.

%prep
%setup 
./configure --prefix=%prefix

%build
make

%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT SUID_ROOT="" install

%find_lang %{name}

%files -f %{name}.lang
%defattr(-,root,root)
#binaries
%prefix/bin/kst
%prefix/bin/d2asc
%prefix/bin/kstplugineditor
#libraries
%prefix/lib/libkst.so.1.0.0
%prefix/lib/libkst.so.1
%prefix/lib/libkst.so
%prefix/lib/libkst.la
#headers
%prefix/include/kstdatasource.h
%prefix/include/kstobject.h
#data plugins
%prefix/lib/kde3/kstdata_*.la
%prefix/lib/kde3/kstdata_*.so
%prefix/share/services/kst/kstdata_*.desktop
#plugins
%prefix/lib/kde3/kstplugins/*.la
%prefix/lib/kde3/kstplugins/*.so
%prefix/lib/kde3/kstplugins/*.xml
%prefix/share/servicetypes/kst/kstdatasourceplugin.desktop
%prefix/share/servicetypes/kst/kstplugin.desktop
%prefix/share/servicetypes/kst/kstfilter.desktop
#extensions
%prefix/lib/kde3/kstextension_elog.la
%prefix/lib/kde3/kstextension_elog.so
%prefix/share/services/kst/kstextension_elog.desktop
%prefix/share/apps/kst/kstextension_elog.rc
%prefix/share/servicetypes/kst/kstextension.desktop
# UI file
%prefix/share/apps/kst/kstui.rc
#%prefix/share/apps/kst/kstui2.rc
#desktop file
%prefix/share/applnk/Applications/Sciences/kst.desktop
%prefix/share/mimelnk/application/x-kst.desktop
#icons
%prefix/share/icons/hicolor/22x22/actions/*.png
%prefix/share/icons/locolor/16x16/apps/kst.png
%prefix/share/icons/locolor/32x32/apps/kst.png
%prefix/share/icons/hicolor/16x16/mimetypes/kst.png
%prefix/share/icons/hicolor/32x32/mimetypes/kst.png
%prefix/share/icons/locolor/16x16/mimetypes/kst.png
%prefix/share/icons/locolor/32x32/mimetypes/kst.png
#docs
%prefix/share/doc/HTML/*/kst/*
#other
"%prefix/share/config/colors/Kst Colors"
"%prefix/share/config/colors/Kst Grayscale 256"
"%prefix/share/config/colors/Kst Spectrum 1021"

%doc ChangeLog INSTALL AUTHORS README COPYING kst/RELEASE.NOTES kst/NEWS

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

