Blob Blame History Raw
# Because of the LuaJIT requirements:
%ifarch %{arm} %{ix86} x86_64 %{mips} aarch64
%global luadep luajit
%else
%global luadep lua
%endif

Name:           love
Version:        0.10.2
Release:        2%{?dist}
Summary:        A free 2D game engine which enables easy game creation in Lua

#All is licensed as zlib with one exception:
#SOURCE/platform/unix/ltmain.sh is public domain
License:        zlib and Public Domain
URL:            http://love2d.org
Source0:        https://bitbucket.org/rude/%{name}/get/%{version}.tar.gz

BuildRequires:  desktop-file-utils
BuildRequires:  DevIL-devel
BuildRequires:  flac-devel
BuildRequires:  freetype-devel
BuildRequires:  mesa-libGL
BuildRequires:  libmodplug-devel
BuildRequires:  libmng-devel
BuildRequires:  libogg-devel
BuildRequires:  libtheora-devel
BuildRequires:  libtiff-devel
BuildRequires:  libtool
BuildRequires:  libvorbis-devel
BuildRequires:  %{luadep}-devel
BuildRequires:  openal-soft-devel
BuildRequires:  physfs-devel
BuildRequires:  SDL2-devel
Requires:       lib%{name}%{?_isa} = %{version}-%{release}
Requires:       hicolor-icon-theme

#The following is bundled.
#Upstream will not unbundle this code as the
#code has been modified to work better with love
#As well, it's not clear if it would be worth unbundling
#See below for the correspondence:
#https://bitbucket.org/rude/love/issues/870/allow-for-shared-version-of-libraries
Provides: bundled(Box2D) = 2.3.0
#Note, Unknown versions:
Provides: bundled(enet)
Provides: bundled(luasocket)

%description
LOVE is an open source, cross platform 2D game engine which uses the
Lua scripting language. LOVE can be used to make games of any license
allowing it to be used for both free and non-free projects.

%package -n lib%{name}
Summary:        Library for Love, A free 2D game engine

%description -n lib%{name}
This package includes the library files for LOVE.
LOVE is an open source, cross platform 2D game engine which uses the
Lua scripting language. LOVE can be used to make games of any license
allowing it to be used for both free and non-free projects.

%prep
%setup -q -n rude-%{name}-afc69c4f7145
#Fixing line encoding:
sed -i 's/\r//' license.txt
#Fixing permissions:
chmod -x src/*/*/*.* src/libraries/Box2D/*/*.* src/libraries/Box2D/*/*/*.*

%build
platform/unix/automagic
%configure  --prefix=/usr --with-lua=%{luadep} \
            --disable-mpg123 --enable-static=no
make %{?_smp_mflags}
 
%install
make %{?_smp_mflags} install DESTDIR=%{buildroot}
#Check Desktop file
desktop-file-validate \
  %{buildroot}%{_datadir}/applications/%{name}.desktop
#This seems to be built, despite disabling static libraries
rm -f %{buildroot}%{_libdir}/lib%{name}.la

%post
/sbin/ldconfig
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
/bin/touch --no-create %{_datadir}/mime/packages &> /dev/null || :
/usr/bin/update-desktop-database &> /dev/null || :

%postun
/sbin/ldconfig
if [ $1 -eq 0 ] ; then
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
    /bin/touch --no-create %{_datadir}/mime/packages &> /dev/null || :
    /usr/bin/update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
fi
/usr/bin/update-desktop-database &> /dev/null || :
 
%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :

%post -n lib%{name} -p /sbin/ldconfig

%postun -n lib%{name} -p /sbin/ldconfig

%files
%doc changes.txt license.txt readme.md
%{_bindir}/%{name}
%{_datadir}/pixmaps/%{name}.svg
%{_datadir}/icons/hicolor/scalable/mimetypes/application-x-%{name}-game.svg
%{_datadir}/applications/%{name}.desktop
%{_datadir}/mime/packages/%{name}.xml
%{_mandir}/man1/%{name}.*

%files -n lib%{name}
%doc changes.txt license.txt readme.md
#Note that liblove.so is just a symlink, so a devel package is useless
%{_libdir}/lib%{name}.*

%changelog
* Tue Nov 8 2016 Jeremy Newton <alexjnewt AT hotmail DOT com> - 0.10.2-2
- Add mips and aarch64 as supported by luajit

* Mon Nov 7 2016 Jeremy Newton <alexjnewt AT hotmail DOT com> - 0.10.2-1
- Update to new version
- Use lua instead lua-git on unsupported platforms

* Fri Sep 16 2016 Peter Robinson <pbrobinson@fedoraproject.org> 0.10.1-3
- LuaJIT on aarch64 for 2.1.0 and later

* Mon Aug 29 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.10.1-2
- Rebuild for LuaJIT 2.1.0

* Sun Aug 21 2016 Jeremy Newton <alexjnewt AT hotmail DOT com> - 0.10.1-1
- Update to new version

* Sat Aug 20 2016 Peter Robinson <pbrobinson@fedoraproject.org> 0.10.0-3
- Make exclusive arch to those supported by LuaJIT

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Jan 1 2016 Jeremy Newton <alexjnewt AT hotmail DOT com> - 0.10.0-1
- Update to new version
- Update provides to include bundling

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Mon May 11 2015 Jeremy Newton <alexjnewt AT hotmail DOT com> - 0.9.2-1
- Update to 0.9.2

* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.9.1-2
- Rebuilt for GCC 5 C++11 ABI change

* Wed Nov 12 2014 Jeremy Newton <alexjnewt AT hotmail DOT com> - 0.9.1-1
- Update to 0.9.1

* Mon Aug 18 2014 Rex Dieter <rdieter@fedoraproject.org> 0.9.0-5
- update mime scriptlets

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Jan 5 2014 Jeremy Newton <alexjnewt AT hotmail DOT com> - 0.9.0-2
- Use repo version, fixes opengl issue

* Wed Jan 1 2014 Jeremy Newton <alexjnewt AT hotmail DOT com> - 0.9.0-1
- New upstream 0.9.0
- Removed all patches/sources (all fixed in 0.9.0)
- Add disable-mpg123 flag and enable-static=no
- Split into 2 packages, love and liblove

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Tue Apr 3 2012 Jeremy Newton <alexjnewt AT hotmail DOT com> - 0.8.0-2
- Fixed a typo in the manpage
- Fixed minor typo in files

* Tue Apr 3 2012 Jeremy Newton <alexjnewt AT hotmail DOT com> - 0.8.0-1
- Updated spec for new upstream version

* Wed Mar 28 2012 Jeremy Newton <alexjnewt AT hotmail DOT com> - 0.7.2-3
- Added man page
- Made more use of the name macro
- Removed unnecessary build flags
- Fixed typo in changelog

* Tue Mar 27 2012 Jeremy Newton <alexjnewt AT hotmail DOT com> - 0.7.2-2
- Added missing build dependencies

* Tue Mar 6 2012 Jeremy Newton <alexjnewt AT hotmail DOT com> - 0.7.2-1
- Initial Package