xmame.spec 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. ##
  2. ## xmame.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package information
  26. Name: xmame
  27. Summary: Multi Arcade Machine Emulator (MAME)
  28. URL: http://www.mame.net/
  29. Vendor: Nicola Salmoria
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: EVAL
  33. Group: Games
  34. License: GPL
  35. Version: 0.87
  36. Release: 20041006
  37. # list of sources
  38. Source0: http://x.mame.net/download/xmame-%{version}.tar.bz2
  39. Source1: http://www.mameworld.net/highscore/uhsdat084.zip
  40. Source2: http://www.arcade-history.com/download/history0_84b.zip
  41. Source3: http://cheat.retrogames.com/cheat.zip
  42. Source4: http://www.mame.net/roms/gridlee.zip
  43. Source5: http://www.mame.net/roms/polyplay.zip
  44. Source6: http://www.mame.net/roms/robby.zip
  45. Source7: xmamerc
  46. # build information
  47. Prefix: %{l_prefix}
  48. BuildRoot: %{l_buildroot}
  49. BuildPreReq: OpenPKG, openpkg >= 20040130, X11, gcc, make, infozip
  50. PreReq: OpenPKG, openpkg >= 20040130, X11
  51. BuildPreReq: zlib, expat
  52. PreReq: zlib, expat
  53. AutoReq: no
  54. AutoReqProv: no
  55. %description
  56. X-MAME is a port of the popular Multi Arcade Machine Emulator (MAME)
  57. to the X Window System. It is able to run over 4000 original arcade
  58. games through their ROM sets.
  59. %track
  60. prog xmame = {
  61. version = %{version}
  62. url = http://x.mame.net/xmame-doc-7.html
  63. regex = xmame-(__VER__)\.tar\.bz2
  64. }
  65. %prep
  66. %setup -q
  67. %{l_prefix}/bin/unzip -x %{SOURCE uhsdat084.zip}
  68. %{l_prefix}/bin/unzip -x %{SOURCE history0_84b.zip}
  69. %{l_prefix}/bin/unzip -x %{SOURCE cheat.zip}
  70. %build
  71. # configure and build package
  72. os=""
  73. cpu=""
  74. case "%{l_platform -t}" in
  75. *-freebsd* ) os="freebsd"; cpu="i386" ;;
  76. *-linux* ) os="linux"; cpu="i386" ;;
  77. *-sunos* ) os="solaris"; cpu="risc" ;;
  78. esac
  79. x11_inc=`%{l_rc} --query x11_incdir`
  80. x11_lib=`%{l_rc} --query x11_libdir`
  81. %{l_make} %{l_mflags} \
  82. -f makefile.unix \
  83. CC="%{l_cc}" \
  84. CFLAGS="%{l_cppflags} -I$x11_inc -pipe -O2 -funroll-loops -fstrength-reduce -fomit-frame-pointer -ffast-math" \
  85. LDFLAGS="%{l_ldflags} -L$x11_lib" \
  86. PREFIX="%{l_prefix}" \
  87. XMAMEROOT="%{l_prefix}/etc/xmame" \
  88. ARCH="$os" \
  89. MY_CPU="$cpu" \
  90. X11INC="-I$x11_inc" \
  91. X11LIB="-L$x11_lib" \
  92. LIBS="%{l_ldflags}" \
  93. INCLUDE="%{l_cppflags}"
  94. %install
  95. rm -rf $RPM_BUILD_ROOT
  96. # create installation hierarchy
  97. %{l_shtool} mkdir -f -p -m 755 \
  98. $RPM_BUILD_ROOT%{l_prefix}/bin \
  99. $RPM_BUILD_ROOT%{l_prefix}/man/man6 \
  100. $RPM_BUILD_ROOT%{l_prefix}/etc/xmame \
  101. $RPM_BUILD_ROOT%{l_prefix}/share/xmame
  102. # install program and manual page
  103. %{l_shtool} install -c -s -m 755 \
  104. xmame.x11 $RPM_BUILD_ROOT%{l_prefix}/bin/xmame
  105. %{l_shtool} install -c -m 644 \
  106. doc/xmame.6 $RPM_BUILD_ROOT%{l_prefix}/man/man6/xmame.6
  107. # install default configuration
  108. %{l_shtool} install -c -m 644 %{l_value -s l_prefix} \
  109. %{SOURCE xmamerc} $RPM_BUILD_ROOT%{l_prefix}/etc/xmame/
  110. # install .DAT files
  111. %{l_shtool} install -c -m 644 \
  112. *.dat $RPM_BUILD_ROOT%{l_prefix}/etc/xmame/
  113. # install freely available ROMs
  114. %{l_shtool} install -c -m 644 \
  115. %{SOURCE gridlee.zip} %{SOURCE polyplay.zip} %{SOURCE robby.zip} \
  116. $RPM_BUILD_ROOT%{l_prefix}/share/xmame/
  117. # determine installation files
  118. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  119. %files -f files
  120. %clean
  121. rm -rf $RPM_BUILD_ROOT