Blob Blame History Raw
Name:      zhu3d
Version:   4.2.4
Release:   1%{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 
Patch00:    pri.patch
Patch01:    libglu.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}
%patch00 -p1 -b .pri
%patch01 -p1 -b .libglu
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 ; \
%{_qt4_qmake} -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
* Fri Mar 2 2012 siddvicious <siddharth.kde@gmail.com> - 4.2.4-1
- Package Update

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sun Jan 30 2011 siddharth Sharma <siddharths@fedoraproject.org> - 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 <siddharths@fedoraproject.org> - 4.2.2-1
  - Initial Release 1