]> git.pld-linux.org Git - packages/dosemu.git/blobdiff - dosemu.spec
- added perl to BuildRequires
[packages/dosemu.git] / dosemu.spec
index fcd6449eb2ccf04e06ab0ace0095a6337abbc879..89ac3319ef618117c9ed89af97b06ccfa93572dd 100644 (file)
-Summary: A DOS emulator.
-Name: dosemu
-Version: 0.99.10
-Release: 4
-Exclusivearch: i386
-Copyright: distributable
-Group: Applications/Emulators
-Source0: ftp://dtp.dosemu.org/dosemu/dosemu-%{PACKAGE_VERSION}.tgz
-Source1: http://www.freedos.org/files/fdbeta1.zip
-# this kernel is generated from the freedos.144 floppy image coming with the
-# above. Why they ship the kernel on the floppy image only ?!
-Source2: dosemu-freedos-kernel.tar.gz
-Patch0: dosemu-0.66.7-config.patch
-Patch1: dosemu-0.66.7-glibc.patch
-Patch2: dosemu-0.66.7-pushal.patch
-Patch3: dosemu-0.98.1-security.patch
-Patch4: dosemu-0.98.1-justroot.patch
-Requires: kernel >= 2.0.28, mtools >= 3.6
-Url: http://www.dosemu.org
-Buildroot: /var/tmp/dosemu-root
+# Conditional build:
+# --with static        - links statically
 
-%package -n xdosemu
-Requires: dosemu = %{PACKAGE_VERSION}
-Summary: A DOS emulator for the X Window System.
-Group: Applications/Emulators
+%define         _kernel_ver %(grep UTS_RELEASE %{_kernelsrcdir}/include/linux/version.h 2>/dev/null| cut -d'"' -f2)
+%define         _kernel_ver_str %(echo %{_kernel_ver} | sed s/-/_/g)
+%define                _kernel24       %(echo %{_kernel_ver} | grep -q '2\.[012]\.' ; echo $?)
+%if %{_kernel24}
+%define                _moddir         /lib/modules/%{_kernel_ver}/misc
+%define                _moddirsmp      /lib/modules/%{_kernel_ver}smp/misc
+%else
+%define                _moddir         /lib/modules/%{_kernel_ver}/net
+%define                _moddirsmp      /lib/modules/%{_kernel_ver}smp/net
+%endif
+
+Summary:       A DOS emulator
+Summary(de):   DOS-Emulator
+Summary(fr):   Emulateur DOS
+Summary(pl):   Emulator DOSa
+Summary(tr):   DOS öykünümcüsü
+Name:          dosemu
+Version:       1.0.2
+Release:       3
+License:       distributable
+Group:         Applications/Emulators
+Group(de):     Applikationen/Emulators
+Group(pl):     Aplikacje/Emulatory
+Source0:       ftp://ftp.dosemu.org/dosemu/%{name}-%{version}.tgz
+Source1:       %{name}-pl-man-pages.tar.bz2
+Source2:       dosemu-sys.tar.gz
+Source3:       http://prdownloads.sourceforge.net/freedos/ke2025c16.zip
+Source4:       autoexec2.bat
+Source5:       config2.sys
+Source6:       keybpl.exe
+Source7:       egapl.exe
+Source8:       shsucdx.exe
+Patch0:                ftp://ftp.dosemu.org/dosemu/patch-1.0.2.1.gz
+Patch1:                %{name}-1.0.2-man-pages.patch
+Patch2:                %{name}-0.98.1-justroot.patch
+Patch3:                %{name}-0.98.1-security.patch
+Patch4:                %{name}-make-new.patch
+Patch5:                %{name}-Polish_keyboard.patch
+Patch6:                %{name}-dosemu_conf.patch
+
+URL:           http://www.dosemu.org/
+BuildRequires: XFree86-devel
+BuildRequires: bin86
+BuildRequires: bison
+BuildRequires: flex
+BuildRequires: perl
+BuildRequires: slang-devel
+BuildRequires: unzip
+%{?_with_static:BuildRequires: glibc-static}
+%{?_with_static:BuildRequires: XFree86-static}
+%{?_with_static:BuildRequires: slang-static}
+Obsoletes:     xdosemu
+Exclusivearch: %{ix86}
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+Conflicts:     kernel < 2.0.28
+Conflicts:     mtools < 3.6
 
