wine.spec 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. ##
  2. ## wine.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package information
  24. Name: wine
  25. Summary: Wine Is Not an Emulator (WINE)
  26. URL: http://www.winehq.org/
  27. Vendor: Bob Amstadt, Alexandre Julliard et al.
  28. Packager: OpenPKG Foundation e.V.
  29. Distribution: OpenPKG Community
  30. Class: EVAL
  31. Group: XWindow
  32. License: LGPL
  33. Version: 0.9.54
  34. Release: 20080126
  35. # list of sources
  36. Source0: http://ibiblio.org/pub/linux/system/emulators/wine/wine-%{version}.tar.bz2
  37. Source1: winesetup.sh
  38. Patch0: wine.patch
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20040130, X11, xpm, perl, gcc, make, flex, bison
  43. PreReq: OpenPKG, openpkg >= 20040130, X11, xpm, perl
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. The Wine project started in 1993 as a way to support running Win16
  48. and Win32 API based programs on Intel x86. Wine does not emulate
  49. the Intel x86 processor. Instead the applications run natively on
  50. the Intel x86 with just all Windows API calls implemented by Wine
  51. through a mapping onto the Unix/X11 API. An original Microsoft
  52. Windows(tm) installation is not required, because the goal of Wine
  53. is the full reimplementation of the Windows APIs which makes the
  54. original Windows implementation unnecessary. Wine is still under
  55. heavy development, but many people find it already useful in running
  56. a growing number of Windows applications.
  57. %track
  58. prog wine = {
  59. version = %{version}
  60. url = http://ibiblio.org/pub/linux/system/emulators/wine/
  61. regex = wine-(__VER__)\.tar\.bz2
  62. }
  63. %prep
  64. %setup -q
  65. %patch -p0
  66. # pre-check the build platform in advance
  67. case "%{l_platform -t}" in
  68. *i?86-linux* | *i?86-freebsd* | *i?86-netbsd* | *i?86-sunos* ) ;;
  69. * ) echo "Linux/FreeBSD/NetBSD/Solaris on Intel x86 supported only"; exit 1 ;;
  70. esac
  71. %build
  72. # configure package
  73. CC="%{l_cc}" \
  74. CXX="%{l_cxx}" \
  75. CFLAGS="%{l_cflags -O}" \
  76. CXXFLAGS="%{l_cxxflags -O}" \
  77. CPPFLAGS="%{l_cppflags}" \
  78. LDFLAGS="%{l_ldflags}" \
  79. ./configure \
  80. --prefix=%{l_prefix} \
  81. --mandir=%{l_prefix}/man \
  82. --disable-trace \
  83. --disable-debug || true
  84. # build package
  85. %{l_make} %{l_mflags -O}
  86. %install
  87. rm -rf $RPM_BUILD_ROOT
  88. # install package
  89. %{l_make} %{l_mflags} install \
  90. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  91. exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \
  92. mandir=$RPM_BUILD_ROOT%{l_prefix}/man
  93. # install default configuration files
  94. %{l_shtool} mkdir -f -p -m 755 \
  95. $RPM_BUILD_ROOT%{l_prefix}/share/wine
  96. # post-adjust installation
  97. mv $RPM_BUILD_ROOT%{l_prefix}/bin/function_grep.pl \
  98. $RPM_BUILD_ROOT%{l_prefix}/bin/function_grep
  99. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  100. rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man3w
  101. %{l_shtool} subst \
  102. -e 's;#!/usr/bin/perl;#!%{l_prefix}/bin/perl;' \
  103. $RPM_BUILD_ROOT%{l_prefix}/bin/winemaker
  104. # make sure the shared libraries are found
  105. %{l_shtool} mkdir -f -p -m 755 \
  106. $RPM_BUILD_ROOT%{l_prefix}/libexec/wine
  107. for prog in wine wineserver wmc wrc; do
  108. mv $RPM_BUILD_ROOT%{l_prefix}/bin/$prog \
  109. $RPM_BUILD_ROOT%{l_prefix}/libexec/wine/$prog
  110. ( echo "#!/bin/sh"
  111. echo "LD_LIBRARY_PATH=\"%{l_prefix}/lib:\${LD_LIBRARY_PATH:-/usr/lib}\""
  112. echo "export LD_LIBRARY_PATH"
  113. echo "exec %{l_prefix}/libexec/wine/$prog \${1+\"\$@\"}"
  114. ) >$prog.sh && %{l_shtool} install -c -m 755 \
  115. $prog.sh $RPM_BUILD_ROOT%{l_prefix}/bin/$prog
  116. done
  117. # install a utility for setting up $HOME/.wine
  118. %{l_shtool} install -c -m 755 %{l_value -s l_prefix} \
  119. %{SOURCE winesetup.sh} \
  120. $RPM_BUILD_ROOT%{l_prefix}/bin/winesetup
  121. # determine installation files
  122. %{l_rpmtool} files -v -ofiles-wine -r$RPM_BUILD_ROOT \
  123. %{l_files_std}
  124. %files -f files-wine
  125. %clean
  126. rm -rf $RPM_BUILD_ROOT
  127. %post
  128. if [ $1 -eq 1 ]; then
  129. ( echo "In order to use WINE, every user has to establish a reasonable"
  130. echo "\$HOME/.wine/ folder containing at least the essential directory"
  131. echo "structure of Windows on a classical C:\\ drive plus some initial"
  132. echo "system registry. For this each WINE user should initially run:"
  133. echo "\$ $RPM_INSTALL_PREFIX/bin/winesetup"
  134. ) | %{l_rpmtool} msg -b
  135. fi