File zhu3d.spec of Package zhu3d

#
#
# Copyright (c) 2006 Víctor Fernández Martínez. Valencia, Spain.
# openSuse  (c) 2006 pnemec@novell.com
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Copyright (c) 2006 Pavel Nemec pnemec@suse.cz
#
# norootforbuild
BuildRequires: kdebase3-devel >= 3.1.0
BuildRequires: update-desktop-files
BuildRequires: Mesa-devel libqt4-x11 libqt4-sql
BuildRequires: libqt4-devel > 4.3
BuildRequires: dos2unix

Name:		zhu3d
Summary:	OpenGL-based equation viewer and solver
Version:	4.1.2
Release:	1
URL:            http://kde-apps.org/content/show.php?content=43071
Source0:	%{name}-%{version}.tar.bz2
Source1:	%{name}.desktop
Patch0:		%{name}-pri.patch
# https://sourceforge.net/tracker/?func=detail&aid=2005834&group_id=181054&atid=895656
Patch1:		%{name}-4.1.2_LC_NUMERIC.patch
License:	GPL
Group:		Productivity/Scientific/Math
Buildroot:	%{_tmppath}/%{name}-%{version}-root
Autoreqprov:    on
Packager:       Pavel Nemec <pnemec@suse.cz>

%description
With Zhu3D you can view, animate and solve up to three functions in
3D-space in a interactive manner. In addition, you further can observe
an independent parametric system. The OpenGL-viewer supports zooming,
scaling, rotating, translating as well as filed lightning,
transparency or surface-properties.

You have up to 8 independent lights or spotlights, background
settings, miscellaneous wire-modes or global illumination
models. Pictures are rendered as png or jpg and can have an arbitrary
size. Numerical solutions of an equation-system are found with a quite
fast and reliable adaptive random search.

Author
---------------
Heinz van Saanen <zhu3d@aon.at>

%prep
%setup -q
%patch0 
%patch1 -p1
find . -type f -print0|xargs -0 chmod -x
dos2unix readme.txt license.gpl

# Change some icons with the KDE equivalents that best fit
cp -f /opt/kde3/share/icons/hicolor/32x32/apps/package_network.png src/images/entire.png
cp -f /opt/kde3/share/icons/crystalsvg/32x32/actions/filenew.png src/images/new.png
cp -f /opt/kde3/share/icons/crystalsvg/32x32/actions/fileopen.png src/images/open.png
cp -f /opt/kde3/share/icons/crystalsvg/32x32/actions/filesaveas.png src/images/saveas.png
cp -f /opt/kde3/share/icons/crystalsvg/32x32/actions/viewmag+.png src/images/zoomin.png
cp -f /opt/kde3/share/icons/crystalsvg/32x32/actions/viewmag-.png src/images/zoomout.png
cp -f /opt/kde3/share/icons/crystalsvg/32x32/actions/help.png src/images/system.png
 

%build
qmake SYSDIR=%{_datadir} QMAKE_CFLAGS_RELEASE="%{optflags}" QMAKE_CXXFLAGS_RELEASE="%{optflags}"
make

%install
# Program binary
mkdir -p $RPM_BUILD_ROOT/usr/bin
cp -f %{name} $RPM_BUILD_ROOT/usr/bin

# Other program files
mkdir -p $RPM_BUILD_ROOT/usr/share/%{name}
cp -a -f work system $RPM_BUILD_ROOT/usr/share/%{name}

# Desktop entry
mkdir -p $RPM_BUILD_ROOT/opt/kde3/share/applications/kde
cp -f %SOURCE1 $RPM_BUILD_ROOT/opt/kde3/share/applications/kde

