905788
%global realname wings
905788
%global upstream dgud
0f7e7c
%global git_tag 9a2473e
905788
%global patchnumber 0
bf9527
%{?filter_setup:
bf9527
%filter_provides_in %{_libdir}/erlang/lib/.*\.so$
bf9527
%filter_setup
bf9527
}
bf9527
%{expand: %(NIF_VER=`rpm -q erlang-erts --provides | grep --color=no erl_nif_version` ; if [ "$NIF_VER" != "" ]; then echo %%global __erlang_nif_version $NIF_VER ; fi)}
bf9527
%{expand: %(DRV_VER=`rpm -q erlang-erts --provides | grep --color=no erl_drv_version` ; if [ "$DRV_VER" != "" ]; then echo %%global __erlang_drv_version $DRV_VER ; fi)}
905788
905788
905788
%global wingsdir $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{name}-%{version}
bf9527
%global esdldir `%{_libdir}/erlang/bin/erl -noshell -eval 'io:format("~s", [code:lib_dir(esdl)]), halt().'`
905788
c4ae78
985473
Name:           wings
0f7e7c
Version:        1.4.1
2f93df
Release:        6.git%{git_tag}%{?dist}
985473
Summary:        3D Subdivision Modeler
985473
985473
Group:          Applications/Multimedia
2adb32
License:        MIT
985473
URL:            http://www.wings3d.com
0f7e7c
# wget --content-disposition https://github.com/dgud/wings/tarball/9a2473e
905788
Source0:	%{upstream}-%{realname}-%{git_tag}.tar.gz
985473
Source1:	http://prdownloads.sourceforge.net/wings/wings3d_manual1.6.1.pdf
c4ae78
Source2:	wings.sh
985473
Source3:	wings.png
c4ae78
Source4:	wings.desktop
905788
# Fedora/EPEL specific patch
905788
# No erlang-cl for now - see https://github.com/tonyrog/cl
0f7e7c
Patch1:		wings-0001-No-Erlang-OpenCL-support-for-now.patch
905788
# backported from upstream
905788
Patch2:		wings-0002-No-such-function-lists-delete_nth-2.patch
905788
# Will be proposed for inclusion to upstream
905788
Patch3:		wings-0003-Fix-SDL-includes.patch
905788
# backported from upstream
905788
Patch4:		wings-0004-Simplify-font-handling-and-stop-using-parameterized-.patch
bf9527
# Fedora/EPEL specific patch
bf9527
Patch5:		wings-0005-Don-t-try-to-build-installer.patch
bf9527
# Fedora/EPEL specific patch
bf9527
Patch6:		wings-0006-Respect-CFLAGS.patch
c4ae78
BuildRequires:	erlang
c4ae78
BuildRequires:	erlang-esdl
985473
BuildRequires:	libGL-devel
985473
BuildRequires:	libGLU-devel
985473
BuildRequires:  desktop-file-utils
0f7e7c
BuildRequires:	libjpeg-devel
c4ae78
79d1d8
Provides:       wings-povray = %{version}-%{release}
79d1d8
Obsoletes:      wings-povray
985473
905788
Requires:	erlang-dialyzer%{?_isa}
905788
Requires:	erlang-erts%{?_isa}
905788
Requires:	erlang-esdl%{?_isa}
905788
Requires:	erlang-kernel%{?_isa}
905788
Requires:	erlang-stdlib%{?_isa}
905788
Requires:	erlang-tools%{?_isa}
905788
Requires:	erlang-wx%{?_isa}
bf9527
%{?__erlang_drv_version:Requires: %{__erlang_drv_version}}
c4ae78
c4ae78
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
b23b55
Mirai from Izware).
985473
985473
985473
%package docs
985473
Group:		Applications/Multimedia
985473
Summary:	Documentation for Wings 3D
c4ae78
985473
985473
%description docs
985473
Documentation for Wings 3D.
985473
985473
985473
%prep
905788
%setup -q -n %{upstream}-%{name}-%{git_tag}
985473
cp %{SOURCE1} .
c4ae78
cp %{SOURCE2} .
c4ae78
cp %{SOURCE4} .
c28de5
sed -i -e "s,%LIBDIR%,%{_libdir},g" wings.sh
905788
%patch1 -p1 -b .no_opencl
905788
%patch2 -p1 -b .no_lists_delete_nth
905788
%patch3 -p1 -b .fix_SDL_includes
905788
%patch4 -p1 -b .R16B
bf9527
%patch5 -p1 -b .no_installer
bf9527
%patch6 -p1 -b .respect_cflags
0f7e7c
# Add version info
0f7e7c
echo %{version}.git%{git_tag} > ./version
985473
985473
985473
%build
985473
# %%{?_smp_mflags} breaks the build
bf9527
CFLAGS="%{optflags}" ESDL_PATH="%{esdldir}" make unix
985473
985473
985473
%install
c4ae78
# Install the wings binaries
c4ae78
mkdir -p %{wingsdir}/plugins/default
c4ae78
cp -rf ebin %{wingsdir}
c4ae78
cp -rf fonts %{wingsdir}
c4ae78
cp -rf textures %{wingsdir}
c4ae78
cp -rf shaders %{wingsdir}
c4ae78
cp -rf plugins/* %{wingsdir}/plugins/default
c4ae78
cp -rf fonts %{wingsdir}
905788
cp intl_tools/tools.beam %{wingsdir}/ebin
5b4cf8
bf9527
# see - https://bugzilla.redhat.com/664148
2f93df
rm -f %{wingsdir}/ebin/user_default.beam
bf9527
985473
find $RPM_BUILD_ROOT -name 'README' | xargs rm -f
23bb85
find $RPM_BUILD_ROOT -name '*.txt' | xargs chmod 0644
23bb85
find $RPM_BUILD_ROOT -name '*.auv' | xargs chmod 0644
23bb85
find $RPM_BUILD_ROOT -name '*.fs' | xargs chmod 0644
23bb85
find $RPM_BUILD_ROOT -name '*.vs' | xargs chmod 0644
985473
c4ae78
# Install main startup script
c4ae78
install -D -p -m 0755 wings.sh $RPM_BUILD_ROOT%{_bindir}/wings
985473
c4ae78
# Install icon
c4ae78
install -D -p -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/pixmaps/wings.png
c4ae78
c4ae78
# Install desktop entry
Parag Nemade 2bed2f
desktop-file-install  \
985473
    --add-category Graphics \
985473
    --dir $RPM_BUILD_ROOT%{_datadir}/applications \
985473
    wings.desktop
985473
985473
985473
%files
985473
%{_bindir}/wings
c4ae78
%{_libdir}/erlang/lib/%{name}-%{version}
985473
%{_datadir}/applications/*
985473
%{_datadir}/pixmaps/*
0f7e7c
%doc AUTHORS NOTES-1.0 NOTES-1.1 NOTES-1.2 NOTES-1.3 NOTES-1.4 NOTES-1.4.1 OLD-NOTES README README.jp license.terms
985473
985473
985473
%files docs
985473
%doc wings3d_manual1.6.1.pdf
985473
985473
985473
%changelog
2f93df
* Fri Mar 22 2013 Peter Lemenkov <lemenkov@gmail.com> - 1.4.1-6.git9a2473e
2f93df
- Actually remove user_default.beam file from distribution (see rhbz #664148).
2f93df
bf9527
* Fri Mar 22 2013 Peter Lemenkov <lemenkov@gmail.com> - 1.4.1-5.git9a2473e
bf9527
- Added localizations (closes rhbz #698630).
bf9527
- Added requires on Erlang driver's API version
bf9527
- Remove user_defaults.beam file from distribution (see rhbz #664148).
bf9527
905788
* Fri Mar 15 2013 Peter Lemenkov <lemenkov@gmail.com> - 1.4.1-4.git9a2473e
905788
- Fixed missing function
905788
- Cleaned up spec-file
905788
Parag Nemade 2bed2f
* Sat Feb 09 2013 Parag Nemade <paragn at="" fedoraproject="" dot="" org=""> - 1.4.1-3.git9a2473e
Parag Nemade 2bed2f
- Remove vendor tag from desktop file as per https://fedorahosted.org/fesco/ticket/1077
Parag Nemade 2bed2f
- Cleanup spec as per recently changed packaging guidelines
Parag Nemade 2bed2f
4684f6
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.1-2.git9a2473e
4684f6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
4684f6
0f7e7c
* Thu May 10 2012 Peter Lemenkov <lemenkov@gmail.com> - 1.4.1-1.git9a2473e
0f7e7c
- Ver. 1.4.1.git9a2473e (post-release shapshot for 1.4.1)
0f7e7c
a6c3f9
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-5
a6c3f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
a6c3f9
31a4e7
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-4
31a4e7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
31a4e7
be4117
* Thu Dec  9 2010 Peter Lemenkov <lemenkov@gmail.com> - 1.2.0-3
be4117
- Explicitly use erl installed into /usr/bin
be4117
c28de5
* Tue Nov 16 2010 Peter Lemenkov <lemenkov@gmail.com> - 1.2.0-2
c28de5
- Drop erlang-wx dependency
c28de5
- Fixed startup failure (rhbz #653720)
c28de5
c4ae78
* Mon Jul 12 2010 Peter Lemenkov <lemenkov@gmail.com> - 1.2.0-1
c4ae78
- Ver. 1.2.0
c4ae78
- Docs subpackage no longer requires main package
c4ae78
23bb85
* Tue Aug 11 2009 Gerard Milmeister <gemi@bluewin.ch> - 1.0.1-1
23bb85
- new release 1.0.1
23bb85
79f7b5
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99.05-4
79f7b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
79f7b5
4add74
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99.05-3
4add74
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
4add74
28aee0
* Thu Oct 30 2008 Gerard Milmeister <gemi@bluewin.ch> - 0.99.05-2
28aee0
- new release 0.99.05
28aee0
2adb32
* Sat Sep  6 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.99.02-2
2adb32
- fix license tag
2adb32
79d1d8
* Thu Mar 27 2008 Gerard Milmeister <gemi@bluewin.ch> - 0.99.02-1
79d1d8
- new releae 0.99.02
c64109
b23b55
* Sun Apr  8 2007 Gerard Milmeister <gemi@bluewin.ch> - 0.98.36-1
b23b55
- new version 0.98.36
b23b55
870d60
* Thu Feb 15 2007 Gerard Milmeister <gemi@bluewin.ch> - 0.98.32b-11
870d60
- add optflags (bugzilla 228925)
870d60
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