You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
162 lines
5.7 KiB
162 lines
5.7 KiB
## |
|
## wine.spec -- OpenPKG RPM Package Specification |
|
## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/> |
|
## |
|
## Permission to use, copy, modify, and distribute this software for |
|
## any purpose with or without fee is hereby granted, provided that |
|
## the above copyright notice and this permission notice appear in all |
|
## copies. |
|
## |
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
## SUCH DAMAGE. |
|
## |
|
|
|
# package version |
|
%define V_opkg 1.1.4 |
|
%define V_dist 1.1.4 |
|
|
|
# package information |
|
Name: wine |
|
Summary: Wine Is Not an Emulator (WINE) |
|
URL: http://www.winehq.org/ |
|
Vendor: Bob Amstadt, Alexandre Julliard et al. |
|
Packager: OpenPKG Foundation e.V. |
|
Distribution: OpenPKG Community |
|
Class: EVAL |
|
Group: XWindow |
|
License: LGPL |
|
Version: %{V_opkg} |
|
Release: 20080906 |
|
|
|
# list of sources |
|
Source0: http://ibiblio.org/pub/linux/system/emulators/wine/wine-%{V_dist}.tar.bz2 |
|
Source1: winesetup.sh |
|
Patch0: wine.patch |
|
|
|
# build information |
|
Prefix: %{l_prefix} |
|
BuildRoot: %{l_buildroot} |
|
BuildPreReq: OpenPKG, openpkg >= 20040130, X11, xpm, perl, gcc, make, flex, bison |
|
PreReq: OpenPKG, openpkg >= 20040130, X11, xpm, perl |
|
AutoReq: no |
|
AutoReqProv: no |
|
|
|
%description |
|
The Wine project started in 1993 as a way to support running Win16 |
|
and Win32 API based programs on Intel x86. Wine does not emulate |
|
the Intel x86 processor. Instead the applications run natively on |
|
the Intel x86 with just all Windows API calls implemented by Wine |
|
through a mapping onto the Unix/X11 API. An original Microsoft |
|
Windows(tm) installation is not required, because the goal of Wine |
|
is the full reimplementation of the Windows APIs which makes the |
|
original Windows implementation unnecessary. Wine is still under |
|
heavy development, but many people find it already useful in running |
|
a growing number of Windows applications. |
|
|
|
%track |
|
prog wine = { |
|
version = %{version} |
|
url = http://ibiblio.org/pub/linux/system/emulators/wine/ |
|
regex = wine-(__VER__)\.tar\.bz2 |
|
} |
|
|
|
%prep |
|
%setup -q -n wine-%{V_dist} |
|
%patch -p0 |
|
|
|
# pre-check the build platform in advance |
|
case "%{l_platform -t}" in |
|
*i?86-linux* | *i?86-freebsd* | *i?86-netbsd* | *i?86-sunos* ) ;; |
|
* ) echo "Linux/FreeBSD/NetBSD/Solaris on Intel x86 supported only"; exit 1 ;; |
|
esac |
|
|
|
%build |
|
# configure package |
|
CC="%{l_cc}" \ |
|
CXX="%{l_cxx}" \ |
|
CFLAGS="%{l_cflags -O}" \ |
|
CXXFLAGS="%{l_cxxflags -O}" \ |
|
CPPFLAGS="%{l_cppflags}" \ |
|
LDFLAGS="%{l_ldflags}" \ |
|
./configure \ |
|
--prefix=%{l_prefix} \ |
|
--mandir=%{l_prefix}/man \ |
|
--without-freetype \ |
|
--disable-trace \ |
|
--disable-debug || true |
|
|
|
# build package |
|
%{l_make} %{l_mflags -O} |
|
|
|
%install |
|
rm -rf $RPM_BUILD_ROOT |
|
|
|
# install package |
|
%{l_make} %{l_mflags} install \ |
|
prefix=$RPM_BUILD_ROOT%{l_prefix} \ |
|
exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \ |
|
mandir=$RPM_BUILD_ROOT%{l_prefix}/man |
|
|
|
# install default configuration files |
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
$RPM_BUILD_ROOT%{l_prefix}/share/wine |
|
|
|
# post-adjust installation |
|
mv $RPM_BUILD_ROOT%{l_prefix}/bin/function_grep.pl \ |
|
$RPM_BUILD_ROOT%{l_prefix}/bin/function_grep |
|
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man3w |
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/de.* |
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/fr.* |
|
%{l_shtool} subst \ |
|
-e 's;#!/usr/bin/perl;#!%{l_prefix}/bin/perl;' \ |
|
$RPM_BUILD_ROOT%{l_prefix}/bin/winemaker |
|
|
|
# make sure the shared libraries are found |
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/wine |
|
for prog in wine wineserver wmc wrc; do |
|
mv $RPM_BUILD_ROOT%{l_prefix}/bin/$prog \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/wine/$prog |
|
( echo "#!/bin/sh" |
|
echo "LD_LIBRARY_PATH=\"%{l_prefix}/lib:\${LD_LIBRARY_PATH:-/usr/lib}\"" |
|
echo "export LD_LIBRARY_PATH" |
|
echo "exec %{l_prefix}/libexec/wine/$prog \${1+\"\$@\"}" |
|
) >$prog.sh && %{l_shtool} install -c -m 755 \ |
|
$prog.sh $RPM_BUILD_ROOT%{l_prefix}/bin/$prog |
|
done |
|
|
|
# install a utility for setting up $HOME/.wine |
|
%{l_shtool} install -c -m 755 %{l_value -s l_prefix} \ |
|
%{SOURCE winesetup.sh} \ |
|
$RPM_BUILD_ROOT%{l_prefix}/bin/winesetup |
|
|
|
# determine installation files |
|
%{l_rpmtool} files -v -ofiles-wine -r$RPM_BUILD_ROOT \ |
|
%{l_files_std} |
|
|
|
%files -f files-wine |
|
|
|
%clean |
|
rm -rf $RPM_BUILD_ROOT |
|
|
|
%post |
|
if [ $1 -eq 1 ]; then |
|
( echo "In order to use WINE, every user has to establish a reasonable" |
|
echo "\$HOME/.wine/ folder containing at least the essential directory" |
|
echo "structure of Windows on a classical C:\\ drive plus some initial" |
|
echo "system registry. For this each WINE user should initially run:" |
|
echo "\$ $RPM_INSTALL_PREFIX/bin/winesetup" |
|
) | %{l_rpmtool} msg -b |
|
fi |
|
|
|
|