xmame.spec 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. ##
  2. ## xmame.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 Ralf S. Engelschall <rse@engelschall.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 [EXP]
  32. Group: Games
  33. License: GPL
  34. Version: 0.58.2
  35. Release: 20020223
  36. # list of sources
  37. Source0: http://x.mame.net/download/xmame-%{version}.tar.bz2
  38. Source1: http://www.mame.net/zips/hsdat7.zip
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20020206, X11, gcc, make, zlib
  43. PreReq: OpenPKG, openpkg >= 20020206, X11
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. X-MAME is a port of the popular Multi Arcade Machine Emulator (MAME)
  48. to the X Window System. It is able to run over 1600 original arcade
  49. games through their ROM sets.
  50. %prep
  51. %setup -q
  52. %build
  53. os=""
  54. cpu=""
  55. case "%{l_target}" in
  56. *-freebsd* ) os="freebsd"; cpu="i386" ;;
  57. *-linux* ) os="linux"; cpu="i386" ;;
  58. *-solaris* ) os="solaris"; cpu="risc" ;;
  59. esac
  60. x11_inc=`%{l_prefix}/etc/rc --query x11_incdir`
  61. x11_lib=`%{l_prefix}/etc/rc --query x11_libdir`
  62. %{l_make} %{l_mflags -O} \
  63. -f makefile.unix \
  64. CC="%{l_cc}" \
  65. CFLAGS="-I%{l_prefix}/include -I$x11_inc -pipe -O2 -funroll-loops -fstrength-reduce -fomit-frame-pointer -ffast-math" \
  66. LDFLAGS="-L%{l_prefix}/lib -L$x11_lib" \
  67. PREFIX="%{l_prefix}" \
  68. XMAMEROOT="%{l_prefix}/etc/xmame" \
  69. ARCH="$os" \
  70. MY_CPU="$cpu" \
  71. X11INC="-I$x11_inc" \
  72. X11LIB="-L$x11_lib" \
  73. LIBS="-L%{l_prefix}/lib" \
  74. INCLUDE="-I%{l_prefix}/include"
  75. %install
  76. rm -rf $RPM_BUILD_ROOT
  77. %{l_shtool} mkdir -f -p -m 755 \
  78. $RPM_BUILD_ROOT%{l_prefix}/bin \
  79. $RPM_BUILD_ROOT%{l_prefix}/man/man6 \
  80. $RPM_BUILD_ROOT%{l_prefix}/etc/xmame
  81. %{l_shtool} install -c -s -m 755 \
  82. xmame.x11 $RPM_BUILD_ROOT%{l_prefix}/bin/xmame
  83. %{l_shtool} install -c -m 644 \
  84. doc/xmame.6 $RPM_BUILD_ROOT%{l_prefix}/man/man6/xmame.6
  85. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  86. %files -f files
  87. %clean
  88. rm -rf $RPM_BUILD_ROOT