Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1576926
 поиск   регистрация   авторизация 
 
Группа :: Эмуляторы
Пакет: dosemu

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

%def_with M24

%if_with M24
%define _release alt3.M24.1
%else
%define _release alt4
%endif

Name: dosemu
Version: 1.3.2
Release: %_release
Serial: 1
Packager: Grigory Batalov <bga at altlinux.ru>

Summary: The Linux DOS emulator
Summary(ru_RU.KOI8-R): Эмулятор DOS под Linux
License: GPL
Group: Emulators
Url: http://dosemu.sourceforge.net/

# re-packing to bz2 isn't allowed by dosemu's license ;-)

Source0: http://heanet.dl.sourceforge.net/sourceforge/dosemu/%name-%version.tgz
# icons from Mandrake
Source2: dosemu-1.1.4-mdk-xdosemu.xpm.gz
Source3: dosemu-1.1.4-mdk-xdosemu-mini.xpm.gz
Source4: dosemu-1.1.4-mdk-xdosemu-large.xpm.bz2

Source5: dosemu-1.3.2-alt-dosemu-bin-x.xml
Source6: dosemu-1.3.2-alt-dosemu-bin-nox.xml
# patch 1.2.0 -> 1.2.1
#Source7: http://heanet.dl.sourceforge.net/sourceforge/dosemu/patchset-1.2.1.tar.bz2

# sources and precompiled fonts

Source9: dosemu-1.2.0.1-alt-fonts.tar.bz2

# xdosemu wrapper

Source12: dosemu-1.3.2-alt-xdosemu.wrapper
# default /etc/dosemu.users
Source13: dosemu-1.2.0.1-alt-dosemu.users

# compiletime settings

Patch3: dosemu-1.1.4.15-alt-compile.patch
# bdftopcf and mkfontdir removing
Patch4: dosemu-1.3.2-alt-makefile.patch.gz
# README.ALT
Patch5: dosemu-1.1.4.15-alt-readme.patch.bz2
# HP1100 cp866 fonts howto
Patch6: dosemu-1.1.4-alt-hp1100.patch.gz
# define locale while installing to user's directory
Patch7: dosemu-1.2.2-alt-locale2.patch.gz

# patches from SourceForge bugtracker

# loop in coopthreads removed (ID #605551)
Patch11: dosemu-1.1.4-stas-coopthreads.diff

# oplocks fix (?) (Sergey Suleymanov)

# (just stored here, not applied)
Patch16: dosemu-1.1.3.2-oplocks.patch

# Patches from Stas Sergeev <stssppnn at yahoo.com>

# http://dosemu.sourceforge.net/stas/
# (all included in 1.1.4.6)

# Fix blinking attribute that corrupts characters

# in Norton Diags and DOS Navigator
Patch20: dosemu-1.3.2-bart-blinking.patch

Obsoletes: xdosemu
Provides: xdosemu = %version-%release

# for wrapper call

Requires: xvt, %_bindir/dosemu.bin

# Added on Mon May 23 2005

BuildRequires: XFree86-devel flex libSDL-devel libslang-devel libgpm-devel glibc-devel libalternatives-devel

%description
This package allows MS-DOS programs to be started in Linux. A virtual
machine (the DOS box) provides the necessary BIOS functions and emulates
most of the chip devices (e.g. timer, interrupt- and keyboard controler)
Documentation can be found in %_defaultdocdir/%name-%version and in the man
page, as well as in the sources.
You probably need dosemu-freedos package too.

%description -l ru_RU.KOI8-R
DOSEmu позволяет запускать программы MS-DOS под Linux. Виртуальная
машина (DOS) предоставляет необходимые функции BIOS и эмулирует
большинство устройств, таких как таймер, контроллеры прерываний
и клавиатуры. Документацию можно найти в %_defaultdocdir/%name-%version
и на страницах руководства (man). Как, впрочем, и в исходниках.
Вероятно, вам также понадобится пакет dosemu-freedos.

%package bin-x
Summary: Dosemu binary with X11 support
License: GPL
Group: Emulators
PreReq: alternatives
Provides: %_bindir/dosemu.bin

%description bin-x
The Linux DOS Emulator binary (dosemu.bin) with XFree86/Xorg and
SDL support.

%package bin-nox
Summary: Dosemu binary without X11 support
License: GPL
Group: Emulators
PreReq: alternatives
Provides: %_bindir/dosemu.bin

%description bin-nox
The Linux DOS Emulator binary (dosemu.bin) without XFree86/Xorg or
SDL support.

%prep
%setup -q -n %name-%version
# template for future patchsets
#%__tar xjf %SOURCE7
#sh tmp/do_patch

%__mv -f compiletime-settings.devel compiletime-settings
%patch3 -p0
%patch4 -p1
# README.ALT
#%patch5 -p1
%patch6 -p1
%patch7 -p1

##%patch11 -p0


%patch20 -p0

%__subst "s!#[[:space:]]*\(\$_cli_timeout[[:space:]]*=[[:space:]]*\)(.*!\1(10)!g" etc/dosemu.conf
%__subst "s!#[[:space:]]*\(\$_ttylocks[[:space:]]*=[[:space:]]*\)\".*!\1\"/var/lock/serial\"!g" etc/dosemu.conf

