xmame.spec 4.8 KB

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