Name: zhu3d Version: 4.2.2 Release: 2%{dist} Summary: Interactive OpenGL-based mathematical function viewer Group: Applications/System License: GPLv3 URL: http://www.sourceforge.net/projects/zhu3d Source0: http://sourceforge.net/projects/zhu3d/files/zhu3d/%{name}-%{version}.tar.gz Source1: zhu3d.desktop Patch1: pri.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: cmake make qt4-devel desktop-file-utils dos2unix %description Zhu3D is an interactive OpenGL-based mathematical function viewer. You can visualize functions, parametric systems and Iso-surfaces. The viewer supports special effects like animation, morphing, transparency, textures, fog and motion blur %prep %setup -q -n %{name}-%{version} %patch1 -p1 -b .pri find . -type f -print0|xargs -0 chmod -x dos2unix readme.txt license.gpl %build QTDIR="%{_qt4_prefix}" ; export QTDIR ; \ PATH="%{_qt4_bindir}:$PATH" ; export PATH ; \ CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \ CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \ FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \ qmake-qt4 -r IDE_LIBRARY_BASENAME=%{_lib} make %{?_smp_mflags} %install # Program binary mkdir -p %{buildroot}%{_bindir} cp -f %{name} %{buildroot}%{_bindir} # Other program files mkdir -p %{buildroot}%{_datadir}/%{name} cp -a -f work system %{buildroot}%{_datadir}/%{name} # Desktop entry mkdir -p %{buildroot}%{_datadir}/applications cp -f %SOURCE1 %{buildroot}%{_datadir}/applications # Desktop icon install -m 0755 -d %{buildroot}%{_datadir}/icons/hicolor/64x64/apps install -m 0755 -d %{buildroot}%{_datadir}/pixmaps install -m 0644 system/icons/%{name}.png %{buildroot}%{_datadir}/icons/hicolor/64x64/apps install -m 0644 system/icons/%{name}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} %check desktop-file-validate %{SOURCE1} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc license.gpl readme.txt %{_bindir}/%{name} %{_datadir}/%{name}/ %{_datadir}/icons/hicolor/64x64/apps/* %{_datadir}/pixmaps/zhu3d.png %{_datadir}/applications/zhu3d.desktop %changelog * Sun Jan 30 2011 siddharth Sharma - 4.2.2-2 - Fixes - Changelog fix 4.2.4 to 4.2.2 - URL Source fix - Default attributes in files were listed twice. - Used macros instead of full paths in some places * Sun Jan 9 2011 siddharth Sharma - 4.2.2-1 - Initial Release 1