+#
+# Conditional build:
+%bcond_without arts # without arts support
+%bcond_without cups # without CUPS printing support
+%bcond_without sane # without TWAIN scanning support (through SANE)
+%bcond_with pdf_docs # build pdf docs (missing BR)
+%bcond_with html_docs # build html docs (jade fault ?)
+#
+# maybe TODO: alsa,jack,nas BRs/checks (see dlls/winmm/wine*)
Summary: Program that lets you launch Win applications
Summary(es): Ejecuta programas Windows en Linux
Summary(pl): Program pozwalajĀ±cy uruchamiaƦ aplikacje Windows
Summary(pt_BR): Executa programas Windows no Linux
Name: wine
-Version: 20021125
+Version: 20031016
Release: 1
License: GPL
Group: Applications/Emulators
-Source0: ftp://metalab.unc.edu/pub/Linux/ALPHA/wine/development/Wine-%{version}.tar.gz
+Source0: http://dl.sf.net/wine/Wine-%{version}.tar.gz
+# Source0-md5: 67eed2fb7a86d805ec8fc4bcf7a04254
Source1: %{name}.init
Source2: %{name}.reg
Source3: %{name}.systemreg
Patch0: %{name}-fontcache.patch
Patch1: %{name}-destdir.patch
Patch2: %{name}-ncurses.patch
+Patch3: %{name}-ac-ksh.patch
+Patch4: %{name}-binutils.patch
+Patch5: %{name}-makedep.patch
+Patch6: %{name}-dga.patch
+Patch7: %{name}-winebuild.patch
URL: http://www.winehq.com/
BuildRequires: OpenGL-devel
BuildRequires: XFree86-devel
-%{!?_without_arts:BuildRequires: arts-devel}
+%{?with_arts:BuildRequires: arts-devel}
BuildRequires: bison
BuildRequires: chpax >= 0.20020901-2
-%{!?_without_cups:BuildRequires: cups-devel}
+%{?with_cups:BuildRequires: cups-devel}
BuildRequires: docbook-dtd31-sgml
BuildRequires: docbook-utils
BuildRequires: flex
BuildRequires: freetype-devel >= 2.0.5
BuildRequires: libjpeg-devel
BuildRequires: ncurses-devel
+%if %{with html_docs} || %{with pdf_docs}
BuildRequires: openjade
-%{!?_without_sane:BuildRequires: sane-backends-devel}
+%endif
+%if %{with pdf_docs}
+BuildRequires: tetex-metafont
+BuildRequires: tetex-fonts-pazo
+BuildRequires: tetex-fonts-stmaryrd
+BuildRequires: tetex-fonts-type1-urw
+%endif
+%{?with_sane:BuildRequires: sane-backends-devel}
Requires: OpenGL
Requires(post): /sbin/ldconfig
Requires(post,preun):/sbin/chkconfig
+# link to wine/ntdll.dll.so, without any SONAME
+Provides: libntdll.dll.so
ExclusiveArch: %{ix86}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _noautoreqdep libGL.so.1 libGLU.so.1
%define no_install_post_strip 1
-%define _prefix /usr/X11R6
-%define _mandir %{_prefix}/man
%define _winedir %{_datadir}/%{name}
%description
Requires: %{name} = %{version}
%description programs
-Wine - programs
+Wine - programs.
%description programs -l pl
-Wine - programy
+Wine - programy.
+
+%package doc-pdf
+Summary: Wine documentation in PDF
+Summary(pl): Dokumentacja Wine w formacie PDF
+Group: Documentation
+
+%description doc-pdf
+Wine documentation in PDF format.
+
+%description doc-pdf -l pl
+Dokumentacja Wine w formacie PDF.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
+%patch4 -p0
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
# turn off compilation of some tools
-sed -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in > .tmp
+#sed -e "s|winetest \\\|\\\|;s|avitools||" programs/Makefile.in > .tmp
+sed -e "s|avitools||" programs/Makefile.in > .tmp
mv -f .tmp programs/Makefile.in
%build
CPPFLAGS="-I/usr/include/ncurses"; export CPPFLAGS
CFLAGS="%{rpmcflags} $CPPFLAGS"
%configure \
-%{!?debug: --disable-debug} \
-%{!?debug: --disable-trace} \
+ %{!?debug:--disable-debug} \
+ %{!?debug:--disable-trace} \
--enable-curses \
--enable-opengl \
--with-x
-
%{__make} depend
%{__make}
%{__make} -C programs
%{__make} -C programs/regapi
cd documentation
-./db2html-winehq wine-user.sgml
-./db2html-winehq wine-devel.sgml
-./db2html-winehq winelib-user.sgml
+%if %{with html_docs}
+db2html wine-user.sgml
+db2html wine-devel.sgml
+db2html wine-faq.sgml
+db2html winelib-user.sgml
+%endif
+
+%if %{with pdf_docs}
+db2pdf wine-user.sgml
+db2pdf wine-devel.sgml
+db2pdf wine-faq.sgml
+db2pdf winelib-user.sgml
+%endif
cd -
%install
$RPM_BUILD_ROOT%{_winedir}/windows/{Profiles/Administrator,Recent} \
$RPM_BUILD_ROOT%{_winedir}/{"Program Files/Common Files","My Documents"}
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/wine
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wine
install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
programs="notepad progman regedit regsvr32 uninstaller wineconsole winefile winemine winepath winhelp wcmd"
+BZZZ=`pwd`
+rm -f files.so; touch files.so
+rm -f files.programs; touch files.programs
cd $RPM_BUILD_ROOT%{_libdir}/wine
for f in *.so; do
- other_so_list="$other_so_list\n%attr(755,root,root) %{_libdir}/wine/$f"
+ echo "%attr(755,root,root) %{_libdir}/wine/$f" >>$BZZZ/files.so
done
cd -
-for p in $programs; do
- programs_list="$programs_list\n%attr(755,root,root) %{_bindir}/$p"
- exe_so_list="$exe_so_list\n%attr(755,root,root) %{_libdir}/wine/$p.exe.so"
- other_so_list="`echo "$other_so_list" | grep -v "$p\.exe\.so$"`"
+for p in $programs; do
+ echo "%attr(755,root,root) %{_bindir}/$p" >> files.programs
+ echo "%attr(755,root,root) %{_libdir}/wine/$p.exe.so" >> files.programs
+ grep -v "$p\.exe\.so$" files.so > files.so.
+ mv -f files.so. files.so
done
-echo "$programs_list" > files.programs
-echo "$exe_so_list" >> files.programs
-echo "$other_so_list" > files.so
%clean
rm -rf $RPM_BUILD_ROOT
%files -f files.so
%defattr(644,root,root,755)
%doc README DEVELOPERS-HINTS ChangeLog BUGS AUTHORS ANNOUNCE
-%doc documentation/{wine-user,samples,status}
+%doc documentation/samples
+%if %{with html_docs}
+%doc documentation/wine-{faq,user}
+%endif
%attr(755,root,root) %{_bindir}/wine
+%attr(755,root,root) %{_bindir}/wineboot
+%attr(755,root,root) %{_bindir}/winecfg
+%attr(755,root,root) %{_bindir}/wineclipsrv
%attr(755,root,root) %{_bindir}/winedbg
+%attr(755,root,root) %{_bindir}/winelauncher
%attr(755,root,root) %{_bindir}/wineserver
-%attr(755,root,root) %{_bindir}/wineclipsrv
%attr(755,root,root) %{_bindir}/wineshelllink
%attr(755,root,root) %{_libdir}/*.so*
+%dir %{_libdir}/wine
%{_mandir}/man1/wine.*
%{_mandir}/man5/wine.conf.*
%config(noreplace) %{_sysconfdir}/wine.reg
%files devel
%defattr(644,root,root,755)
+%if %{with html_docs}
%doc documentation/{wine-devel,winelib-user,HOWTO-winelib}
+%endif
+%attr(755,root,root) %{_bindir}/fnt2bdf
+%attr(755,root,root) %{_bindir}/function_grep.pl
+%attr(755,root,root) %{_bindir}/hlp2sgml
+%attr(755,root,root) %{_bindir}/widl
%attr(755,root,root) %{_bindir}/winebuild
-%attr(755,root,root) %{_bindir}/winemaker
%attr(755,root,root) %{_bindir}/winedump
-%attr(755,root,root) %{_bindir}/wrc
+%attr(755,root,root) %{_bindir}/wineg++
+%attr(755,root,root) %{_bindir}/winegcc
+%attr(755,root,root) %{_bindir}/winemaker
+%attr(755,root,root) %{_bindir}/winewrap
%attr(755,root,root) %{_bindir}/wmc
-#%attr(755,root,root) %{_bindir}/widl
-%attr(755,root,root) %{_bindir}/hlp2sgml
-%attr(755,root,root) %{_bindir}/fnt2bdf
-%attr(755,root,root) %{_bindir}/function_grep.pl
+%attr(755,root,root) %{_bindir}/wrc
%{_includedir}/wine
%{_libdir}/*.a
%{_mandir}/man1/winemaker.*
-#%{_mandir}/man1/winebuild.*
+%{_mandir}/man1/winebuild.*
%{_mandir}/man1/wmc.*
%{_mandir}/man1/wrc.*
%{_aclocaldir}/*.m4
+
+%if %{with pdf_docs}
+%files doc-pdf
+%defattr(644,root,root,755)
+%doc documentation/*.pdf
+%endif