wine.spec 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. ##
  2. ## wine.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 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: wine
  26. Summary: Wine Is Not an Emulator (WINE)
  27. URL: http://www.winehq.org/
  28. Vendor: Bob Amstadt, Alexandre Julliard et al.
  29. Packager: OpenPKG Foundation e.V.
  30. Distribution: OpenPKG Community
  31. Class: EVAL
  32. Group: XWindow
  33. License: LGPL
  34. Version: 0.9.24
  35. Release: 20061028
  36. # list of sources
  37. Source0: http://ibiblio.org/pub/linux/system/emulators/wine/wine-%{version}.tar.bz2
  38. Source1: winesetup.sh
  39. Patch0: wine.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20040130, X11, xpm, perl, gcc, make, flex, bison
  44. PreReq: OpenPKG, openpkg >= 20040130, 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. %track
  59. prog wine = {
  60. version = %{version}
  61. url = http://ibiblio.org/pub/linux/system/emulators/wine/
  62. regex = wine-(__VER__)\.tar\.bz2
  63. }
  64. %prep
  65. %setup -q
  66. %patch -p0
  67. # pre-check the build platform in advance
  68. case "%{l_platform -t}" in
  69. *i?86-linux* | *i?86-freebsd* | *i?86-netbsd* | *i?86-sunos* ) ;;
  70. * ) echo "Linux/FreeBSD/NetBSD/Solaris on Intel x86 supported only"; exit 1 ;;
  71. esac
  72. %build
  73. # configure package
  74. CC="%{l_cc}" \
  75. CXX="%{l_cxx}" \
  76. CFLAGS="%{l_cflags -O}" \
  77. CXXFLAGS="%{l_cxxflags -O}" \
  78. CPPFLAGS="%{l_cppflags}" \
  79. LDFLAGS="%{l_ldflags}" \
  80. ./configure \
  81. --prefix=%{l_prefix} \
  82. --mandir=%{l_prefix}/man \
  83. --disable-trace \
  84. --disable-debug || true
  85. # build package
  86. %{l_make} %{l_mflags -O}
  87. %install
  88. rm -rf $RPM_BUILD_ROOT
  89. # install package
  90. %{l_make} %{l_mflags} install \
  91. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  92. exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \
  93. mandir=$RPM_BUILD_ROOT%{l_prefix}/man
  94. # install default configuration files
  95. %{l_shtool} mkdir -f -p -m 755 \
  96. $RPM_BUILD_ROOT%{l_prefix}/share/wine
  97. # post-adjust installation
  98. mv $RPM_BUILD_ROOT%{l_prefix}/bin/function_grep.pl \
  99. $RPM_BUILD_ROOT%{l_prefix}/bin/function_grep
  100. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  101. rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man3w
  102. %{l_shtool} subst \
  103. -e 's;#!/usr/bin/perl;#!%{l_prefix}/bin/perl;' \
  104. $RPM_BUILD_ROOT%{l_prefix}/bin/winemaker
  105. # make sure the shared libraries are found
  106. %{l_shtool} mkdir -f -p -m 755 \
  107. $RPM_BUILD_ROOT%{l_prefix}/libexec/wine
  108. for prog in wine wineserver wmc wrc; do
  109. mv $RPM_BUILD_ROOT%{l_prefix}/bin/$prog \
  110. $RPM_BUILD_ROOT%{l_prefix}/libexec/wine/$prog
  111. ( echo "#!/bin/sh"
  112. echo "LD_LIBRARY_PATH=\"%{l_prefix}/lib:\${LD_LIBRARY_PATH:-/usr/lib}\""
  113. echo "export LD_LIBRARY_PATH"
  114. echo "exec %{l_prefix}/libexec/wine/$prog \${1+\"\$@\"}"
  115. ) >$prog.sh && %{l_shtool} install -c -m 755 \
  116. $prog.sh $RPM_BUILD_ROOT%{l_prefix}/bin/$prog
  117. done
  118. # install a utility for setting up $HOME/.wine
  119. %{l_shtool} install -c -m 755 %{l_value -s l_prefix} \
  120. %{SOURCE winesetup.sh} \
  121. $RPM_BUILD_ROOT%{l_prefix}/bin/winesetup
  122. # determine installation files
  123. %{l_rpmtool} files -v -ofiles-wine -r$RPM_BUILD_ROOT \
  124. %{l_files_std} \
  125. '%not %dir %{l_prefix}/share/aclocal'
  126. %files -f files-wine
  127. %clean
  128. rm -rf $RPM_BUILD_ROOT
  129. %post
  130. if [ $1 -eq 1 ]; then
  131. ( echo "In order to use WINE, every user has to establish a reasonable"
  132. echo "\$HOME/.wine/ folder containing at least the essential directory"
  133. echo "structure of Windows on a classical C:\\ drive plus some initial"
  134. echo "system registry. For this each WINE user should initially run:"
  135. echo "\$ $RPM_INSTALL_PREFIX/bin/winesetup"
  136. ) | %{l_rpmtool} msg -b
  137. fi