Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > main-src > by-pkgid > bd14e16455278b729435b6f9e9b8983d > files > 15

dosemu-1.0.1-8mdk.src.rpm

Summary: A DOS emulator.
Name: dosemu
Version: 1.0.1
Release: 8mdk
Exclusivearch: %{ix86}
Copyright: distributable
Group: Emulators
BuildRequires: XFree86-devel
Source0: ftp://dtp.dosemu.org/dosemu/dosemu-%{PACKAGE_VERSION}.tar.bz2
Source1: http://www.freedos.org/files/distributions/base1.zip
Source2: http://www.freedos.org/files/distributions/util1.zip
Source3: http://www.freedos.org/files/distributions/edit1.zip
Source4: ftp://ftp.gcfl.net/freedos/kernel/latestbin.zip
Source5: ftp://ftp.simtel.net/pub/simtelnet/msdos/editor/vim53d16.zip
Source6: ftp://ftp.simtel.net/pub/simtelnet/msdos/editor/vim53rt.zip
Source7: autoexec.bat
Source8: config.sys
Source9: xdosemu.xpm
Source10: mini-xdosemu.xpm
Source11: xdosemu-large.xpm
Patch0: dosemu-0.66.7-config.patch.bz2
Patch1: dosemu-0.66.7-glibc.patch.bz2
Patch2: dosemu-0.66.7-pushal.patch.bz2
Patch3: dosemu-0.98.1-security.patch.bz2
Patch4: dosemu-0.98.1-justroot.patch.bz2
Patch5: dosemu-nonrootinstall.patch.bz2
# (fg) 20000721 For the BM...
Patch6: dosemu-fhs-Makefile-fix.patch.bz2
Patch7: dosemu-let-users-play.patch.bz2
Patch8: dosemum-1.0.0-glibc22.patch.bz2
Patch9: dosemu-1.0.1-dosemu_bios.patch.bz2
Patch10: dosemu-1.0.1-gcc2.96.patch.bz2
Requires: kernel >= 2.0.28, mtools >= 3.9, dosimage
Url: http://www.dosemu.org
Buildroot: %{_tmppath}/%{name}-%{version}

%description
Dosemu is a DOS emulator.  Once you've installed dosemu, start the DOS
emulator by typing in the dos command.

You need to install dosemu if you use DOS programs and you want to be able
to run them on your Linux-Mandrake system.  You may also need to install
the dosemu-freedos package.

################

%package -n xdosemu
Requires: dosemu = %{PACKAGE_VERSION}, dosimage
Summary: A DOS emulator for the X Window System.
Group: Emulators

%description -n xdosemu
Xdosemu is a version of the dosemu DOS emulator that runs with the X
 Window System.  Xdosemu provides VGA graphics and mouse support.

Install xdosemu if you need to run DOS programs on your system, and you'd
like to do so with the convenience of graphics support and mouse
capabilities.

################

%package freedos
Summary: A FreeDOS hdimage for dosemu, a DOS emulator, to use.
Group: Emulators
Provides: dosimage

%description freedos
Generally, the dosemu DOS emulator requires either that your system
have some version of DOS available or that your system's partitions
were formatted and installed with DOS. If your system does not meet
either of the previous requirements, you can instead use the dosemu-
freedos package, which contains an hdimage file which will be
installed in the /var/lib/dosemu directory. The hdimage file is
already bootable with FreeDOS.

You will need to edit your /etc/dosemu.conf file to add the
image to the list of disk 'drives' used by dosemu.

Install dosemu-freedos if you are installing the dosemu package
and you don't have a version of DOS available on your system,
and your system's partitions were not formatted and installed
with DOS.

%prep
%setup -q
%patch0 -p1
#%patch2 -p1 -b .pushal
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1

rm -rf freedos
mkdir -p freedos/{kernel,tmp,vim}

