wine.spec 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. ##
  2. ## wine.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2003 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: wine
  27. Summary: Wine Is Not an Emulator (WINE)
  28. URL: http://www.wine.org/
  29. Vendor: Bob Amstadt, Alexandre Julliard et al
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [EVAL]
  32. Group: X11
  33. License: LGPL
  34. Version: 20030709
  35. Release: 20030718
  36. # list of sources
  37. Source0: http://www.ibiblio.org/pub/Linux/ALPHA/wine/development/Wine-%{version}.tar.gz
  38. Source1: winesetup.sh
  39. Patch0: wine.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20030717, X11, xpm, perl, gcc, make, flex, bison
  44. PreReq: OpenPKG, openpkg >= 20030717, X11, xpm, perl
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. The Wine project started in 1993 as a way to support running Win16
  49. and Win32 API based programs on Intel x86. Wine does not emulate
  50. the Intel x86 processor. Instead the applications run natively on
  51. the Intel x86 with just all Windows API calls implemented by Wine
  52. through a mapping onto the Unix/X11 API. An original Microsoft
  53. Windows(tm) installation is not required, because the goal of Wine
  54. is the full reimplementation of the Windows APIs which makes the
  55. original Windows implementation unnecessary. Wine is still under
  56. heavy development, but many people find it already useful in running
  57. a growing number of Windows applications.
  58. %prep
  59. %setup -q
  60. %patch -p0
  61. # pre-check the build platform in advance
  62. case "%{l_target}" in
  63. *x86-linux* | *x86-freebsd* | *x86-netbsd* | *x86-solaris* ) ;;
  64. * ) echo "Linux/FreeBSD/NetBSD/Solaris on Intel x86 supported only"; exit 1 ;;
  65. esac
  66. %build
  67. # configure package
  68. CC="%{l_cc}" \
  69. CXX="%{l_cxx}" \
  70. CFLAGS="%{l_cflags -O}" \
  71. CXXFLAGS="%{l_cxxflags -O}" \
  72. CPPFLAGS="%{l_cppflags}" \
  73. LDFLAGS="%{l_ldflags}" \
  74. ./configure \
  75. --prefix=%{l_prefix} \
  76. --disable-trace \
  77. --disable-debug
  78. # build package
  79. %{l_make} %{l_mflags -O}
  80. %install
  81. rm -rf $RPM_BUILD_ROOT
  82. # install package
  83. %{l_make} %{l_mflags} install \
  84. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  85. exec_prefix=$RPM_BUILD_ROOT%{l_prefix}
  86. # install default configuration files
  87. %{l_shtool} mkdir -f -p -m 755 \
  88. $RPM_BUILD_ROOT%{l_prefix}/share/wine
  89. %{l_shtool} install -c -m 644 \
  90. winedefault.reg documentation/samples/* \
  91. $RPM_BUILD_ROOT%{l_prefix}/share/wine/
  92. # post-adjust installation
  93. mv $RPM_BUILD_ROOT%{l_prefix}/bin/function_grep.pl \
  94. $RPM_BUILD_ROOT%{l_prefix}/bin/function_grep
  95. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  96. rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man3w
  97. %{l_shtool} subst \
  98. -e 's;#!/usr/bin/perl;#!%{l_prefix}/bin/perl;' \
  99. $RPM_BUILD_ROOT%{l_prefix}/bin/winemaker
  100. # make sure the shared libraries are found
  101. %{l_shtool} mkdir -f -p -m 755 \
  102. $RPM_BUILD_ROOT%{l_prefix}/libexec/wine
  103. for prog in wine wineserver wmc wrc; do
  104. mv $RPM_BUILD_ROOT%{l_prefix}/bin/$prog \
  105. $RPM_BUILD_ROOT%{l_prefix}/libexec/wine/$prog
  106. ( echo "#!/bin/sh"
  107. echo "LD_LIBRARY_PATH=\"%{l_prefix}/lib:\${LD_LIBRARY_PATH:-/usr/lib}\""
  108. echo "export LD_LIBRARY_PATH"
  109. echo "exec %{l_prefix}/libexec/wine/$prog \${1+\"\$@\"}"
  110. ) >$prog.sh && %{l_shtool} install -c -m 755 \
  111. $prog.sh $RPM_BUILD_ROOT%{l_prefix}/bin/$prog
  112. done
  113. # install a utility for setting up $HOME/.wine
  114. %{l_shtool} install -c -m 755 %{l_value -s l_prefix} \
  115. %{SOURCE winesetup.sh} \
  116. $RPM_BUILD_ROOT%{l_prefix}/bin/winesetup
  117. # determine installation files
  118. %{l_rpmtool} files -v -ofiles-wine -r$RPM_BUILD_ROOT \
  119. %{l_files_std} \
  120. '%not %dir %{l_prefix}/share/aclocal'
  121. %files -f files-wine
  122. %clean
  123. rm -rf $RPM_BUILD_ROOT