# copy sources and precompiled VGA fonts

%__tar xjf %SOURCE9 -C etc
%__gzip etc/*.pcf

# to avoid automatic autoreconf call

#touch configure.ac configure

%build
%__subst "s! x on! x off!g" compiletime-settings
%__subst "s! plugin_sdl on! plugin_sdl off!g" compiletime-settings
%configure --with-pthreads
%make_build WAIT=no prefix=%_prefix
%__cp -f bin/dosemu.bin dosemu.bin.nox

%make clean

%__subst "s! x off! x on!g" compiletime-settings
%__subst "s! plugin_sdl off! plugin_sdl on!g" compiletime-settings
%configure --with-pthreads
%make_build WAIT=no prefix=%_prefix
%__cp -f bin/dosemu.bin dosemu.bin.x

%install
# install itself
%make_install install DESTDIR=%buildroot prefix=%prefix \
            mandir=%_mandir docdir=%_defaultdocdir/%name-%version
# /var/lib/dosemu for custom DOS
%__mkdir_p %buildroot%_localstatedir/dosemu

# xdosemu wrapper

%__install -m755 %SOURCE12 %buildroot%_bindir/xdosemu.wrapper
# default /etc/dosemu.users
%__install -m644 %SOURCE13 %buildroot%_sysconfdir/dosemu.users
# copy icons
%__mkdir_p %buildroot{%_iconsdir,%_liconsdir,%_miconsdir}
%__gzip  -cd %SOURCE2 > %buildroot%_iconsdir/xdosemu.xpm
%__gzip  -cd %SOURCE3 > %buildroot%_miconsdir/xdosemu.xpm
%__bzip2 -cd %SOURCE4 > %buildroot%_liconsdir/xdosemu.xpm
# adjusting docs
#%__mv %buildroot%_sysconfdir/%name/global.conf %buildroot%_defaultdocdir/%name-%version
%__install -m644 doc/HP1100-cp866-fonts-HOWTO.txt %buildroot%_defaultdocdir/%name-%version/

# install x/nox binaries

%__install -m755 dosemu.bin.x %buildroot%_bindir/dosemu.bin.x
%__install -m755 dosemu.bin.nox %buildroot%_bindir/dosemu.bin.nox

# install alternatives

%__install -d %buildroot%_altdir
%__install -m644 %SOURCE5 %buildroot%_altdir/dosemu-bin-x.xml
%__install -m644 %SOURCE6 %buildroot%_altdir/dosemu-bin-nox.xml

# Menu entry for xdosemu

%__mkdir_p %buildroot%_menudir
%__cat >%buildroot%_menudir/xdosemu <<EOF
?package(%name-bin-x):command="%_bindir/xdosemu.wrapper" needs="X11" \
icon="xdosemu.xpm" section="Applications/Emulators" title="DOS emulator" \
longtitle="DOS emulator running under X"
EOF

%post
# (making fontlist)
if [ -x %_x11bindir/mkfontdir ]; then
  (cd %_datadir/dosemu/Xfonts; %_x11bindir/mkfontdir)
fi

%preun
# (removing fontlist)
if [ $1 = "0" -a -f %_datadir/dosemu/Xfonts/fonts.dir ]; then
  %__rm -f %_datadir/dosemu/Xfonts/fonts.dir
fi

%triggerpostun bin-x -- dosemu < 1:1.3.2-alt3.M24.1
[ -f %_altdir/dosemu-bin-x.xml ] && %register_alternatives dosemu-bin-x.xml

%triggerpostun bin-nox -- dosemu < 1:1.3.2-alt3.M24.1
[ -f %_altdir/dosemu-bin-nox.xml ] && %register_alternatives dosemu-bin-nox.xml

%post bin-x
%register_alternatives dosemu-bin-x.xml
%update_menus

%preun bin-x
%unregister_alternatives dosemu-bin-x.xml

%postun bin-x
%clean_menus

%post bin-nox
%register_alternatives dosemu-bin-nox.xml

%preun bin-nox
%unregister_alternatives dosemu-bin-nox.xml

%files
%config(noreplace) %_sysconfdir/dosemu.conf
%config(noreplace) %_sysconfdir/dosemu.users
%config(noreplace) %_sysconfdir/global.conf
%exclude %_bindir/dosemu.bin*
%exclude %_bindir/xdosemu*
%_bindir/*
%dir %_localstatedir/dosemu
%dir %_datadir/dosemu
%_datadir/dosemu/*
%_iconsdir/xdosemu.xpm
%_miconsdir/xdosemu.xpm
%_liconsdir/xdosemu.xpm
%doc %_defaultdocdir/%name-%version
%doc %_man1dir/*

%files bin-x
%_altdir/dosemu-bin-x.xml
%_bindir/dosemu.bin.x
%_bindir/xdosemu*
%_menudir/xdosemu

%files bin-nox
%_altdir/dosemu-bin-nox.xml
%_bindir/dosemu.bin.nox

%changelog

Полный changelog можно просмотреть здесь

 
design & coding: Vladimir Lettiev aka crux © 2004-2005