Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > 0757470128f5f7bd55f692b4ea7ae7e4 > files > 4

wings3d-1.2-1mdv2010.1.src.rpm

%define oname wings
%define erlangdir %{_libdir}/erlang
%define wingsdir %{erlangdir}/lib/%{oname}-%{version}
%define esdldir %{erlangdir}/addons/esdl-1.0.1
%define esdl_ver 1.0.1

Summary: 	A 3D subdivision modeler
Name: 		wings3d
Version: 	1.2
Release: 	%mkrel 1
License: 	BSD-like
Group: 		Graphics
Url: 		http://www.wings3d.com
Source0: 	http://prdownloads.sourceforge.net/wings/%{oname}-%{version}.tar.bz2
Source1:   	%{name}.png
Source2:	%{name}_manual1.6.1.pdf
Source3:	wingspov-0.98.28_v1.tgz
Patch2:		%{oname}-1.1.12-plugins_src-makefile.patch
BuildRequires:	erlang-compiler
BuildRequires:	erlang-esdl-devel >= %{esdl_ver}
BuildRequires:	erlang-xmerl
BuildRequires:	imagemagick
BuildRequires:	libjpeg-devel
Requires:	erlang-esdl >= %{esdl_ver}
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
Wings 3D is a free and open source polygon mesh subdivision 
modeller inspired by Nendo and Mirai from Izware, all using 
the winged edge data structure.Wings 3D is ideally suited for 
modeling and texturing low to medium density polygon meshes. 
It has a wide range of very effective tools optimised for these 
tasks hidden behind its 'minimalistic' interface.

%package povray
Summary:	Povray import/export plug-in for Wings 3D
Group:		Graphics
Requires:	%{name} = %{version}-%{release}
Requires:	povray

%description povray
Povray import/export plug-in for Wings 3D.

%prep
%setup -qn %{oname}-%{version}
%patch2 -p1

tar xf %{SOURCE3}

%build
export CFLAGS="%{optflags}"
export PATH=%{erlangdir}/bin:$PATH
export ESDL_PATH=%{esdldir}

%make -j4

%install
rm -rf %{buildroot}

install -d -m 755 %{buildroot}/%{wingsdir}
cat %{SOURCE2} > ./%{name}_manual1.6.1.pdf

