zsnes-vl.spec 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. %define srcversion %(echo "%{version}src" | %{__sed} 's/\\.//')
  2. %define interversion %(echo %{version} | %{__sed} 's/\\./_/')
  3. Summary: Super Nintendo Enter System(SNES) emulator
  4. Summary(ja): スーパーファミコン(SNES)のエミュレーター
  5. Name: zsnes
  6. Version: 1.51
  7. Release: 3%{?_dist_release}
  8. License: GPLv2
  9. Group: Applications/Emulators
  10. URL: http://www.zsnes.com/
  11. Source0: http://prdownloads.sourceforge.net/%{name}/%{name}%{srcversion}.tar.bz2
  12. # Source Mage
  13. Patch1: zsnes-1.51-Makefile.in.FIX.BROKENESS.patch
  14. # Hans de Goede
  15. Patch2: zsnes-1.51-FORTIFY_SOURCE.patch
  16. # Paul Bender (minimyth)
  17. Patch3: zsnes-1.51-gcc43.patch
  18. # Upstream CVS
  19. Patch4: zsnes-1.51-pulseaudio.patch
  20. Requires: SDL >= 1.2.0
  21. Requires: hicolor-icon-theme
  22. BuildRequires: automake
  23. BuildRequires: nasm >= 0.98
  24. BuildRequires: zlib >= 1.1.0
  25. BuildRequires: libpng >= 1.2.0
  26. BuildRequires: SDL-devel >= 1.2.0
  27. BuildRequires: zlib-devel >= 1.1.0
  28. BuildRequires: libpng-devel >= 1.2.0
  29. BuildRequires: ncurses-devel
  30. BuildRequires: libao-devel
  31. BuildRequires: desktop-file-utils
  32. %if %{?_dist_release} != "vl4"
  33. Requires: mesa-libGL
  34. BuildRequires: xorg-x11-devel
  35. BuildRequires: mesa-libGL-devel
  36. %else
  37. Requires: XOrg-gl
  38. BuildRequires: XOrg-devel
  39. BuildRequires: XOrg-gl-devel
  40. %endif
  41. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  42. ExclusiveArch: %{ix86}
  43. %description
  44. ZSNES is one of Super Nintendo Entertainment System (SNES) emulators.
  45. %desctiption -l ja
  46. ZSNESはスーパーファミコンエミュレーターの1つです。
  47. %prep
  48. %{__rm} -rf %{buildroot}
  49. %setup -q -n %{name}_%{interversion}/src
  50. %patch1 -p2
  51. %patch2 -p2
  52. %patch3 -p2
  53. %patch4 -p2
  54. # Remove hardcoded CFLAGS and LDFLAGS
  55. %{__sed} -i \
  56. -e 's:^\s*CFLAGS=.* -D__RELEASE__.*$:CFLAGS="$CFLAGS -D__RELEASE__":' \
  57. -e 's:^\s*CFLAGS=.* -I\/usr\/local\/include .*$:CFLAGS="${CFLAGS} -I.":' \
  58. -e '/^\s*LDFLAGS=.* -L\/usr\/local\/lib /d' \
  59. configure.in
  60. # Fix line encodings in docs/readme.txt/*
  61. %{__sed} -i 's/\r//' ../docs/readme.txt/*.txt
  62. # Fix char encondigs
  63. iconv --from=ISO-8859-1 --to=UTF-8 ../docs/readme.txt/games.txt > \
  64. ../docs/readme.txt/games.txt.utf8
  65. %__mv ../docs/readme.txt/games.txt.utf8 ../docs/readme.txt/games.txt
  66. iconv --from=ISO-8859-1 --to=UTF-8 ../docs/readme.txt/support.txt > \
  67. ../docs/readme.txt/support.txt.utf8
  68. %__mv ../docs/readme.txt/support.txt.utf8 ../docs/readme.txt/support.txt
  69. # Remove icon extension from desktop file
  70. %{__sed} -i -e 's/^Icon=%{name}.png$/Icon=%{name}/g' \
  71. linux/%{name}.desktop
  72. %build
  73. aclocal
  74. autoconf
  75. %configure \
  76. --enable-libao \
  77. --enable-release \
  78. --disable-cpucheck force_arch="%{_arch}"
  79. %{__make} %{?_smp_mflags}
  80. %install
  81. %__rm -rf %{buildroot}
  82. %__make DESTDIR=%{buildroot} install
  83. # install desktop file
  84. %__mkdir_p %{buildroot}%{_datadir}/applications
  85. desktop-file-install \
  86. --vendor vine \
  87. --remove-category Application \
  88. --dir %{buildroot}%{_datadir}/applications \
  89. linux/%{name}.desktop
  90. # install icons
  91. for px in 16 32 48 64; do
  92. size=${px}x${px}
  93. %__mkdir_p %{buildroot}%{_datadir}/icons/hicolor/${size}/apps
  94. %__install -m 644 icons/${size}x32.png \
  95. %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/zsnes.png || exit 1
  96. done
  97. %clean
  98. %{__rm} -rf %{buildroot}
  99. %post
  100. touch --no-create %{_datadir}/icons/hicolor
  101. if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  102. %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
  103. fi
  104. %postun
  105. touch --no-create %{_datadir}/icons/hicolor
  106. if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  107. %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
  108. fi
  109. %files
  110. %defattr(-,root,root)
  111. %doc ../docs/authors.txt ../docs/license.txt ../docs/README.LINUX
  112. %doc ../docs/support.txt ../docs/thanks.txt ../docs/todo.txt
  113. %doc ../docs/readme.htm/ ../docs/readme.txt/
  114. %{_bindir}/zsnes
  115. %{_mandir}/man1/zsnes.1*
  116. %{_datadir}/applications/vine-%{name}.desktop
  117. %{_datadir}/icons/hicolor/*/apps/%{name}.png
  118. %changelog
  119. * Sun Jun 19 2011 Munehiro Yamamoto <munepi@vinelinux.org> 1.51-3
  120. - applied zsnes-1.51-gcc43.patch, zsnes-1.51-pulseaudio.patch
  121. * Tue May 26 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.51-2
  122. - change release to sync with self-build-zsnes
  123. * Mon Nov 02 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.51-1
  124. - applied new versioning policy
  125. - spec in utf8
  126. - dropped NoSource: 0
  127. - applied zsnes-1.51-Makefile.in.FIX.BROKENESS.patch,
  128. zsnes-1.51-FORTIFY_SOURCE.patch
  129. #, zsnes-1.51-gcc43.patch
  130. - added Requires: hicolor-icon-theme
  131. BuildRequires: automake ncurses-devel libao-devel desktop-file-utils
  132. - For vl5, added Requires: mesa-libGL
  133. BuildRequires: xorg-x11-devel mesa-libGL-devel
  134. - fixed ExclusiveArch: %{ix86}
  135. * Thu Jun 28 2007 1.51-0vl2
  136. - Set NoSource: 0
  137. * Sat Jun 9 2007 1.51-0vlmp1
  138. - Rename 0vl1 to 0vlmp1
  139. * Tue Mar 9 2007 1.51-0vl1
  140. - initial build for Vine Linux
  141. * Sun Feb 25 2007 1.51-0vlmp1
  142. - updated 1.51 for Vine Linux 4.x
  143. * Mon May 9 2005 1.42-0vl1
  144. - initial build for Vine Linux
  145. # end of file