-%package freedos
-Requires: dosemu = %{PACKAGE_VERSION}
-Summary: A FreeDOS hdimage for dosemu, a DOS emulator, to use.
-Group: Applications/Emulators
+%define                _xbindir        /usr/X11R6/bin
+%define                _dosemudir      /var/lib/dosemu
 
 %description
-Dosemu is a DOS emulator.  Once you've installed dosemu, start the DOS
-emulator by typing in the dos command.
+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 GNU/Linux system. You may also need to
+install the dosemu-freedos-* packages.
+
+%description -l es
+Esta es una versión del emulador DOS que fue proyectada para
+ejecutarse en secciones X Window. Ofrece soporte a gráficos VGA como
+también soporte a ratón.
 
-You need to install dosemu if you use DOS programs and you want to be able
-to run them on your Red Hat Linux system.  You may also need to install
-the dosemu-freedos package.
+%description -l pl
+Dosemu to Emulator systemu DOS. Po zainstalowaniu mo¿esz go uruchomiæ
+komend± "dos".
+
+Je¶li korzystasz z dosowych programów i chcia³by¶ je uruchamiaæ
+na twoim Linuksowym systemie zainstaluj dosemu. Mo¿esz te¿
+potrzebowaæ pakietów dosemu-freedos-*.
+
+%description -l pt_BR
+Essa é uma versão do emulador DOS que foi projetada para rodar em
+sessões X Window. Oferece suporte para gráficos VGA bem como suporte
+para mouse.
+
+%package -n xdosemu
+Summary:       A DOS emulator for the X Window System
+Summary(de):   DOS-Emulator für X
+Summary(fr):   Émulateur DOS conçu pou être lancé sous X
+Summary(tr):   X altýnda çalýþan DOS öykünümcüsü
+Group:         Applications/Emulators
+Group(de):     Applikationen/Emulators
+Group(pl):     Aplikacje/Emulatory
+Requires:      %{name} = %{version}
 
 %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.
+Window System. Xdosemu provides VGA graphics and mouse support.
+
+%description -n xdosemu -l de
+Dies ist eine Version des DOS-Emulators für X-Windows-Sitzungen. Er
+unterstützt VGA-Grafiken und Maus.
 
-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.
+%description -n xdosemu -l fr
+Version de l'émulateur DOS conçue pour tourner dans une session X.
+Offre une gestion des graphismes VGA et de la souris.
 
-%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 teh /var/lib/dosemu directory. The hdimage file is
-already bootable with FreeDOS.
+%description -n xdosemu -l pl
+Xdosemu jest wersj± emulatora dosemu dzia³aj±c± w X Window System.
+Xdosemu ma wsparcie dla grafiki VGA i obs³ugi myszki.
 
-You will need to edit your /etc/dosemu.conf file to add the
-image to the list of disk 'drives' used by dosemu.
+%description -n xdosemu -l tr
+Bu yazýlým, DOS öykünümcüsünün X altýnda çalýþan bir sürümüdür. VGA
+grafikleri ve fare desteði vardýr.
 