unzip -L -d freedos/kernel/ -j $RPM_SOURCE_DIR/latestbin.zip
cp -f contrib/dosC/dist/* freedos/kernel
for i in $RPM_SOURCE_DIR/{base1.zip,edit1.zip,util1.zip}; do
	unzip -L -d freedos/tmp $i
done
for i in freedos/tmp/*.zip ; do 
	unzip -L -o -d freedos $i
done
unzip -L -o -d freedos $RPM_SOURCE_DIR/vim53rt.zip
unzip -L -o -d freedos/vim-5.3 $RPM_SOURCE_DIR/vim53d16.zip

%build
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin
./default-configure
echo | make

%install
rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}
make install INSTROOT=$RPM_BUILD_ROOT

install -m 755 setup-hdimage $RPM_BUILD_ROOT/%{_bindir}
install -m 755 src/tools/periph/{dexeconfig,hdinfo,mkhdimage,mkfatimage16} $RPM_BUILD_ROOT/%{_bindir}

mkdir -p $RPM_BUILD_ROOT/%{_datadir}/icons/{mini,large}
# (fg) Use new icons from LN
#install -m 644 etc/dosemu.xpm $RPM_BUILD_ROOT/usr/share/icons
install -m644 %{SOURCE9} $RPM_BUILD_ROOT/%{_iconsdir}/xdosemu.xpm
install -m644 %{SOURCE10} $RPM_BUILD_ROOT/%{_miconsdir}/xdosemu.xpm
install -m644 %{SOURCE11} $RPM_BUILD_ROOT/%{_liconsdir}/xdosemu.xpm

install -m 644 etc/dosemu.users.secure $RPM_BUILD_ROOT/%{_sysconfdir}/dosemu.users

src/tools/periph/mkfatimage16 -p -k 16192 -l FreeDos \
	-b freedos/kernel/boot.bin \
	-f $RPM_BUILD_ROOT/var/lib/dosemu/hdimage.freedos \
	freedos/kernel/* 

FREEDOS=`/bin/mktemp /tmp/freedos.XXXXXX`
echo "drive n: file=\"$RPM_BUILD_ROOT/var/lib/dosemu/hdimage.freedos\" offset=8832" > $FREEDOS
MTOOLSRC=$FREEDOS
export MTOOLSRC

mcopy -o/ freedos/{vim-5.3,bin,doc,help,emacs} n:
mmd n:/DOSEMU
mcopy -/ commands/* n:/DOSEMU
mcopy -o $RPM_SOURCE_DIR/autoexec.bat $RPM_SOURCE_DIR/config.sys commands/exitemu* n:/
mdir -w n:

rm -f $FREEDOS
unset MTOOLSRC

install -m 644 etc/hdimage.dist $RPM_BUILD_ROOT/var/lib/dosemu/hdimage
# install dexe utils
install -m 755 dexe/{do_mtools,extract-dos,mkdexe,myxcopy} $RPM_BUILD_ROOT/%{_bindir}

cat <<EOF >$RPM_BUILD_ROOT/%{_bindir}/rundos
#!/bin/sh
BINDIR=/bin
export BINDIR 
# ignore errors if user does not have module installed
/usr/bin/dos
EOF

chmod 0755 $RPM_BUILD_ROOT/%{_bindir}/rundos

# Take out irritating ^H's from the documentation
for i in `ls --color=no doc/` ; do perl -pi -e 's/.//g' doc/$i ; done

# (fg) Menu entry for xdos
mkdir -p $RPM_BUILD_ROOT/%{_menudir}
cat >$RPM_BUILD_ROOT/%{_menudir}/xdosemu <<EOF
?package(xdosemu):command="%{_bindir}/xdos" needs="X11" icon="xdosemu.xpm" \
section="Applications/Emulators" title="DOS emulator" \
longtitle="DOS emulator running under X"
EOF

# BEGIN %post and %postun for xdosemu

%post -n xdosemu
if [ -x /usr/X11R6/bin/mkfontdir ]; then
	(cd /usr/X11R6/lib/X11/fonts/misc; /usr/X11R6/bin/mkfontdir)
fi
killall -USR1 xfs > /dev/null 2>&1 || :

# (fg) For the menu entry
%{update_menus}

%postun -n xdosemu
if [ -x /usr/X11R6/bin/mkfontdir ]; then
	(cd /usr/X11R6/lib/X11/fonts/misc; /usr/X11R6/bin/mkfontdir)
fi
killall -USR1 xfs > /dev/null 2>&1 || :

# (fg) For the menu entry
%{clean_menus}

# END %post and %postun for xdosemu

%post freedos
[ -e /var/lib/dosemu/hdimage.first ] || \
    ln -s hdimage.freedos /var/lib/dosemu/hdimage.first

# (fg) This was postun before, but it has to be preun - otherwise, rpm will
# complain tha /var/lib/dosemu is not empty when removing
%preun freedos
if [ $1 = 0 ]; then
  if [ -e /var/lib/dosemu/hdimage.first ]; then
    rm -f /var/lib/dosemu/hdimage.first
  fi
fi
    
%files
%defattr(-,root,root,755)
%doc QuickStart doc/*
%dir /var/lib/dosemu
%config(noreplace) %{_sysconfdir}/dosemu.conf
%config(noreplace) %{_sysconfdir}/dosemu.users
%config(noreplace) /var/lib/dosemu/hdimage
%config(noreplace) /var/lib/dosemu/global.conf
%attr(4755,root,root) %{_bindir}/dos
%{_bindir}/dosdebug
%{_bindir}/dosexec
%{_bindir}/dexeconfig
%{_bindir}/hdinfo
%{_bindir}/do_mtools
%{_bindir}/extract-dos
%{_bindir}/mkdexe
%{_bindir}/myxcopy
%{_bindir}/mkhdimage
%{_bindir}/mkfatimage16
%{_bindir}/rundos
%{_bindir}/setup-hdimage
%{_mandir}/man1/dos.1.bz2
%{_mandir}/man1/dosdebug.1.bz2
%{_mandir}/man1/mkfatimage16.1.bz2

%files -n xdosemu
%defattr(-,root,root,755)
%{_bindir}/xdos
%{_bindir}/xtermdos
%{_mandir}/man1/xdos.1.bz2
/usr/X11R6/lib/X11/fonts/misc/vga.pcf
%{_menudir}/xdosemu
%{_miconsdir}/xdosemu.xpm
%{_liconsdir}/xdosemu.xpm
%{_iconsdir}/xdosemu.xpm

%files freedos
%defattr(-,root,root,755)
%config(noreplace) /var/lib/dosemu/hdimage.freedos

%clean
rm -rf $RPM_BUILD_ROOT

%changelog

* Thu Jan 04 2001 Francis Galiegue <fg@mandrakesoft.com> 1.0.1-8mdk

- xdosemu does not own %%_?iconsdir anymore

* Thu Oct 19 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.0.1-7mdk
- Fix gcc2.96  and various compilation problems.

* Wed Sep 20 2000 Francis Galiegue <fg@mandrakesoft.com> 1.0.1-6mdk
- Large icon is now transparent
- Let users at least do some things

* Fri Sep 15 2000 Francis Galiegue <fg@mandrakesoft.com> 1.0.1-4mdk
- More macros
- Added large icon
- fix %post for menus

* Mon Aug 07 2000 Frederic Lepied <flepied@mandrakesoft.com> 1.0.1-3mdk
- automatically added BuildRequires

* Thu Jul 20 2000 Francis Galiegue <fg@mandrakesoft.com> 1.0.1-2mdk
- BMacros
- hdimage.freedos is %config(noreplace)

* Wed Jul 05 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.0.1-1mdk
- new release

* Mon Apr 10 2000 Francis Galiegue <fg@mandrakesoft.com> 1.0.0-5mdk

- Use new icons from LN
- Menu entry changed accordingly
- no icon for dosemu package, only for xdosemu

* Fri Apr 07 2000 Francis Galiegue <fg@mandrakesoft.com> 1.0.0-4mdk

- freedos doesn't depend on dosemu
- freedos provides dosimage
- Both xdosemu and dosemu require dosimage
- Doubt: is mtools a Requires or a BuildRequires ?

* Mon Apr 03 2000 Francis Galiegue <fg@mandrakesoft.com> 1.0.0-3mdk

- Added %defattr for freedos

* Wed Mar 22 2000 Francis Galiegue <fg@mandrakesoft.com> 1.0.0-2mdk

- Rebuilt on kenobi

* Mon Mar 13 2000 Francis Galiegue <francis@mandrakesoft.com> 1.0.0-1mdk

- Version 1.0.0
- Changed group to match those of 7.1
- Build as non root
- Added menu entry for xdos
- spec file rework
- let spec-helper do its job
* Tue Dec 07 1999 Jerome Dumonteil <jd@mandrakesoft.com>
- added _tmppath in buildroot
- build release

* Wed Jul 14 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>

- 0.99.13 version.

* Mon Jul 05 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>

- Reinserting Mandrake adaptations for maintenance release.

* Mon Jun 07 1999 Dale Lovelace <dale@redhat.com>
- remove ^H's from documentation
- freedos version beta 2
- add autoexec.bat and config.sys for path
- add freedos utils
- add vim

* Wed Mar 31 1999 Preston Brown <pbrown@redhat.com>
- add dexe stuff back into package

* Fri Mar 26 1999 Preston Brown <pbrown@redhat.com>
- remove hdimage.first link on deinstallation of freedos.

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 2)

* Wed Mar 17 1999 Matt Wilson <msw@redhat.com>
- fixed %post and %postun scripts
- version 0.99.10

* Tue Jan 12 1999 Matt Wilson <msw@redhat.com>
- version 0.99.6

* Sat Oct 10 1998 Cristian Gafton <gafton@redhat.com>
- strip binaries
- version 0.98.1
- freedos has its own subpackage

* Wed Jun 24 1998 Alan Cox <alan@redhat.com>
- Wrote additional fixes for dexe overflow problem in parser.y

* Tue Jun 23 1998 Alan Cox <alan@redhat.com>
- Applied the security fixes from Hans Lerman

* Fri May 08 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Fri Apr 10 1998 Cristian Gafton <gafton@redhat.com>
- added DOS-C kernel and FreeDos utilities

* Thu Jan 29 1998 Cristian Gafton <gafton@redhat.com>
- updated spec file to include all the available commands
- uses a buildroot
- ship mkfatimage16, which is the only binary that can create a real hdimage
  file

* Mon Nov 03 1997 Michael K. Johnson <johnsonm@redhat.com>
- Updated to 0.66.7
- Ported to glibc

* Wed Apr 16 1997 Erik Troan <ewt@redhat.com>
- Updated to 0.66.2.
- Removed /usr/bin/load-dosmods as we don't need emumod.o anymore

* Tue Mar 11 1997 Michael K. Johnson <johnsonm@redhat.com>
- Modify the default configuration file to use /var/lock in
  ascii format for lock files, as specified in the FSSTD/FHS.

* Thu Mar 06 1997 Michael K. Johnson <johnsonm@redhat.com>
- Assume vm86plus system call does not exist.
- N.B. This should be changed in a future version with a later kernel
  that supports that system call by default.
- Install the mkhdimage program.