# remove unneeded files
rm -rf src/*.erl

# install files, also those missing
mv -f ebin %{buildroot}/%{wingsdir}
mv -f fonts_src/*.beam %{buildroot}/%{wingsdir}/ebin/
mv -f icons/*.beam %{buildroot}/%{wingsdir}/ebin/
mv -f intl_tools/*.beam %{buildroot}/%{wingsdir}/ebin/
mv -f fonts %{buildroot}/%{wingsdir}
mv -f plugins %{buildroot}/%{wingsdir}
mv -f plugins_src/commands/*.lang %{buildroot}/%{wingsdir}/plugins/commands/
mv -f plugins_src/import_export/*.lang %{buildroot}/%{wingsdir}/plugins/import_export/
mv -f plugins_src/primitives/*.lang %{buildroot}/%{wingsdir}/plugins/primitives/
mv -f plugins_src/*.lang %{buildroot}/%{wingsdir}/plugins/
mv -f src %{buildroot}/%{wingsdir}
mv -f vsn.mk %{buildroot}/%{wingsdir}

# executable script
install -d -m 755 %{buildroot}/%{_bindir}

cat > %{buildroot}/%{_bindir}/%{name} << "EOF"
#!/bin/sh
export ESDL_PATH=%{esdldir}
erl -pa $ESDL_PATH/ebin %{wingsdir}/ebin -noinput -smp disable -run wings_start start_halt "$@"
EOF

# icons
install -d %{buildroot}%{_iconsdir}/hicolor/{16x16,32x32,48x48}/apps
convert %{SOURCE1} -size 16x16 %{buildroot}%{_iconsdir}/hicolor/16x16/apps/%{name}.png
convert %{SOURCE1} -size 32x32 %{buildroot}%{_iconsdir}/hicolor/32x32/apps/%{name}.png
convert %{SOURCE1} -size 48x48 %{buildroot}%{_iconsdir}/hicolor/48x48/apps/%{name}.png

# menu
mkdir -p %{buildroot}%{_datadir}/applications
cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF
[Desktop Entry]
Name=Wings 3D
Comment=%{summary}
Exec=%{_bindir}/%{name}
Icon=%{name}
Terminal=false
Type=Application
StartupNotify=true
Categories=Graphics;3DGraphics;
EOF

%if %mdkversion < 200900
%post
%{update_menus}
%update_icon_cache hicolor
%endif

%if %mdkversion < 200900
%postun
%{clean_menus}
%clean_icon_cache hicolor
%endif

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc AUTHORS license.terms README
%doc *.pdf NOTES-*
%attr(755,root,root) %{_bindir}/*
%{wingsdir}
%{_iconsdir}/hicolor/*/apps/%{name}.png
%{_datadir}/applications/*.desktop
%exclude %{wingsdir}/plugins/import_export/kayos_utils.beam
%exclude %{wingsdir}/plugins/import_export/pov_exp.beam
%exclude %{wingsdir}/plugins/import_export/pov_ui.beam
%exclude %{wingsdir}/plugins/import_export/wpc_pov.beam

%files povray
%defattr(644,root,root,755)
%{wingsdir}/plugins/import_export/kayos_utils.beam
%{wingsdir}/plugins/import_export/pov_exp.beam
%{wingsdir}/plugins/import_export/pov_ui.beam
%{wingsdir}/plugins/import_export/wpc_pov.beam


%changelog
* Thu Feb 04 2010 Tomasz Pawel Gajc <tpg@mandriva.org> 1.2-1mdv2010.1
+ Revision: 501003
- add buildrequires on erlang-xmerl
- fix setup
- update to new version 1.2
- update to new version 1.2.rc1
- update to new version 1.1.14

* Sun Aug 30 2009 Tomasz Pawel Gajc <tpg@mandriva.org> 1.1.12-1mdv2010.0
+ Revision: 422698
- update to new version 1.1.12
- drop patch0
- rediff patch2

* Wed Jun 17 2009 Tomasz Pawel Gajc <tpg@mandriva.org> 1.0.1-2mdv2010.0
+ Revision: 386843
- Patch2: compile jpeg plugin with -fPIC
- limit max jobs to 4 while compiling
- rebuild for new erlang
- update to new version 1.0.1
- Patch2: rediff
- fix file list

* Mon Dec 08 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 0.99.53-1mdv2009.1
+ Revision: 311925
- update to new version 0.99.53

* Mon Nov 24 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 0.99.52-1mdv2009.1
+ Revision: 306400
- update to new version 0.99.52

* Tue Nov 11 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 0.99.50-1mdv2009.1
+ Revision: 302127
- update to new version 0.99.50

* Tue Nov 04 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 0.99.06-1mdv2009.1
+ Revision: 299659
- update to new version 0.99.06

* Tue Oct 21 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 0.99.05-1mdv2009.1
+ Revision: 296177
- update to new version 0.99.05

* Mon Oct 13 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 0.99.04a-1mdv2009.1
+ Revision: 293415
- update to new version 0.99.04a

* Fri Oct 10 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 0.99.04-1mdv2009.1
+ Revision: 291583
- update to new version 0.99.04

* Mon Jun 16 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 0.99.03-1mdv2009.0
+ Revision: 219401
- update to new version 0.99.03

  + Pixel <pixel@mandriva.com>
    - rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas

* Thu Mar 13 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 0.99.02-1mdv2008.1
+ Revision: 187503
- new version

* Thu Feb 28 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 0.99.01-2mdv2008.1
+ Revision: 176226
- rebuild for new erlang

  + Thierry Vignaud <tvignaud@mandriva.com>
    - fix no-buildroot-tag

* Sat Jan 26 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 0.99.01-1mdv2008.1
+ Revision: 158474
- export esdl path, patch 1 is not needed any more
- rediff patch 0 and 2
- new version

* Wed Jan 09 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 0.99.00b-2mdv2008.1
+ Revision: 146970
- fix executable script

* Tue Jan 08 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 0.99.00b-1mdv2008.1
+ Revision: 146760
- fix broken include with patch 1
- enable compiling fonts and jpeg support with patch 2
- do not run wings with smp support, as this causes random crashes
- buildrequire libjpeg-devel
- do not package doc files twice
- new version

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request

* Thu Dec 13 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 0.98.36-5mdv2008.1
+ Revision: 119177
- rebuild against new erlang

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill explicit icon extension
    - kill desktop-file-validate's 'warning: key "Encoding" in group "Desktop Entry" is deprecated'

* Wed Jun 20 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 0.98.36-3mdv2008.0
+ Revision: 41729
- update summary and description
- add povray export plugin
- compile with %%optflags accel plugin
- install only necessary files to run wings3d
- add menu entry
- icons are now in fd.o compiliant directory

* Wed May 02 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 0.98.36-2mdv2008.0
+ Revision: 20640
- fix buildrequires
- update url
- add requires on erlang-esdl

* Tue May 01 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 0.98.36-1mdv2008.0
+ Revision: 20029
- set build requires on imagemagick
- fix path
- Import wings3d