985473
Name:           wings
985473
Version:        0.98.32b
9aab90
Release:        10%{?dist}
985473
Summary:        3D Subdivision Modeler
985473
985473
Group:          Applications/Multimedia
985473
License:        Distributable
985473
URL:            http://www.wings3d.com
985473
Source0:	http://prdownloads.sourceforge.net/wings/wings-0.98.32b.tar.bz2
985473
Source1:	http://prdownloads.sourceforge.net/wings/wings3d_manual1.6.1.pdf
985473
Source2:	http://www.midcoast.com.au/~rgcoy/downloads/wingspov-0.98.28_v1.tgz
985473
Source3:	wings.png
985473
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
985473
BuildRequires:	erlang-esdl-devel
985473
BuildRequires:	libGL-devel
985473
BuildRequires:	libGLU-devel
985473
BuildRequires:  desktop-file-utils
985473
985473
%description
985473
Wings 3D is a subdivision modeler with an user interface that is easy
985473
to use for both beginners and advanced users (inspired by Nendo and
985473
Mirai from Izware). This package also includes the Povray exporter
985473
plug-in.
985473
985473
985473
%package docs
985473
Group:		Applications/Multimedia
985473
Summary:	Documentation for Wings 3D
985473
Requires:	%{name} = %{version}-%{release}
985473
985473
%description docs
985473
Documentation for Wings 3D.
985473
985473
9aab90
%package povray
9aab90
Group:		Applications/Multimedia
9aab90
Summary:	Povray import/export plug-in for Wings 3D
9aab90
Requires:	%{name} = %{version}-%{release}
9aab90
9aab90
%description povray
9aab90
Povray import/export plug-in for Wings 3D.
9aab90
Install this only if povray is actually installed.
9aab90
9aab90
985473
%prep
985473
%setup -q
985473
cp %{SOURCE1} .
985473
tar zxf %{SOURCE2}
985473
5b4cf8
%define erlangdir %{_libdir}/erlang-R10B
985473
985473
%build
985473
# %%{?_smp_mflags} breaks the build
5b4cf8
PATH=%{erlangdir}/bin:$PATH make
985473
985473
985473
%install
985473
%define wingsdir $RPM_BUILD_ROOT%{_libdir}/wings
985473
rm -rf $RPM_BUILD_ROOT
5b4cf8
985473
mkdir -p $RPM_BUILD_ROOT%{_bindir}
5b4cf8
mkdir -p %{wingsdir}/bin
5b4cf8
5b4cf8
# copy the wings binaries
5b4cf8
mkdir -p %{wingsdir}/lib
5b4cf8
mkdir -p %{wingsdir}/lib/wings-%{version}
5b4cf8
cp -rf ebin %{wingsdir}/lib/wings-%{version}
5b4cf8
cp -rf plugins %{wingsdir}/lib/wings-%{version}
5b4cf8
cp -rf fonts %{wingsdir}/lib/wings-%{version}
5b4cf8
5b4cf8
# copy the erlang kernel binaries
5b4cf8
cp -rf %{erlangdir}/lib/kernel* %{wingsdir}/lib
5b4cf8
rm -rf %{wingsdir}/lib/kernel*/{examples,include,src}
5b4cf8
5b4cf8
# copy the erlang stdlib binaries
5b4cf8
cp -rf %{erlangdir}/lib/stdlib* %{wingsdir}/lib
5b4cf8
rm -rf %{wingsdir}/lib/stdlib*/{examples,include,src}
5b4cf8
5b4cf8
# copy the esdl binaries
5b4cf8
cp -rf %{erlangdir}/lib/esdl* %{wingsdir}/lib
5b4cf8
rm -rf %{wingsdir}/lib/esdl*/{include,src,vsn}
5b4cf8
5b4cf8
# copy erlang binaries and scripts
5b4cf8
cp -f %{erlangdir}/erts*/bin/{beam,child_setup,erlexec,inet_gethost} %{wingsdir}/bin
5b4cf8
cp -f %{erlangdir}/bin/start.boot %{wingsdir}/bin
5b4cf8
985473
985473
find $RPM_BUILD_ROOT -name '.cvsignore' | xargs rm -rf
985473
find $RPM_BUILD_ROOT -name 'README' | xargs rm -f
985473
985473
cat > $RPM_BUILD_ROOT%{_bindir}/wings <
985473
#!/bin/sh
5b4cf8
ROOTDIR=%{_libdir}/wings
5b4cf8
BINDIR=\$ROOTDIR/bin
5b4cf8
EMU=beam
5b4cf8
PROGNAME=wings
5b4cf8
export ROOTDIR
5b4cf8
export BINDIR
5b4cf8
export EMU
5b4cf8
export PROGNAME
5b4cf8
exec \$BINDIR/erlexec -noinput -run wings_start start_halt \$*
985473
EOF
985473
chmod 755 $RPM_BUILD_ROOT%{_bindir}/wings
985473
985473
cat > wings.desktop <
985473
[Desktop Entry]
985473
Name=Wings 3D
985473
Comment=Wings 3D polygon mesh modeler
985473
Exec=wings
985473
Icon=wings.png
985473
Terminal=true
985473
Type=Application
985473
Encoding=UTF-8
985473
X-Desktop-File-Install-Version=0.9
985473
StartupNotify=true
985473
StartupWMClass=Wings 3D
985473
EOF
985473
985473
desktop-file-install --vendor fedora \
985473
    --add-category X-Fedora \
