berusky2.spec 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. Name: berusky2
  2. Version: 0.3
  3. Release: 3%{?dist}
  4. License: GPLv2+
  5. Summary: Sokoban clone
  6. Group: Amusements/Games
  7. Source: http://www.anakreon.cz/download/%{name}-%{version}.tar.gz
  8. Source1: berusky2.desktop
  9. Source2: berusky2.png
  10. Source3: berusky3d.ini
  11. URL: http://www.anakreon.cz/en/Berusky2.htm
  12. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  13. Requires: berusky2-data >= 0.4
  14. Requires: SDL
  15. Requires: SDL_image
  16. BuildRequires: SDL-devel
  17. BuildRequires: SDL_image-devel
  18. BuildRequires: gtk2-devel
  19. BuildRequires: desktop-file-utils
  20. ExclusiveArch: %{ix86}
  21. %description
  22. Berusky 2 is a game that challenges your visual/spatial thinking
  23. and ability to find a way to resolve a logic task. Using five bugs,
  24. you'll go through an adventure full of various puzzles spread across
  25. nine episodes. Individual episodes differ in appearance and difficulty,
  26. which increases throughout the game.
  27. %prep
  28. %setup -q
  29. %build
  30. %configure \
  31. CFLAGS="$RPM_OPT_FLAGS"
  32. make %{?_smp_mflags}
  33. %install
  34. rm -rf %{buildroot}
  35. make DESTDIR=%{buildroot} install
  36. mkdir -p %{buildroot}/%{_docdir}/%{name}-%{version}
  37. pushd %{buildroot}/usr/doc/%{name}
  38. mv * %{buildroot}%{_docdir}/%{name}-%{version}
  39. popd
  40. mkdir -p %{buildroot}/var/games/%{name}
  41. install -m 644 %{SOURCE3} %{buildroot}/var/games/%{name}
  42. rm -rf %{buildroot}/%{_datadir}/%{name}
  43. # Install icon and desktop file
  44. mkdir -p %{buildroot}/%{_datadir}/icons/hicolor/32x32/apps
  45. cp %{SOURCE2} %{buildroot}/%{_datadir}/icons/hicolor/32x32/apps
  46. desktop-file-install --dir %{buildroot}/%{_datadir}/applications --add-category X-Fedora %{SOURCE1}
  47. %clean
  48. rm -rf %{buildroot}
  49. %post
  50. touch --no-create %{_datadir}/icons/hicolor || :
  51. if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  52. %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
  53. fi
  54. %postun
  55. touch --no-create %{_datadir}/icons/hicolor || :
  56. if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  57. %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
  58. fi
  59. %files
  60. %doc %dir %{_docdir}/%{name}-%{version}
  61. %doc %{_docdir}/%{name}-%{version}/*
  62. %{_bindir}/berusky2
  63. %{_datadir}/applications/berusky2.desktop
  64. %{_datadir}/icons/hicolor/32x32/apps/berusky2.png
  65. %dir /var/games/%{name}
  66. /var/games/%{name}/*
  67. %changelog
  68. * Mon Aug 22 2011 Martin Stransky <stransky@redhat.com> 0.3-3
  69. - spec polished
  70. * Mon Aug 15 2011 Martin Stransky <stransky@redhat.com> 0.3-2
  71. - fixed ini file location
  72. * Mon Aug 15 2011 Martin Stransky <stransky@redhat.com> 0.3-1
  73. - initial build