Blob Blame History Raw
Name:           enigma
Version:        1.01
Release:        23%{?dist}
Summary:        Clone of the ATARI game Oxyd

Group:          Amusements/Games
License:        GPLv2+
URL:            http://www.nongnu.org/enigma/
Source0:        http://download.berlios.de/enigma-game/enigma-1.01-64bit.tar.gz
Patch0:         enigma-1.01-desktop.patch
Patch1:         enigma-gcc-4.3-ftbfs.patch
# taken from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=505358
Patch2:         enigma-gcc-4.4-ftbfs.patch
Patch3:         enigma-consts.patch
Patch4:         enigma-xerces.patch
Patch5:         enigma-gcc-4.6-ftbfs.patch
Patch6:         enigma-gcc-4.7-ftbfs.patch
Patch7:         enigma-libpng15.patch

Requires:       dejavu-sans-fonts

BuildRequires:  SDL-devel
BuildRequires:  SDL_image-devel
BuildRequires:  SDL_mixer-devel
BuildRequires:  SDL_ttf-devel
BuildRequires:  gettext
BuildRequires:  libpng-devel
BuildRequires:  desktop-file-utils
BuildRequires:  zlib-devel
BuildRequires:  tetex
BuildRequires:  xerces-c-devel

%description
Enigma is a tribute to and a re-implementation of one of the most
original and intriguing computer games of the 1990's: Oxyd.  Your
objective is easily explained: find and uncover all pairs of identical
Oxyd stones in each landscape.  Sounds simple?  It would be, if it
weren't for hidden traps, vast mazes, insurmountable obstacles and
innumerable puzzles blocking your direct way to the Oxyd stones...

%prep
%setup -q
%patch0 -p1
%patch1 -p0
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1

%build
%configure --enable-optimize
make %{?_smp_mflags}

%install
rm -rf __doc
%make_install
mkdir __doc
mv $RPM_BUILD_ROOT%{_datadir}/doc/enigma/ __doc

# Use system fonts instead of bundling our own
rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/fonts/DejaVuSansCondensed.ttf
rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/fonts/vera_sans.ttf
ln -s %{_datadir}/fonts/dejavu/DejaVuSansCondensed.ttf $RPM_BUILD_ROOT%{_datadir}/%{name}/fonts/DejaVuSansCondensed.ttf
ln -s %{_datadir}/fonts/dejavu/DejaVuSans.ttf $RPM_BUILD_ROOT%{_datadir}/%{name}/fonts/vera_sans.ttf


desktop-file-install \
  --remove-key Version \
  --dir ${RPM_BUILD_ROOT}%{_datadir}/applications            \
  $RPM_BUILD_ROOT%{_datadir}/applications/enigma.desktop

%find_lang %{name}

%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/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

%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :

%files -f %{name}.lang
%doc README AUTHORS CHANGES COPYING ACKNOWLEDGEMENTS __doc/*
%{_datadir}/enigma
%{_bindir}/enigma
%{_mandir}/man?/enigma.*
%{_datadir}/icons/hicolor/48x48/apps/enigma.png
%{_datadir}/pixmaps/enigma.png
%{_datadir}/applications/enigma.desktop
# we don't need the enet stuff
%exclude %{_includedir}/enet/
%exclude %{_libdir}/libenet.a

%changelog
* Mon Mar 04 2013 Rahul Sundaram <sundaram@fedoraproject.org> - 1.01-23
- remove vendor tag from desktop file. https://fedorahosted.org/fpc/ticket/247
- replace file requires with package requires for dejavu sans fonts
- use make_install macro
- drop obsolete version requirements for build dependencies
- update gtk icon cache scriplets to follow current guidelines
- drop defattr

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.01-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Mon Jul 30 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 1.01-21
- Add dist tag as required by package guidelines

* Fri Jul 27 2012 Michal Schmidt <mschmidt@redhat.com> - 1.01-20
- Fix FTBFS. Patches provided by Tom Lane (#843643).
- Remove legacy spec file items.

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

* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.01-18
- Rebuilt for c++ ABI breakage

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.01-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 1.01-16
- Rebuild for new libpng

* Thu Mar 10 2011 Kalev Lember <kalev@smartlink.ee> - 1.01-15
- Added a patch to fix build with GCC 4.6

* Thu Mar 10 2011 Kalev Lember <kalev@smartlink.ee> - 1.01-14
- Rebuilt with xerces-c 3.1

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.01-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Tue Feb 09 2010 Caolán McNamara <caolanm@redhat.com> - 1.01-12
- Rebuild for libxerces-c

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.01-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Mar 02 2009 Caolán McNamara <caolanm@redhat.com> - 1.01-10
- fix up consts

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.01-9.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed Feb 04 2009 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 1.01-8
- add enigma-gcc-4.4-ftbfs.patch from debian

* Mon Dec 29 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 1.01-7
- use file-based deps for fons
- use DejaVuSans instead of vera_sans

* Wed Dec 24 2008 Wart <wart@kobold.org> - 1.01-6.3
- Replace bundled font with a symlink to an identical system font (BZ #477381)

* Mon Feb 11 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 1.01-6.2
- rebuild for new libxerces-c

* Sat Feb 09 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 1.01-6
- update gcc43 patch to one from opensuse

* Sat Feb 09 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 1.01-5
- rebuilt

* Fri Jan 04 2008 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 1.01-4.1
- add enigma-gcc-4.3-ftbfs.patch from debian package

* Wed Sep 12 2007 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 1.01-3.1
- use the newly 64bit-clean upstream tarball

* Tue Aug 21 2007 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 1.01-2.1
- Remove version key from desktop file

* Fri Aug 03 2007 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info>
- Update License field due to the "Licensing guidelines changes"

* Tue Jun 5 2007 Wart <wart@kobold.org> - 1.01-2
- Clean up desktop categories

* Sat May 26 2007 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 1.01-1
- Update to 1.01

* Thu Dec 14 2006 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 1.0-1
- Update to 1.0
- drop enigma-gcc41.patch
- formating changes
- use make install DESTDIR
- new download URL

* Mon Aug 28 2006 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 0.92-4
- Rebuild for Fedora Extras 6

* Mon Feb 13 2006 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 0.92-3
- Rebuild for Fedora Extras 5

* Mon Jan 23 2006 Adrian Reber <adrian@lisas.de> - 0.92-2
- Added patch to build with gcc 4.1

* Sat May 07 2005 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 0.92-1
- Update to 0.92
- Use disttag

* Sat May 07 2005 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 0.91-5
- rebuilt

* Sat May 07 2005 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 0.91-3
- BR libpng-devel

* Thu May 05 2005 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 0.91-2
- rebuilt

* Thu May 05 2005 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 0.91-1
- Update to 0.91
- Add BR gettext, SDL_ttf-devel
- Use find_lang
- gtk-update-icon-cache in post and postun
- Remove GCC patches

* Thu Apr 14 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.81-5
- Fix build for GCC4.

* Thu Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
- rebuilt

* Thu Nov 11 2004 Michael Schwendt <mschwendt[AT]users.sf.net> - 0.81-3
- Fix a number of C++ issues for FC3/GCC 3.4.

* Fri Jun 11 2004 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 0:0.81-0.fdr.2
- Build-Require zlib-devel, tetex
- Don't install INSTALL

* Wed Dec 24 2003 Thorsten Leemhuis <fedora[AT]leemhuis.info> - 0:0.81-0.fdr.1
- Initial RPM release based on spec-file in source
  package by Daniel Heck <dheck[AT]gmx.de>