985473
    --add-category Application \
985473
    --add-category Graphics \
985473
    --dir $RPM_BUILD_ROOT%{_datadir}/applications \
985473
    wings.desktop
985473
985473
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
985473
cp %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/pixmaps
985473
985473
985473
%clean
985473
rm -rf $RPM_BUILD_ROOT
985473
985473
985473
%files
985473
%defattr(-,root,root,-)
985473
%{_bindir}/wings
985473
%{_libdir}/wings
985473
%{_datadir}/applications/*
985473
%{_datadir}/pixmaps/*
9aab90
%exclude %{_libdir}/wings/lib/wings-%{version}/plugins/import_export/kayos_utils.beam
9aab90
%exclude %{_libdir}/wings/lib/wings-%{version}/plugins/import_export/pov_exp.beam
9aab90
%exclude %{_libdir}/wings/lib/wings-%{version}/plugins/import_export/pov_ui.beam
9aab90
%exclude %{_libdir}/wings/lib/wings-%{version}/plugins/import_export/wpc_pov.beam
985473
%doc README license.terms AUTHORS
985473
985473
9aab90
%files povray
9aab90
%defattr(-,root,root,-)
9aab90
%{_libdir}/wings/lib/wings-%{version}/plugins/import_export/kayos_utils.beam
9aab90
%{_libdir}/wings/lib/wings-%{version}/plugins/import_export/pov_exp.beam
9aab90
%{_libdir}/wings/lib/wings-%{version}/plugins/import_export/pov_ui.beam
9aab90
%{_libdir}/wings/lib/wings-%{version}/plugins/import_export/wpc_pov.beam
9aab90
9aab90
985473
%files docs
985473
%defattr(-,root,root,-)
985473
%doc wings3d_manual1.6.1.pdf
985473
985473
985473
%changelog
9aab90
* Sun Dec 10 2006 Gerard Milmeister <gemi@bluewin.ch> - 0.98.32b-10
9aab90
- split off povray plug-in
9aab90
b4f6ff
* Mon Aug 28 2006 Gerard Milmeister <gemi@bluewin.ch> - 0.98.32b-9
b4f6ff
- Rebuild for FE6
b4f6ff
5b4cf8
* Wed Jun  7 2006 Gerard Milmeister <gemi@bluewin.ch> - 0.98.32b-8
5b4cf8
- revert to use erlang R10B
5b4cf8
a3f808
* Thu May 18 2006 Gerard Milmeister <gemi@bluewin.ch> - 0.98.32b-7
a3f808
- rebuilt for erlang R11B
a3f808
985473
* Thu Apr 27 2006 Gerard Milmeister <gemi@bluewin.ch> - 0.98.32b-5
985473
- split off docs package
985473
985473
* Tue Apr 25 2006 Gerard Milmeister <gemi@bluewin.ch> - 0.98.32b-3
985473
- build against erlang-esdl-devel
985473
985473
* Sun Dec 18 2005 Gerard Milmeister <gemi@bluewin.ch> - 0.98.32b-1
985473
- New Version 0.98.32b
985473
985473
* Sun Mar  6 2005 Gerard Milmeister <gemi@bluewin.ch> - 0.98.27b-1
985473
- New Version 0.98.27b
985473
985473
* Sun Feb 13 2005 Gerard Milmeister <gemi@bluewin.ch> - 0:0.98.27a-1
985473
- New Version 0.98.27a
985473
985473
* Mon Dec 27 2004 Gerard Milmeister <gemi@bluewin.ch> - 0:0.98.26-0.fdr.1.b
985473
- New Version 0.98.26b
985473
985473
* Sat Jul 17 2004 Gerard Milmeister <gemi@bluewin.ch> - 0:0.98.24-0.fdr.1
985473
- New Version 0.98.24
985473
985473
* Fri Jun  4 2004 Gerard Milmeister <gemi@bluewin.ch> - 0:0.98.23a-0.fdr.1
985473
- New Version 0.98.23a
985473
985473
* Thu May  6 2004 Gerard Milmeister <gemi@bluewin.ch> - 0:0.98.22c-0.fdr.1
985473
- New Version 0.98.22c
985473
985473
* Sun Apr 11 2004 Gerard Milmeister <gemi@bluewin.ch> - 0:0.98.20c-0.fdr.1
985473
- First Fedora release