diff --git a/.gitignore b/.gitignore index e69de29..5b69626 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +/love-extra.tar.xz +/rude-love-e0f98d53debb.tar.gz diff --git a/love-optional_mpg123.patch b/love-optional_mpg123.patch new file mode 100644 index 0000000..d122dc5 --- /dev/null +++ b/love-optional_mpg123.patch @@ -0,0 +1,92 @@ +Index: configure.in +=================================================================== +--- configure.in.orig ++++ configure.in +@@ -34,7 +34,7 @@ AC_SEARCH_LIBS([ilInit], [IL], [], AC_MS + AC_SEARCH_LIBS([FT_Load_Glyph], [freetype], [], AC_MSG_ERROR([Can't LÖVE without FreeType])) + AC_SEARCH_LIBS([PHYSFS_init], [physfs], [], AC_MSG_ERROR([Can't LÖVE without PhysicsFS])) + AC_SEARCH_LIBS([ModPlug_Load], [modplug], [], AC_MSG_ERROR([Can't LÖVE without ModPlug])) +-AC_SEARCH_LIBS([mpg123_open_feed], [mpg123], [], AC_MSG_ERROR([Can't LÖVE without Mpg123])) ++AC_SEARCH_LIBS([mpg123_open_feed], [mpg123], [AC_DEFINE([WITH_MPG123], [], [Description for mpg123])], AC_MSG_WARN([Mpg123 is not available])) + AC_SEARCH_LIBS([mpg123_seek_64], [mpg123], AC_SUBST([FILE_OFFSET],[-D_FILE_OFFSET_BITS=64]), AC_SUBST([FILE_OFFSET],[])) + AC_SEARCH_LIBS([ov_open], [vorbisfile], [], AC_MSG_ERROR([Can't LÖVE without VorbisFile])) + AC_ARG_ENABLE([headless], +Index: src/modules/sound/lullaby/Mpg123Decoder.cpp +=================================================================== +--- src/modules/sound/lullaby/Mpg123Decoder.cpp.orig ++++ src/modules/sound/lullaby/Mpg123Decoder.cpp +@@ -18,6 +18,10 @@ + * 3. This notice may not be removed or altered from any source distribution. + **/ + ++#include "../config.h" ++ ++#ifdef WITH_MPG123 ++ + #include "Mpg123Decoder.h" + + #include +@@ -227,3 +231,4 @@ namespace lullaby + } // lullaby + } // sound + } // love ++#endif +Index: src/modules/sound/lullaby/Mpg123Decoder.h +=================================================================== +--- src/modules/sound/lullaby/Mpg123Decoder.h.orig ++++ src/modules/sound/lullaby/Mpg123Decoder.h +@@ -17,7 +17,9 @@ + * misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source distribution. + **/ ++#include "../config.h" + ++#ifdef WITH_MPG123 + #ifndef LOVE_SOUND_LULLABY_LIBMPG123_DECODER_H + #define LOVE_SOUND_LULLABY_LIBMPG123_DECODER_H + +@@ -77,3 +79,4 @@ namespace lullaby + } // love + + #endif // LOVE_SOUND_LULLABY_LIBMPG123_DECODER_H ++#endif +Index: src/modules/sound/lullaby/Sound.cpp +=================================================================== +--- src/modules/sound/lullaby/Sound.cpp.orig ++++ src/modules/sound/lullaby/Sound.cpp +@@ -18,10 +18,14 @@ + * 3. This notice may not be removed or altered from any source distribution. + **/ + ++#include "../config.h" ++ + #include "Sound.h" + + #include "ModPlugDecoder.h" ++#ifdef WITH_MPG123 + #include "Mpg123Decoder.h" ++#endif + #include "VorbisDecoder.h" + //#include "FLACDecoder.h" + +@@ -37,7 +41,9 @@ namespace lullaby + + Sound::~Sound() + { ++ #ifdef WITH_MPG123 + Mpg123Decoder::quit(); ++ #endif + } + + const char * Sound::getName() const +@@ -55,8 +61,10 @@ namespace lullaby + // Find a suitable decoder here, and return it. + if (ModPlugDecoder::accepts(ext)) + decoder = new ModPlugDecoder(data, ext, bufferSize); ++ #ifdef WITH_MPG123 + else if (Mpg123Decoder::accepts(ext)) + decoder = new Mpg123Decoder(data, ext, bufferSize); ++ #endif + else if (VorbisDecoder::accepts(ext)) + decoder = new VorbisDecoder(data, ext, bufferSize); + /*else if (FLACDecoder::accepts(ext)) diff --git a/love.spec b/love.spec new file mode 100644 index 0000000..7e68d86 --- /dev/null +++ b/love.spec @@ -0,0 +1,102 @@ +Name: love +Version: 0.8.0 +Release: 1%{?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 +#Only available download link at the moment: +#https://bitbucket.org/rude/love/get/e0f98d53debb.tar.gz +Source0: rude-%{name}-e0f98d53debb.tar.gz +#Source1 currently only contains a custom man page: +#Upstream Bug: https://bitbucket.org/rude/love/issue/405/include-extras-desktop-mime-etc-files-for +Source1: %{name}-extra.tar.xz +#Patch0 makes the mpg123 requirement optional (modified for 0.8.0 from openSUSE) +#Upstream Bug: https://bitbucket.org/rude/love/issue/404/make-mpg123-optional +Patch0: %{name}-optional_mpg123.patch + +BuildRequires: DevIL-devel +BuildRequires: libtiff-devel +BuildRequires: freetype-devel +BuildRequires: lua-devel +BuildRequires: physfs-devel +BuildRequires: SDL-devel +BuildRequires: openal-soft-devel +BuildRequires: libogg-devel +BuildRequires: libvorbis-devel +BuildRequires: flac-devel +BuildRequires: libmodplug-devel +BuildRequires: libmng-devel +BuildRequires: desktop-file-utils +BuildRequires: libtool + +%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. + +%prep +%setup -q -a 1 -n rude-%{name}-e0f98d53debb +%patch0 +#Fixing line encoding: +sed -i 's/\r//' license.txt src/libraries/Box2D/*/*.* src/libraries/Box2D/*/*/*.* +#Fixing permissions: +chmod -x license.txt src/libraries/*/*/*.* src/libraries/Box2D/*/*/*.* + +%build +platform/unix/automagic +%configure --prefix=/usr +make + +%install +make install DESTDIR=%{buildroot} +#Install desktop, icons, and mime info: +desktop-file-install \ + --dir %{buildroot}%{_datadir}/applications \ + platform/unix/%{name}.desktop +install -p -D -m 0644 platform/unix/app.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg +install -p -D -m 0644 platform/unix/game.svg %{buildroot}/%{_datadir}/icons/hicolor/scalable/mimetypes/application-x-%{name}-game.svg +install -p -D -m 0644 platform/unix/%{name}.xml %{buildroot}%{_datadir}/mime/packages/%{name}.xml +install -p -D -m 0644 %{name}-extra/%{name}.1 %{buildroot}/%{_mandir}/man1/%{name}.1 + +%post +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : +/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || : +/usr/bin/update-desktop-database &> /dev/null || : + +%postun +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 || : +fi +/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || : +/usr/bin/update-desktop-database &> /dev/null || : + +%posttrans +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + +%files +%doc changes.txt license.txt readme.md +%{_bindir}/%{name} +%{_datadir}/icons/hicolor/scalable/*/*.svg +%{_datadir}/applications/%{name}.desktop +%{_datadir}/mime/packages/%{name}.xml +%{_mandir}/man1/%{name}.1* + +%changelog +* Tue Apr 3 2012 Jeremy Newton - 0.8.0-1 +- Updated spec for new upstream version + +* Wed Mar 28 2012 Jeremy Newton - 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 - 0.7.2-2 +- Added missing build dependencies + +* Tue Mar 6 2012 Jeremy Newton - 0.7.2-1 +- Initial Package diff --git a/sources b/sources index e69de29..2d24aab 100644 --- a/sources +++ b/sources @@ -0,0 +1,2 @@ +957ab083713a4b8a045f7d874fbfae20 love-extra.tar.xz +90026e3884c3c593b868f41cb62a0ab1 rude-love-e0f98d53debb.tar.gz