-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.
+%package -n kernel-net-dosnet
+Summary:       kernel module dosnet.o
+Summary(pl):   Modu³ dosnet.o do kernela
+Release:       %{release}@%{_kernel_ver_str}
+Group:         Applications/Emulators
+Group(de):     Applikationen/Emulators
+Group(pl):     Aplikacje/Emulatory
+Requires:      %{name} = %{version}
+Obsoletes:     dosnet
+Prereq:                /sbin/depmod
+
+%description -n kernel-net-dosnet
+Kernel module for dosnet (vnet). Dosnet lets you establish TCP/IP
+connection beetween dosemu session and Linux kernel. Read README
+for dosemu for more information.
+
+%description -n kernel-net-dosnet -l pl
+Modu³ dosnet.o dla kernela. Modu³ ten pozwala ³±czyæ siê programom
+DOSowym wykorzystuj±cym TCP/IP z Linuksem. Przydatny miêdzy innymi
+przy pisaniu programów sieciowych dla DOSa. Rzeteln± informacjê na
+temat dosnet mo¿esz znale¼æ w README do dosemu.   
+
+%package -n kernel-smp-net-dosnet
+Summary:       kernel module dosnet.o
+Summary(pl):   Modu³ dosnet.o do kernela
+Release:       %{release}@%{_kernel_ver_str}
+Group:         Applications/Emulators
+Group(de):     Applikationen/Emulators
+Group(pl):     Aplikacje/Emulatory
+Requires:      %{name} = %{version}
+Obsoletes:     dosnet
+Prereq:                /sbin/depmod
+
+%description -n kernel-smp-net-dosnet
+Kernel module for dosnet (vnet). Dosnet lets you establish TCP/IP
+connection beetween dosemu session and Linux kernel. Read README
+for dosemu for more information.
+
+%description -n kernel-smp-net-dosnet -l pl
+Modu³ dosnet.o dla kernela. Modu³ ten pozwala ³±czyæ siê programom
+DOSowym wykorzystuj±cym TCP/IP z Linuksem. Przydatny miêdzy innymi
+przy pisaniu programów sieciowych dla DOSa. Rzeteln± informacjê na
+temat dosnet mo¿esz znale¼æ w README do dosemu.   
 
 %prep
-%setup -q
-%patch0 -p1 -b .lock
-#%patch2 -p1 -b .pushal
-%patch3 -p1 -b .security
-%patch4 -p1 -b .justroot
-unzip -L $RPM_SOURCE_DIR/fdbeta1.zip
+%setup -q -a1 -a2
+%patch0 -p1
+%patch1 -p1
+#%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p0
+
 rm -rf freedos
 mkdir freedos
