diff --git a/.cvsignore b/.cvsignore index e69de29..765a611 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +apricots-0.2.6.tar.gz diff --git a/apricots-0.2.6-alut-apricots.patch b/apricots-0.2.6-alut-apricots.patch new file mode 100644 index 0000000..bb6204d --- /dev/null +++ b/apricots-0.2.6-alut-apricots.patch @@ -0,0 +1,10 @@ +--- apricots/apricots.cpp 2008-08-26 12:38:27.000000000 -0500 ++++ apricots/apricots.cpp 2008-08-26 12:38:27.000000000 -0500 +@@ -16,6 +16,7 @@ + int main(int, char**){ + #endif + ++atexit(SDL_Quit); + // Initialize data + gamedata g; + init_data(g); diff --git a/apricots-0.2.6-alut-configure.patch b/apricots-0.2.6-alut-configure.patch new file mode 100644 index 0000000..6f204ba --- /dev/null +++ b/apricots-0.2.6-alut-configure.patch @@ -0,0 +1,13 @@ +--- configure.in 2008-08-26 12:40:55.000000000 -0500 ++++ configure.in 2008-08-26 12:40:55.000000000 -0500 +@@ -100,7 +100,9 @@ + + dnl Check for OpenAL + AC_CHECK_HEADER(AL/al.h,[CXXFLAGS="$CXXFLAGS -DAP_AUDIO_OPENAL"]) +-AC_CHECK_LIB( openal, alutInit) ++dnl AC_CHECK_LIB( openal, alutInit) ++AC_CHECK_LIB( openal, alGetError) ++AC_CHECK_LIB( alut, alutInit) + + KDE_CHECK_EXTRA_LIBS + all_libraries="$all_libraries $USER_LDFLAGS" diff --git a/apricots-0.2.6-alut-sampleio.patch b/apricots-0.2.6-alut-sampleio.patch new file mode 100644 index 0000000..02fc5d8 --- /dev/null +++ b/apricots-0.2.6-alut-sampleio.patch @@ -0,0 +1,50 @@ +--- apricots/sampleio.cpp 2008-08-26 12:40:09.000000000 -0500 ++++ apricots/sampleio.cpp 2008-08-26 12:40:09.000000000 -0500 +@@ -74,12 +74,12 @@ + alListenerfv(AL_ORIENTATION, front ); + + // Load in samples +- ALvoid* data = malloc(5 * (512 * 3) * 1024); ++ //ALvoid* data = malloc(5 * (512 * 3) * 1024); + alGenBuffers(numsamples, samples); + + for (int i = 0; i < numsamples; i++){ +- ALsizei freq; +- ALboolean fileok; ++ //ALsizei freq; ++ //ALboolean fileok; + // Evil OpenAL portability fix done here + #ifdef _WIN32 + ALenum format; +@@ -87,15 +87,17 @@ + alutLoadWAVFile(filenames[i],&format,&data,&filelen,&freq,&trash); + fileok = (alGetError() == AL_NO_ERROR); + #else +- ALsizei format; +- ALsizei trash; +- fileok = alutLoadWAV(filenames[i],&data,&format,&filelen,&trash,&freq); ++ //ALsizei format; ++ //ALsizei trash; ++ //fileok = alutLoadWAV(filenames[i],&data,&format,&filelen,&trash,&freq); ++ samples[i] = alutCreateBufferFromFile(filenames[i]); + #endif +- if (!fileok){ ++ //if (!fileok){ ++ if (samples[i] == AL_NONE){ + cerr << "sampleio: could not open " << filenames[i] << endl; + exit(1); + } +- alBufferData(samples[i], format, data, filelen, freq); ++ //alBufferData(samples[i], format, data, filelen, freq); + } + + // Generate Sources +@@ -107,7 +109,7 @@ + alSourcefv(sources[j], AL_ORIENTATION, back ); + } + +- free(data); ++ //free(data); + + } + diff --git a/apricots-0.2.6-path.patch b/apricots-0.2.6-path.patch new file mode 100644 index 0000000..e8e2958 --- /dev/null +++ b/apricots-0.2.6-path.patch @@ -0,0 +1,11 @@ +--- configure.in 2008-08-26 12:58:47.000000000 -0500 ++++ configure.in 2008-08-26 12:58:47.000000000 -0500 +@@ -44,7 +44,7 @@ + dnl + unset CDPATH + dnl make /usr/local the default for the installation +-AC_PREFIX_DEFAULT(/usr/local) ++AC_PREFIX_DEFAULT(/usr) + + if test "x$prefix" = "xNONE"; then + prefix=$ac_default_prefix diff --git a/apricots.desktop b/apricots.desktop new file mode 100644 index 0000000..05d0875 --- /dev/null +++ b/apricots.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Apricots +GenericName=Apricots +Comment=2D air combat game +Exec=apricots +Icon=apricots +Terminal=false +StartupNotify=false +Type=Application +Categories=Game;ArcadeGame; diff --git a/apricots.png b/apricots.png new file mode 100644 index 0000000..2aeac7d Binary files /dev/null and b/apricots.png differ diff --git a/apricots.spec b/apricots.spec new file mode 100644 index 0000000..1f95056 --- /dev/null +++ b/apricots.spec @@ -0,0 +1,107 @@ +%define apricotsdir %{_datadir}/apricots +Name: apricots +Version: 0.2.6 +Release: 2%{?dist} +Summary: 2D air combat game + +Group: Amusements/Games +License: GPLv2 +URL: http://www.fishies.org.uk/apricots.html +Source0: http://www.fishies.org.uk/apricots-%{version}.tar.gz +Source1: apricots.png +#Icon created from screenshot on website +Source2: apricots.desktop +Patch0: apricots-0.2.6-alut-apricots.patch +Patch1: apricots-0.2.6-alut-sampleio.patch +Patch2: apricots-0.2.6-alut-configure.patch +# alut patches sent upstream. +Patch3: apricots-0.2.6-path.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root%(%{__id_u} -n) +BuildRequires: SDL-devel +BuildRequires: freealut-devel +BuildRequires: desktop-file-utils + + +%description +It's a game where you fly a little plane around the screen and +shoot things and drop bombs on enemy targets, and it's meant to be quick +and fun. + +%prep +%setup -q + +chmod -x apricots/*.cpp +chmod -x apricots/*.h +chmod -x AUTHORS +chmod -x ChangeLog +chmod -x COPYING +chmod -x README +chmod -x TODO + +%patch0 -p0 +%patch1 -p0 +%patch2 -p0 +%patch3 -p0 + + +%build +%configure +make + + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{_bindir} +install -m 755 apricots/apricots %{buildroot}%{_bindir} +mkdir -p %{buildroot}%{_datadir}/apricots +install -m 644 apricots/*.wav %{buildroot}%{_datadir}/apricots +mkdir -p %{buildroot}%{_sysconfdir} +install -m 644 apricots/apricots.cfg %{buildroot}%{_sysconfdir} +ln -s ../../..%{_sysconfdir}/apricots.cfg %{buildroot}%{_datadir}/apricots/apricots.cfg +install -m 644 apricots/*.psf %{buildroot}%{_datadir}/apricots +install -m 644 apricots/*.shapes %{buildroot}%{_datadir}/apricots + +mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications +desktop-file-install --vendor fedora \ + --dir $RPM_BUILD_ROOT%{_datadir}/applications \ + %{SOURCE2} + +mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/apps +install -p -m 644 %{SOURCE1} \ + $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/apps + + +%post +touch --no-create %{_datadir}/icons/hicolor || : +if [ -x %{_bindir}/gtk-update-icon-cache ]; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : +fi + + +%postun +touch --no-create %{_datadir}/icons/hicolor || : +if [ -x %{_bindir}/gtk-update-icon-cache ]; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : +fi + + +%clean +rm -rf %{buildroot} + + +%files +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING README TODO +%{_bindir}/apricots +%{_datadir}/apricots +%{_datadir}/applications/fedora-apricots.desktop +%{_datadir}/icons/hicolor/24x24/apps/apricots.png +%config(noreplace) %{_sysconfdir}/apricots.cfg + + +%changelog +* Tue Sep 09 2008 Jon Ciesla - 0.2.6-2 +- Re-base off of pristine tarball, md5 error in review. + +* Tue Aug 26 2008 Jon Ciesla - 0.2.6-1 +- Initial packaging. diff --git a/sources b/sources index e69de29..6389472 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +910828d717e46d8cbd9c24f702d09fbc apricots-0.2.6.tar.gz