Author: tpg
Date: Tue Jan 23 15:19:08 2007
New Revision: 112454

Added:
   packages/cooker/zhu3d/current/SOURCES/zhu3d-2.9.4-path.patch
   packages/cooker/zhu3d/current/SOURCES/zhu3d.desktop
Modified:
   packages/cooker/zhu3d/current/SPECS/zhu3d.spec

Log:
- provide desktop file
- add patch 0
- complete spec file

Added: packages/cooker/zhu3d/current/SOURCES/zhu3d-2.9.4-path.patch
==============================================================================
--- (empty file)
+++ packages/cooker/zhu3d/current/SOURCES/zhu3d-2.9.4-path.patch        Tue Jan 
23 15:19:08 2007
@@ -0,0 +1,42 @@
+--- src/paths.h        2007-01-16 09:48:26.000000000 +0000
++++ paths.h.tpg        2007-01-23 13:47:45.000000000 +0000
+@@ -26,34 +26,17 @@
+ // These are options, what may concern packagers only
+ 
+ // Where are the html-helpfiles located
+-#ifndef DOCDIR
+-      #define MYDOCDIR (appPath+"/doc/")
+-#else
+-      #define MYDOCDIR (QString(DOCDIR)+"/")
+-#endif
++#define MYDOCDIR QString("/usr/share/doc/zhu3d/")
+ 
+ // Where are system-files like startup/languages/icons.. located
+-#ifndef SYSDIR
+-      #define MYSYSDIR (appPath+"/system/")
+-      #define MYLANDIR (appPath+"/system/languages/")
+-#else
+-      #define MYSYSDIR (QString(SYSDIR)+"/")
+-      #define MYLANDIR (QString(SYSDIR)+"/languages/")
+-#endif
++#define MYSYSDIR QString("/usr/share/apps/zhu3d/system/")
++#define MYLANDIR QString("/usr/share/apps/zhu3d/system/languages/")
+ 
+ // Where is the work directory with the zhu-files located
+-#ifndef WORKDIR
+-      #define MYWORKDIR (appPath+"/work/")
+-#else
+-      #define MYWORKDIR (QString(WORKDIR)+"/")
+-#endif
++#define MYWORKDIR QString("/usr/share/apps/zhud3/work/")
+ 
+ // Where is the directory for textures located
+-#ifndef TEXDIR
+-      #define MYTEXDIR (appPath+"/work/textures/")
+-#else
+-      #define MYTEXDIR (QString(TEXDIR)+"/")
+-#endif
++#define MYTEXDIR QString("/usr/share/apps/zhu3d/work/textures/")
+ 
+ // PATHS_H
+ #endif

Added: packages/cooker/zhu3d/current/SOURCES/zhu3d.desktop
==============================================================================
--- (empty file)
+++ packages/cooker/zhu3d/current/SOURCES/zhu3d.desktop Tue Jan 23 15:19:08 2007
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Zhu3D
+Comment=OpenGL-based equation viewer and solver
+Exec=zhu3d
+Icon=zhu3d
+Type=Application
+Terminal=false
+X-KDE-StartupNotify=true
+Categories=X-MandrivaLinux-MoreApplications-Sciences-Mathematics;Qt;Education;Math;

Modified: packages/cooker/zhu3d/current/SPECS/zhu3d.spec
==============================================================================
--- packages/cooker/zhu3d/current/SPECS/zhu3d.spec      (original)
+++ packages/cooker/zhu3d/current/SPECS/zhu3d.spec      Tue Jan 23 15:19:08 2007
@@ -4,30 +4,49 @@
 Release:       %mkrel 1
 License:       GPL
 Group:         Sciences/Mathematics
-Source0:       %{name}-%{version}.tar.gz
 Url:           http://kde-apps.org/content/show.php?content=43071
-BuildRequires: libqt-devel     >= 4.2
+Source0:       %{name}-%{version}.tar.gz
+Source1:       %{name}.desktop
+Patch0:                %{name}-2.9.4-path.patch
+BuildRequires: qt4-devel       >= 4.0
+BuildRequires: libmesaglu-devel
+BuildRequires: kdelibs-devel
 BuildRoot:     %{_tmppath}/%{name}-%{version}-buildroot
 
 %description
-With Zhu3D you interactively can view and animate functions, isosurfaces and a 
further 
-independent parametric system. Numerical solutions of equation systems can be 
found 
-with a precise and reliable adaptive random search. The OpenGL-viewer supports 
zooming, 
-scaling, rotating and translating as well as filed lightning or surface 
properties. 
+With Zhu3D you interactively can view and animate functions,
+isosurfaces and a further independent parametric system. 
+Numerical solutions of equation systems can be found with 
+a precise and reliable adaptive random search. The 
+OpenGL-viewer supports zooming, scaling, rotating and
+translating as well as filed lightning or surface properties. 
 Special effects are transparency, textures, fog and motion blur.
 
 %prep
 %setup -q %{name}-%{version}
+%patch0 -p0
+
+export PATH=/usr/lib/qt4/bin:$PATH
+export QTDIR=%{_prefix}/lib/qt4/
 
 %build
-%configure2_5x
+%{_prefix}/lib/qt4/bin/qmake
 
 %make
 
 %install
 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
 
-%makeinstall_std
+mkdir -p %{buildroot}%{_datadir}/apps/%{name}/{work,system}
+mkdir -p %{buildroot}%{_datadir}/icons/hicolor/64x64/apps
+
+install -D %{name} %{buildroot}%{_bindir}/%{name}
+install -D %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.destkop
+cp -a -f work system %{buildroot}%{_datadir}/apps/%{name}/
+cp -f system/icons/%{name}.png %{buildroot}%{_datadir}/icons/hicolor/64x64/apps
+
+#useless file
+rm -f %{buildroot}%{_datadir}/apps/%{name}/work/.directory
 
 %post
 %{update_menus}
@@ -48,5 +67,10 @@
 
 %files
 %defattr(644,root,root,755)
-%doc
-%attr(755,root,root)
+%doc doc/ readme.txt
+%attr(755,root,root) %{_bindir}/%{name}
+%dir %{_datadir}/apps/%{name}
+%{_datadir}/apps/%{name}/work/*
+%{_datadir}/apps/%{name}/system/*
+%{_datadir}/icons/hicolor/64x64/apps/*.png
+%{_datadir}/applications/%{name}.destkop

Reply via email to