File kseg.spec of Package kseg

#
# spec file for package kseg (Version 0.403)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           kseg
Summary:        A Simulator of Euclidean Geometry
Version:        0.403
Release:        1
License:        GPL v2 or later
Group:          Productivity/Scientific/Math
Url:            http://www.mit.edu/~ibaran
AutoReqProv:    on
BuildRequires:  libdrm-devel libjpeg-devel qt3-devel update-desktop-files
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        %name-%version.tar.bz2
Source1:        %name.desktop
Source2:        %name.xpm
Source10:       kseg_mn.qm
Patch0:         kseg-assert.patch
Patch1:         kseg-KSEG_HOME.patch
Patch2:         kseg-setFilePath.patch
%define         kseg_home %_datadir/%name

%description
KSEG is a program for exploring Euclidean geometry. You can create a
construction, such as a triangle with a circumcenter, then, as you drag
verteces of the triangle, you can see the circumcenter moving in real
time. KSEG is very fast even in big and recursive constructions and may
well be used in math lessons in school.



Authors:
--------
    Ilya Baran <ibaran@mit.edi>

%prep
%setup  -q -n %name
%patch0 -p1
%patch1 -p1
%patch2 -p1
# fix home path
sed -i "s|@KSEG_HOME@|%{kseg_home}|g" main.cpp

%build
export QTDIR=/usr/lib/qt3
qmake QTDIR=$QTDIR LIBS=" -lm -L$QTDIR/%_lib -lqt-mt -lz"
make QTDIR=$QTDIR LIBS=" -lm -L$QTDIR/%_lib -lqt-mt -lz" KSEG_HOME="%{kseg_home}"

%install
mkdir -p %buildroot%{kseg_home}/{examples,pics,locale}
install -Dm755 kseg          %buildroot%{_bindir}/%name
install -p -m644 *.qm *.html %buildroot%{kseg_home}/locale/
install -p -m644 examples/*  %buildroot%{kseg_home}/examples/
install -p -m644 pics/*      %buildroot%{kseg_home}/pics/
# install additional locales
install -m644 %{SOURCE10} %buildroot%_datadir/%name/locale/
# install desktop icon and entry
install -Dm644 %{SOURCE2} %buildroot%_datadir/pixmaps/%name.xpm
%suse_update_desktop_file -i %name Edutainment Math

%clean
rm -rf %buildroot

%files
%defattr(-,root,root)
%doc COPYING AUTHORS README 
%doc README.translators VERSION
%_bindir/kseg
%_datadir/applications/%name.desktop
%_datadir/pixmaps/%name.xpm
%{kseg_home}

%changelog
* Sat Mar 22 2008 lars@linux-schulserver.de
- added translation into Mongolian
- added patch for distribution default LanguageDir and
  QuickPlayDirectory (kseg-KSEG_HOME.patch)
- try to find the right language help file automatically
  (kseg-setFilePath.patch)
- added kseg icon for menu entry
* Fri Mar 21 2008 lars@linux-schulserver.de
- also package the img, html and qm files into %%_datadir/%%name
* Mon Mar 17 2008 lars@linux-schulserver.de
- update to 0.403:
  + uses qmake for building
  + build on Qt 3.x without the compatibility headers
  + Traditional Chinese translation and help file included
* Wed Feb 15 2006 stbinner@suse.de
- fixed .desktop file
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Sat Jan 10 2004 adrian@suse.de
- build as user
* Sat Aug 16 2003 adrian@suse.de
- add desktop file
* Wed Aug 06 2003 uwedr@suse.de
- Update to version 0.4
* Tue Feb 25 2003 aj@suse.de
- Include missing assert.h.
* Tue Nov 19 2002 ro@suse.de
- build with qt3
* Tue Jun 11 2002 ro@suse.de
- fix linking on lib64 platforms
* Fri Apr 19 2002 coolo@suse.de
- fix for gcc 3.1
* Fri Nov 09 2001 ro@suse.de
- use qt-devel-packages in neededforbuild
* Fri Jun 08 2001 uwedr@suse.de
- Spec file created from kseg-0.3.tar.gz
openSUSE Build Service is sponsored by