# Desktop icon
install -m 0755 -d $RPM_BUILD_ROOT/opt/kde3/share/icons/hicolor/64x64/apps
install -m 0755 -d $RPM_BUILD_ROOT/usr/share/pixmaps
install -m 0644 system/icons/%{name}.png $RPM_BUILD_ROOT/opt/kde3/share/icons/hicolor/64x64/apps
install -m 0644 system/icons/%{name}.png $RPM_BUILD_ROOT/usr/share/pixmaps/%{name}.png

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%{_bindir}/%{name}
%{_datadir}/%{name}/*
/opt/kde3/share/applications/kde/*
/opt/kde3/share/icons/hicolor/64x64/apps/*
%{_datadir}/pixmaps/zhu3d.png
%dir %{_datadir}/%{name}
%doc license.gpl readme.txt

%changelog
* Mon Sep 22 2008 Werner Hoch <werner.ho@gmx.de> - 4.1.2
- updated to 4.1.2
- removed support for older distributions
- added LC_NUMERIC patch
* Tue Jul 29 2008 - pnemec@suse.cz
- updated to 4.1.0
* Sun Jun 29 2008 Werner Hoch <werner.ho@gmx.de> - 4.0.4
- new version 4.0.6
* Tue Mar 11 2008 Pavel Nemec <pnemec@suse.cz>
- updated to 4.0.0
- The legends-editor is fully featured now. You can add up to nine labels. Each of them can be positioned, coloured, enabled or resized individually
- Raised the maximum number of user-defined functions to 64
- Switched zhu-file format to XML. The new format is not backward compatible, but you still can read old formats down to version 2.8.0 from November 2006
- Added more specific error messages for file loading
- Moved debugging switch to zhu3d.pro and excluded error class from compilation when turned off. This results in faster compile time and a smaller executable
- Changed all examples to the new 4.0.0 format
- Added legend examples
- Slight code optimisations in regards to zhu-conventions
- Note that all labels are scaleable nearly as precise as a PDF whether it is done in pure OpenGL with a bit Qt4. No complicated subclassing, no funky texture tricks, no extra libs. Developers may take a look at the source and wonder how easy it can be
- Fixed a major bug which was introduced in 3.4.8, where you could not reload files after saving
- Versions >=3.4.6 lost the ability to render textures into pictures and to printer. Fixed
- Updated English and German help-files
* Fri Mar 07 2008 Pavel Nemec <pnemec@suse.cz>
- updated to 3.4.4
* Thu Mar  6 2008 pth@suse.de
  - Pass RPM_OPT_FLAGS to qmake to use them in the makefile
  - Remove the executable flag from all files in %prep section
  - Install readme.txt and license.gpl mode 644
  - Fixed zhu3d.desktop (GenericNamep instead of GenericName)
* Fri Dec 14 2007 Pavel Nemec <pnemec@suse.cz>
- update to 3.3.4
* Wed Feb 21 2007 Pavel Nemec <pnemec@suse.cz>
- updated to 2.9.6
 - A comment with # can appear anywhere in a function input now instead of just at the beginning
 - Added missing hyperbolic area functions (asinh, acosh, ...) to the parsers. The hyperbolic example works now as expected
 - The solver showed a wait cursor, when it was not successfull. Corrected
* Tue Jan 02 2007 Pavel Nemec <pnemec@suse.cz>
  - updated to 2.9.2
  - Added a spreadsheet for user defined items. So you can freely define your own constants and functions as you need it. E.g you can formulate Einsteins law as the function energy(mass)=mass*c^2 now. User defined functions can have an arbitrary amount of parameters and can be nested with other functions or constants. As things can get quite complex now, it is highly recommended to look at the new examples
  - Enabled if-conditions, boolean expressions and recursions for the OpenGL parsers and user defined items
  - Added examples for simple and complex user defined items
  - Added examples for if-conditions and boolean operators
  - Added examples for recursions
  - Added menu "File/New" for a comfortable default starting point
  - Small changes in menu entries/GUI to reflect real meanings better
  - Added/updated Chinese and French html-helpfiles. Special thanks again to Yanqing and Henri Girard for maintaining these translations
  - Updated Spanish GUI/html. Special thanks again to Victor Fernandez for maintaining this translation
  - Some code clean-ups/restructuring/size reduction
  - Adaptions in the Warp-parser for enhanced "Zhu3D-compatibility"
  - Replaced the "Open" icon for a consistent KDE-like look and feel
  - The French html was ugly when shown with internal browser. Fixed
  - Some polishing/corrections in the docs and the examples
- fixed path problem in spec file, created zhu3d.pri patch to fix path
* Fri Dec 08 2006 Pavel Nemec <pnemec@suse.cz>
- updated to 2.9.0
 - Replaced recursive OpenGL-parser with the bytecode-version from Warp. With some additional tuning the average speed gain is between 300%-500%. Especially important for costly isosurfaces on slower machines
 - Raised upper limit for isosurface grid
 - The parser syntax changed slightly. E.g: 2X*SIN(XY) must be written as 2*x*sin(x*y) now
 - To stay compatible added all missing functions to the Warp-parser and introduced the $ sign for constants there
 - New parser functions are: floor(), ceil(), cot(), csc(), sec()
 - Added new functions to recursive parser, which is still in use for solving due to it's precision
 - In parameter mode the Z-grid buttons consequently are disabled now
 - Some code shrink measurements
 - Completely reworked examples for new syntax
 - Loading a zhu-file always starts with a blank viewer window now. This avoids worrying intermixing of old/new views during build up
 - Small changes in menu entries/GUI to reflect real meanings better
 - Improvements/updates for Chinese and French GUI-translation. Special thanks again to Yanqing and Henri Girard for maintaining this translations
 - Enabled the nicer Zhu3D-logo in GUI/menu entries too now
 - The combobox under "Settings/General/Language" did not retranslate it's own language entries immediately. Fixed
 - Clean ups in ./src for readability and unifications
* Thu Nov 23 2006 Pavel Nemec <pnemec@suse.cz>
- updated to 2.7.4
- Some tuning for OpenGL list handling. Especially complexer Zhu3D files may be shown a lot faster after loading now
- Added function log2() to the parsers
- Some clean ups in translation files and error messages
* Tue Nov 21 2006 Pavel Nemec <pnemec@suse.cz>
- updated to 2.7.2
- move package into science project in build.opensuse.org
* Wed Nov 15 2006 Pavel Nemec <pnemec@suse.cz>
- update to version 2.6.7
- minor changes in specfile 
  icon is now installed into /usr/share/pixmaps also 
* Mon Oct 16 2006 - vfernandez@polinux.upv.es
- update to version 2.4
- changed the patch to fix the paths
* Sat Sep 30 2006 - vfernandez@polinux.upv.es
- update to version 2.3
* Mon Sep 18 2006 - vfernandez@polinux.upv.es
- update to version 2.2
- removed the patch for the spanish translation, since Zhu3D already has it
* Thu Aug 24 2006 - vfernandez@polinux.upv.es
- update to version 2.1
- added spanish translation
* Thu Aug 17 2006 - vfernandez@polinux.upv.es
- first build
openSUSE Build Service is sponsored by