-for i in orlando/{base,sys,util}/?/*.zip ; do
-    unzip -d freedos -q $i
-done
-tar xzf $RPM_SOURCE_DIR/dosemu-freedos-kernel.tar.gz -C freedos
+unzip -q -L -o %{SOURCE3} -d freedos
 
 %build
-PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin
-./default-configure
-echo | make
+cp -f base-configure.in configure.in
+autoconf
+OPTFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"; export OPTFLAGS
+
+%{__cc} $OPTFLAGS -I%{_includedir} -D__KERNEL__ -D__KERNEL_SMP=1 \
+       -Wall -Wstrict-prototypes \
+       -fno-strength-reduce -I%{_kernelsrcdir}/include -Isrc/include \
+       -DMODULE \
+       -c -o src/dosext/net/v-net/dosnet.o src/dosext/net/v-net/dosnet.c
+mkdir src/dosext/net/v-net/smp
+mv -f src/dosext/net/v-net/dosnet.o src/dosext/net/v-net/smp/
+
+%{__cc} $OPTFLAGS -I%{_includedir} -D__KERNEL__ \
+       -Wall -Wstrict-prototypes \
+       -fno-strength-reduce -I%{_kernelsrcdir}/include -Isrc/include \
+       -DMODULE \
+       -c -o src/dosext/net/v-net/dosnet.o src/dosext/net/v-net/dosnet.c
+
+# non-X version
+%configure \
+%{?_with_static:--enable-linkstatic} \
+       --enable-new-intcode \
+       --enable-aspi \
+       --without-x
+echo | %{__make}
+mv -f bin/dosemu.bin bin/dos-nox
+
+# X version
+%configure \
+%{?_with_static:--enable-linkstatic} \
+       --enable-new-intcode \
+       --enable-aspi
+echo | %{__make}
+mv -f bin/dosemu.bin bin/dos-x
+mv -f bin/dos-nox bin/dosemu.bin
+
+
+mv -f man/dosemu.bin.1 man/dos.1
 
 %install
 rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT/etc
-make install INSTROOT=$RPM_BUILD_ROOT
-install -m 755 setup-hdimage $RPM_BUILD_ROOT/usr/bin
-install -m 755 src/tools/periph/{dexeconfig,hdinfo,mkhdimage,mkfatimage16} $RPM_BUILD_ROOT/usr/bin
-mkdir -p $RPM_BUILD_ROOT/usr/share/icons
-install -m 644 etc/dosemu.xpm $RPM_BUILD_ROOT/usr/share/icons
-install -m 644 etc/dosemu.users.secure $RPM_BUILD_ROOT/etc/dosemu.users
-src/tools/periph/mkfatimage16 -p -k 8192 -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/BIN freedos/DOC freedos/HELP n:
-mmd n:/DOSEMU
-mcopy -/ commands/* n:/DOSEMU
-mcopy 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/usr/bin
-
-cat <<EOF >$RPM_BUILD_ROOT/usr/bin/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/usr/bin/rundos
-
-# Strip things
-strip $RPM_BUILD_ROOT/usr/bin/* || :
-
-%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 || :
-
-%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 || :
-
-%post freedos
-[ -e /var/lib/dosemu/hdimage.first ] || \
-    ln -s hdimage.freedos /var/lib/dosemu/hdimage.first
-
-%postun 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)
-%doc QuickStart doc/*
-%dir /var/lib/dosemu
-%config /etc/dosemu.conf
-%config /etc/dosemu.users
-%config /var/lib/dosemu/hdimage
-%config /var/lib/dosemu/global.conf
-/usr/bin/dos
-/usr/bin/dosdebug
-/usr/bin/dosexec
-/usr/bin/dexeconfig
-/usr/bin/hdinfo
-/usr/bin/do_mtools
-/usr/bin/extract-dos
-/usr/bin/mkdexe
-/usr/bin/myxcopy
-/usr/bin/mkhdimage
-/usr/bin/mkfatimage16
-/usr/bin/rundos
-/usr/bin/setup-hdimage
-/usr/man/man1/dos.1
-/usr/man/man1/dosdebug.1
-/usr/man/man1/mkfatimage16.1
-/usr/share/icons/dosemu.xpm
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_xbindir},%{_sysconfdir},%{_pixmapsdir}} \
+       $RPM_BUILD_ROOT{%{_mandir}/man1,%{_mandir}/pl/man1} \
+       $RPM_BUILD_ROOT%{_dosemudir}/bootdir/{dosemu,freedos/doc/fdkernel}
 
-%files -n xdosemu
-%defattr(-,root,root)
-/usr/bin/xdos
-/usr/bin/xtermdos
-/usr/man/man1/xdos.1
-/usr/man/man1/xtermdos.1
-/usr/X11R6/lib/X11/fonts/misc/vga.pcf
+install bin/dosemu.bin $RPM_BUILD_ROOT%{_bindir}/dos
+install bin/dos-x $RPM_BUILD_ROOT%{_xbindir}/xdos
+install bin/dosdebug $RPM_BUILD_ROOT%{_bindir}/dosdebug
+install src/tools/periph/{dexeconfig,hdinfo,mkhdimage,mkfatimage16} $RPM_BUILD_ROOT%{_bindir}
+ln -sf dos $RPM_BUILD_ROOT%{_bindir}/dosexec
+
+install etc/dosemu.xpm $RPM_BUILD_ROOT%{_prefix}/X11R6/share/pixmaps
+install etc/dosemu.users.secure $RPM_BUILD_ROOT%{_sysconfdir}/dosemu.users
+install etc/global.conf $RPM_BUILD_ROOT%{_dosemudir}/global.conf
+install etc/dosemu.conf $RPM_BUILD_ROOT%{_sysconfdir}/dosemu.conf
+
+install man/{dos.1,dosdebug.1,xdos.1,mkfatimage16.1} $RPM_BUILD_ROOT%{_mandir}/man1
+install pl/man1/{dos.1,dosdebug.1,xdos.1} $RPM_BUILD_ROOT%{_mandir}/pl/man1
+
+install %{SOURCE4} $RPM_BUILD_ROOT%{_dosemudir}/bootdir/autoexec.bat
+install %{SOURCE5} $RPM_BUILD_ROOT%{_dosemudir}/bootdir/config.sys
+install %{SOURCE6} $RPM_BUILD_ROOT%{_dosemudir}/bootdir/keybpl.exe
+install %{SOURCE7} $RPM_BUILD_ROOT%{_dosemudir}/bootdir/egapl.exe
+install %{SOURCE8} $RPM_BUILD_ROOT%{_dosemudir}/bootdir/shsucdx.exe
+install src/plugin/commands/*.com $RPM_BUILD_ROOT%{_dosemudir}/bootdir/dosemu
+install dosemu/*.sys $RPM_BUILD_ROOT%{_dosemudir}/bootdir/dosemu
+install freedos/bin/kernel.sys $RPM_BUILD_ROOT%{_dosemudir}/bootdir
+install freedos/doc/fdkernel/* $RPM_BUILD_ROOT%{_dosemudir}/bootdir/freedos/doc/fdkernel
+ln -sf dosemu/comcom.com $RPM_BUILD_ROOT%{_dosemudir}/bootdir/command.com
+
+install -d $RPM_BUILD_ROOT{%{_moddir},%{_moddirsmp}}
+install src/dosext/net/v-net/dosnet.o $RPM_BUILD_ROOT%{_moddir}
+install src/dosext/net/v-net/smp/dosnet.o $RPM_BUILD_ROOT%{_moddirsmp}
+
+# Take out irritating ^H's from the documentation
+for i in `ls --color=no doc/` ; do cat doc/$i > $i ; cat $i | perl -p -e 's/.\b//g' > doc/$i ; done
+
+rm -f doc/{configuration,dosemu.lsm}
 
-%files freedos
-%config /var/lib/dosemu/hdimage.freedos
+gzip -9nf QuickStart COPYING ChangeLog* doc/*
 
 %clean
 rm -rf $RPM_BUILD_ROOT
-rm -f dosemu.files
+
+%post  -n kernel-net-dosnet
+/sbin/depmod -a
+
+%postun        -n kernel-net-dosnet
+/sbin/depmod -a
+
+%post  -n kernel-smp-net-dosnet
+/sbin/depmod -a
+
+%postun        -n kernel-smp-net-dosnet
+/sbin/depmod -a
+%files
+%defattr(644,root,root,755)
+%doc *.gz doc/*
+%dir %{_dosemudir}
+%config(noreplace) %{_sysconfdir}/dosemu.conf
+%config(noreplace) %{_sysconfdir}/dosemu.users
+%config(noreplace) %{_dosemudir}/global.conf
+%attr(755,root,root) %{_bindir}/dos
+%attr(755,root,root) %{_bindir}/dosdebug
+%attr(755,root,root) %{_bindir}/dosexec
+%attr(755,root,root) %{_bindir}/dexeconfig
+%attr(755,root,root) %{_bindir}/hdinfo
+%attr(755,root,root) %{_bindir}/mkhdimage
+%attr(755,root,root) %{_bindir}/mkfatimage16
+%dir %{_dosemudir}/bootdir
+%dir %{_dosemudir}/bootdir/dosemu
+%dir %{_dosemudir}/bootdir/freedos
+%{_dosemudir}/bootdir/dosemu/*
+%{_dosemudir}/bootdir/kernel.sys
+%config(noreplace) %{_dosemudir}/bootdir/autoexec.bat
+%config(noreplace) %{_dosemudir}/bootdir/config.sys
+%{_dosemudir}/bootdir/command.com
+%{_dosemudir}/bootdir/*.exe
+%{_dosemudir}/bootdir/freedos/*
+%{_mandir}/man1/[dm]*
+%lang(pl) %{_mandir}/pl/man1/d*
+%{_pixmapsdir}/dosemu.xpm
+
+%files -n xdosemu
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_xbindir}/xdos
+%{_mandir}/man1/xdos.1*
+%lang(pl) %{_mandir}/pl/man1/xdos.1*
+
+%files -n kernel-net-dosnet
+%defattr(644,root,root,755)
+%{_moddir}/dosnet.o
+
+%files -n kernel-smp-net-dosnet
+%defattr(644,root,root,755)
+%{_moddirsmp}/dosnet.o
This page took 0.035472 seconds and 4 git commands to generate.