2001-06-02 11:42:37 +04:00
|
|
|
Summary: Bochs Project x86 PC Emulator
|
2001-05-22 20:50:15 +04:00
|
|
|
Name: bochs
|
2001-11-10 06:39:55 +03:00
|
|
|
Version: @SEDVERSION@
|
2001-05-25 20:58:48 +04:00
|
|
|
Release: 1
|
2001-05-22 20:50:15 +04:00
|
|
|
License: LGPL
|
|
|
|
Group: Applications/Emulators
|
|
|
|
URL:http://bochs.sourceforge.net
|
2005-03-13 11:28:55 +03:00
|
|
|
Packager:Volker Ruppert <info@vruppert.de>
|
2001-12-08 18:59:50 +03:00
|
|
|
Source:bochs-@SEDVERSION@.tar.gz
|
2001-12-08 08:35:57 +03:00
|
|
|
BuildRoot: /var/tmp/%{name}-buildroot
|
2001-06-06 17:57:24 +04:00
|
|
|
|
2001-05-22 20:50:15 +04:00
|
|
|
%description
|
2005-03-13 11:28:55 +03:00
|
|
|
Bochs is a highly portable open source IA-32 (x86) PC emulator written
|
|
|
|
in C++, that runs on most popular platforms. It includes emulation of
|
|
|
|
the Intel x86 CPU, common I/O devices, and a custom BIOS. Currently,
|
|
|
|
Bochs can be compiled to emulate a 386, 486, Pentium, Pentium Pro or
|
2010-02-21 09:38:21 +03:00
|
|
|
AMD64 CPU, including optional MMX, SSEx and 3DNow! instructions.
|
2005-03-13 11:28:55 +03:00
|
|
|
Bochs is capable of running most Operating Systems inside the emulation
|
2010-02-21 09:38:21 +03:00
|
|
|
including Linux, DOS, Windows 9X/NT/2000/XP or Windows 7.
|
2001-06-06 17:57:24 +04:00
|
|
|
|
2002-11-19 22:32:09 +03:00
|
|
|
%define pkg_name bochs
|
|
|
|
|
2001-05-22 20:50:15 +04:00
|
|
|
%prep
|
2001-12-08 18:59:50 +03:00
|
|
|
rm -rf $RPM_BUILD_DIR/bochs-@SEDVERSION@
|
|
|
|
tar xzvf $RPM_SOURCE_DIR/bochs-@SEDVERSION@.tar.gz
|
2001-12-08 08:35:57 +03:00
|
|
|
if test "/" != $RPM_BUILD_ROOT; then
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
fi
|
2001-05-22 20:50:15 +04:00
|
|
|
%build
|
2001-12-08 18:59:50 +03:00
|
|
|
cd $RPM_BUILD_DIR/bochs-@SEDVERSION@
|
2002-11-02 19:09:36 +03:00
|
|
|
CONFIGURE_ARGS="--prefix=/usr --mandir=$RPM_BUILD_ROOT/%{_mandir}"
|
2001-06-06 17:57:24 +04:00
|
|
|
export CONFIGURE_ARGS
|
|
|
|
sh .conf.linux
|
2001-05-22 20:50:15 +04:00
|
|
|
make
|
2001-12-08 08:35:57 +03:00
|
|
|
make unpack_dlx # must use prefix=/usr since this step sets up
|
|
|
|
# the paths in dlx bochsrc file.
|
2001-05-22 20:50:15 +04:00
|
|
|
%install
|
|
|
|
pwd
|
2001-12-08 18:59:50 +03:00
|
|
|
cd $RPM_BUILD_DIR/bochs-@SEDVERSION@
|
2002-11-11 16:13:16 +03:00
|
|
|
for i in "" usr usr/bin usr/lib usr/share usr/share/doc %{_mandir}; do
|
2001-12-08 08:35:57 +03:00
|
|
|
if ! test -d $RPM_BUILD_ROOT/$i; then mkdir $RPM_BUILD_ROOT/$i; fi
|
2001-06-06 17:57:24 +04:00
|
|
|
done
|
2002-06-26 21:10:36 +04:00
|
|
|
make install install_dlx prefix=$RPM_BUILD_ROOT/usr
|
2002-11-19 23:26:09 +03:00
|
|
|
# Build list of plugins on the fly (if any). This allows the
|
|
|
|
# spec file to support RPM building with or without plugins.
|
2002-11-19 22:32:09 +03:00
|
|
|
cd $RPM_BUILD_ROOT
|
2002-11-19 23:50:04 +03:00
|
|
|
find ./usr/lib -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > \
|
2002-11-19 22:32:09 +03:00
|
|
|
$RPM_BUILD_DIR/file.list.%{pkg_name}
|
2002-11-19 23:50:04 +03:00
|
|
|
find ./usr/lib -type f | sed -e 's,^\.,\%attr(-\,root\,root) ,' \
|
2002-11-19 22:32:09 +03:00
|
|
|
-e '/\/etc\//s|^|%config|' >> \
|
|
|
|
$RPM_BUILD_DIR/file.list.%{pkg_name}
|
2002-11-19 23:50:04 +03:00
|
|
|
find ./usr/lib -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> \
|
2002-11-19 22:32:09 +03:00
|
|
|
$RPM_BUILD_DIR/file.list.%{pkg_name}
|
2002-11-19 23:26:09 +03:00
|
|
|
# We could use the same technique to produce the complete file list,
|
|
|
|
# with only one very minor problem: it lists directories that are
|
|
|
|
# used by other programs, so when you remove the package you get
|
|
|
|
# errors like
|
|
|
|
# error: cannot remove /usr/share/doc - directory not empty
|
2002-11-19 22:32:09 +03:00
|
|
|
|
|
|
|
%files -f file.list.%{pkg_name}
|
2002-12-06 23:44:12 +03:00
|
|
|
%defattr(-, root, root)
|
2002-11-19 23:26:09 +03:00
|
|
|
/usr/bin/bochs
|
|
|
|
/usr/bin/bochs-dlx
|
2003-10-04 02:38:57 +04:00
|
|
|
/usr/bin/bxcommit
|
2002-11-19 23:26:09 +03:00
|
|
|
/usr/bin/bximage
|
|
|
|
/usr/share/bochs/*
|
|
|
|
/usr/share/doc/*
|
|
|
|
%{_mandir}/*
|
2001-06-06 17:57:24 +04:00
|
|
|
|
|
|
|
%clean
|
2001-12-08 18:59:50 +03:00
|
|
|
rm -rf $RPM_BUILD_DIR/bochs-@SEDVERSION@
|
2002-11-19 22:32:09 +03:00
|
|
|
rm -rf $RPM_BUILD_DIR/file.list.%{pkg_name}
|
2001-12-08 08:35:57 +03:00
|
|
|
if test "/" != $RPM_BUILD_ROOT; then
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
fi
|
2001-06-06 17:57:24 +04:00
|
|
|
%preun
|
|
|
|
# clean up the bochsout.txt that is always produced if you
|
|
|
|
# run bochs-dlx.
|
2010-02-21 09:38:21 +03:00
|
|
|
rm -rf /usr/share/bochs/dlxlinux/bochsout.txt
|
2001-06-06 17:57:24 +04:00
|
|
|
%postun
|
2002-06-26 21:10:36 +04:00
|
|
|
rmdir /usr/share/bochs > /dev/null 2>&1
|