e51bf28
%define apricotsdir %{_datadir}/apricots
e51bf28
Name: apricots
e51bf28
Version:  0.2.6
1824fac
Release:  8%{?dist}
e51bf28
Summary: 2D air combat game
e51bf28
e51bf28
Group: Amusements/Games
e51bf28
License: GPLv2
e51bf28
URL: http://www.fishies.org.uk/apricots.html
e51bf28
Source0: http://www.fishies.org.uk/apricots-%{version}.tar.gz       
e51bf28
Source1: apricots.png
e51bf28
#Icon created from screenshot on website
e51bf28
Source2: apricots.desktop
e51bf28
Patch0: apricots-0.2.6-alut-apricots.patch
e51bf28
Patch1: apricots-0.2.6-alut-sampleio.patch
e51bf28
Patch2: apricots-0.2.6-alut-configure.patch
e51bf28
# alut patches sent upstream.
e51bf28
Patch3: apricots-0.2.6-path.patch
44e6a34
Patch4: apricots-0.2.6-alincludes.patch
e51bf28
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root%(%{__id_u} -n)
e51bf28
BuildRequires: SDL-devel
e51bf28
BuildRequires: freealut-devel
e51bf28
BuildRequires: desktop-file-utils
e51bf28
e51bf28
e51bf28
%description
e51bf28
It's a game where you fly a little plane around the screen and
e51bf28
shoot things and drop bombs on enemy targets, and it's meant to be quick 
e51bf28
and fun.
e51bf28
e51bf28
%prep
e51bf28
%setup -q
e51bf28
e51bf28
chmod -x apricots/*.cpp
e51bf28
chmod -x apricots/*.h
e51bf28
chmod -x AUTHORS
e51bf28
chmod -x ChangeLog
e51bf28
chmod -x COPYING
e51bf28
chmod -x README
e51bf28
chmod -x TODO
e51bf28
e51bf28
%patch0 -p0
e51bf28
%patch1 -p0
e51bf28
%patch2 -p0
e51bf28
%patch3 -p0
44e6a34
%patch4 -p0
e51bf28
e51bf28
%build
e51bf28
%configure
e51bf28
make
e51bf28
e51bf28
e51bf28
%install
e51bf28
rm -rf %{buildroot}
e51bf28
mkdir -p %{buildroot}%{_bindir}
e51bf28
install -m 755 apricots/apricots %{buildroot}%{_bindir}
e51bf28
mkdir -p %{buildroot}%{_datadir}/apricots
e51bf28
install -m 644 apricots/*.wav %{buildroot}%{_datadir}/apricots
e51bf28
mkdir -p %{buildroot}%{_sysconfdir}
e51bf28
install -m 644 apricots/apricots.cfg %{buildroot}%{_sysconfdir}
e51bf28
ln -s ../../..%{_sysconfdir}/apricots.cfg %{buildroot}%{_datadir}/apricots/apricots.cfg
e51bf28
install -m 644 apricots/*.psf %{buildroot}%{_datadir}/apricots
e51bf28
install -m 644 apricots/*.shapes %{buildroot}%{_datadir}/apricots
e51bf28
e51bf28
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
e51bf28
desktop-file-install --vendor fedora            \
e51bf28
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
e51bf28
  %{SOURCE2}
e51bf28
e51bf28
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/apps
e51bf28
install -p -m 644 %{SOURCE1} \
e51bf28
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/apps
e51bf28
e51bf28
e51bf28
%post
e51bf28
touch --no-create %{_datadir}/icons/hicolor || :
e51bf28
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
e51bf28
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
e51bf28
fi
e51bf28
e51bf28
  
e51bf28
%postun
e51bf28
touch --no-create %{_datadir}/icons/hicolor || :
e51bf28
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
e51bf28
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
e51bf28
fi
e51bf28
e51bf28
e51bf28
%clean
e51bf28
rm -rf %{buildroot}
e51bf28
e51bf28
e51bf28
%files
e51bf28
%defattr(-,root,root,-)
e51bf28
%doc AUTHORS ChangeLog COPYING README TODO
e51bf28
%{_bindir}/apricots
e51bf28
%{_datadir}/apricots
e51bf28
%{_datadir}/applications/fedora-apricots.desktop
e51bf28
%{_datadir}/icons/hicolor/24x24/apps/apricots.png
e51bf28
%config(noreplace) %{_sysconfdir}/apricots.cfg
e51bf28
e51bf28
e51bf28
%changelog
1824fac
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.6-8
1824fac
- Rebuilt for c++ ABI breakage
1824fac
16ba3f4
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.6-7
16ba3f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
16ba3f4
b6ba422
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.6-6
b6ba422
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
b6ba422
ff768ff
* Thu Aug 20 2009 Jon Ciesla <limb@jcomserv.net> - 0.2.6-5
ff768ff
- Rebuild for openal-soft.
ff768ff
ddb6226
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.6-4
ddb6226
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
ddb6226
27965de
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.6-3
27965de
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
27965de
e51bf28
* Tue Sep 09 2008 Jon Ciesla <limb@jcomserv.net> - 0.2.6-2
e51bf28
- Re-base off of pristine tarball, md5 error in review.
e51bf28
e51bf28
* Tue Aug 26 2008 Jon Ciesla <limb@jcomserv.net> - 0.2.6-1
e51bf28
- Initial packaging.