]> git.pld-linux.org Git - packages/dosemu.git/blob - dosemu.spec
- use %%{SOURCEn} macros
[packages/dosemu.git] / dosemu.spec
1 Summary:        A DOS emulator
2 Summary(de):    DOS-Emulator
3 Summary(fr):    Emulateur DOS
4 Summary(tr):    DOS öykünümcüsü
5 Name:           dosemu
6 Version:        1.0.1
7 Release:        1
8 Copyright:      distributable
9 Group:          Applications/Emulators
10 Group(de):      Applikationen/Emulators
11 Group(pl):      Aplikacje/Emulatory
12 Source0:        ftp://ftp.dosemu.org/dosemu/%{name}-%{version}.tgz
13 Source1:        http://www.freedos.org/files/distributions/base1.zip
14 Source2:        http://www.freedos.org/files/distributions/util1.zip
15 Source3:        http://www.freedos.org/files/distributions/edit1.zip
16 Source4:        ftp://ftp.gcfl.net/freedos/kernel/ker2019x.zip
17 Source5:        ftp://ftp.home.vim.org/pub/vim/pc/vim56d16.zip
18 Source6:        ftp://ftp.home.vim.org/pub/vim/pc/vim56rt.zip
19 Source7:        autoexec.bat
20 Source8:        config.sys
21 Patch0:         %{name}-0.66.7-config.patch
22 Patch1:         %{name}-0.66.7-glibc.patch
23 Patch2:         %{name}-0.66.7-pushal.patch
24 Patch3:         %{name}-0.98.1-security.patch
25 Patch4:         %{name}-0.98.1-justroot.patch
26 Patch5:         %{name}-make-new.patch
27 Patch6:         %{name}m-1.0.0-glibc22.patch
28 Patch7:         %{name}-1.0.1-broken.patch
29 BuildRequires:  bin86
30 BuildRequires:  mtools
31 BuildRequires:  unzip
32 Conflicts:      kernel < 2.0.28
33 Requires:       mtools >= 3.6
34 Url:            http://www.dosemu.org
35 Exclusivearch:  %{ix86}
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 Dosemu is a DOS emulator. Once you've installed dosemu, start the DOS
40 emulator by typing in the "dos" command.
41
42 You need to install dosemu if you use DOS programs and you want to be
43 able to run them on your GNU/Linux system. You may also need to
44 install the dosemu-freedos package.
45
46 %package -n xdosemu
47 Summary:        A DOS emulator for the X Window System
48 Summary(de):    DOS-Emulator für X
49 Summary(fr):    Émulateur DOS conçu pou être lancé sous X
50 Summary(tr):    X altýnda çalýþan DOS öykünümcüsü
51 Group:          Applications/Emulators
52 Group(de):      Applikationen/Emulators
53 Group(pl):      Aplikacje/Emulatory
54 Requires:       %{name} = %{version}
55
56 %description -n xdosemu
57 Xdosemu is a version of the dosemu DOS emulator that runs with the X
58 Window System. Xdosemu provides VGA graphics and mouse support.
59
60 Install xdosemu if you need to run DOS programs on your system, and
61 you'd like to do so with the convenience of graphics support and mouse
62 capabilities.
63
64 %description -l de -n xdosemu
65 Dies ist eine Version des DOS-Emulators für X-Windows-Sitzungen. Er
66 unterstützt VGA-Grafiken und Maus.
67
68 %description -l fr -n xdosemu
69 Version de l'émulateur DOS conçue pour tourner dans une session X.
70 Offre une gestion des graphismes VGA et de la souris.
71
72 %description -l tr -n xdosemu
73 Bu yazýlým, DOS öykünümcüsünün X altýnda çalýþan bir sürümüdür. VGA
74 grafikleri ve fare desteði vardýr.
75
76 %package freedos
77 Requires:       %{name} = %{version}
78 Summary:        A FreeDOS hdimage for dosemu, a DOS emulator, to use.
79 Group:          Applications/Emulators
80 Group(de):      Applikationen/Emulators
81 Group(pl):      Aplikacje/Emulatory
82
83 %description freedos
84 Generally, the dosemu DOS emulator requires either that your system
85 have some version of DOS available or that your system's partitions
86 were formatted and installed with DOS. If your system does not meet
87 either of the previous requirements, you can instead use the dosemu-
88 freedos package, which contains an hdimage file which will be
89 installed in the /var/lib/dosemu directory. The hdimage file is
90 already bootable with FreeDOS.
91
92 You will need to edit your /etc/dosemu.conf file to add the image to
93 the list of disk 'drives' used by dosemu.
94
95 Install dosemu-freedos if you are installing the dosemu package and
96 you don't have a version of DOS available on your system, and your
97 system's partitions were not formatted and installed with DOS.
98
99 %prep
100 %setup -q
101 %patch0 -p1
102 #%patch2 -p1
103 %patch3 -p1
104 %patch4 -p1
105 %patch5 -p1
106 %patch6 -p1
107 %patch7 -p1
108
109 rm -rf freedos
110 mkdir freedos
111 mkdir freedos/kernel
112 mkdir freedos/tmp
113 mkdir freedos/vim
114
115 unzip -o -L -d freedos/kernel/ -j %{SOURCE4}
116 cp -f contrib/dosC/dist/* freedos/kernel
117 for i in %{SOURCE1} %{SOURCE3} %{SOURCE2} ; do
118         unzip -o -L -d freedos/tmp $i
119 done
120 for i in freedos/tmp/*.zip ; do 
121         unzip -o -L -o -d freedos $i
122 done
123 unzip -L -o -d freedos %{SOURCE6}
124 unzip -L -o -d freedos/vim-5.6 %{SOURCE5}
125
126 %build
127 ./default-configure --without-x
128 echo | make
129 mv -f bin/dos bin/dos-nox
130 ./default-configure
131 echo | make
132 mv -f bin/dos bin/dos-x
133 mv -f bin/dos-nox bin/dos
134
135 %install
136 rm -rf $RPM_BUILD_ROOT
137 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1,%{_prefix}/X11R6/share/pixmaps,/var/lib/dosemu}
138
139 %{__make} install INSTROOT=$RPM_BUILD_ROOT
140
141 rm -f $RPM_BUILD_ROOT%{_bindir}/xdos
142
143 install bin/dos-x $RPM_BUILD_ROOT%{_bindir}/xdos
144 install setup-hdimage $RPM_BUILD_ROOT%{_bindir}
145 install src/tools/periph/{dexeconfig,hdinfo,mkhdimage,mkfatimage16} $RPM_BUILD_ROOT%{_bindir}
146 install etc/dosemu.xpm $RPM_BUILD_ROOT%{_prefix}/X11R6/share/pixmaps
147 install etc/dosemu.users.secure $RPM_BUILD_ROOT%{_sysconfdir}/dosemu.users
148         src/tools/periph/mkfatimage16 -p -k 16192 -l FreeDos \
149         -b freedos/kernel/boot.bin \
150         -f $RPM_BUILD_ROOT/var/lib/dosemu/hdimage.freedos \
151         freedos/kernel/* 
152 FREEDOS=`/bin/mktemp /tmp/freedos.XXXXXX`
153 echo "drive n: file=\"$RPM_BUILD_ROOT/var/lib/dosemu/hdimage.freedos\" offset=8832" > $FREEDOS
154 MTOOLSRC=$FREEDOS
155 export MTOOLSRC
156 mcopy -o/ freedos/vim-5.6 freedos/bin freedos/doc freedos/help freedos/emacs n:
157 mmd n:/DOSEMU
158 mcopy -/ commands/* n:/DOSEMU
159 mcopy -o %{SOURCE7} %{SOURCE8} commands/exitemu* n:/
160 mdir -w n:
161 rm -f $FREEDOS
162 unset MTOOLSRC
163
164 install etc/hdimage.dist $RPM_BUILD_ROOT/var/lib/dosemu/hdimage
165 # install dexe utils
166 install dexe/{do_mtools,extract-dos,mkdexe,myxcopy} $RPM_BUILD_ROOT%{_bindir}
167
168 cat <<EOF >$RPM_BUILD_ROOT%{_bindir}/rundos
169 #!/bin/sh
170 BINDIR=/bin
171 export BINDIR 
172 # ignore errors if user does not have module installed
173 %attr(755,root,root) %{_bindir}/dos
174 EOF
175
176 # Take out irritating ^H's from the documentation
177 for i in `ls --color=no doc/` ; do cat doc/$i > $i ; cat $i | perl -p -e 's/.\b//g' > doc/$i ; done
178
179 rm -f doc/{configuration,dosemu.lsm}
180 gzip -9nf QuickStart COPYING ChangeLog* doc/*
181
182 %clean
183 rm -rf $RPM_BUILD_ROOT
184
185 %post -n xdosemu
186 if [ -x /usr/X11R6/bin/mkfontdir ]; then
187         (cd /usr/X11R6/lib/X11/fonts/misc; /usr/X11R6/bin/mkfontdir)
188 fi
189 killall -USR1 xfs > /dev/null 2>&1 ||:
190
191 %postun -n xdosemu
192 if [ -x /usr/X11R6/bin/mkfontdir ]; then
193         (cd /usr/X11R6/lib/X11/fonts/misc; /usr/X11R6/bin/mkfontdir)
194 fi
195 killall -USR1 xfs > /dev/null 2>&1 ||:
196
197 %post freedos
198 [ -e /var/lib/dosemu/hdimage.first ] || \
199     ln -s hdimage.freedos /var/lib/dosemu/hdimage.first
200
201 %postun freedos
202 if [ "$1" =" 0" ]; then
203         if [ -e /var/lib/dosemu/hdimage.first ]; then
204                 rm -f /var/lib/dosemu/hdimage.first
205         fi
206 fi
207     
208 %files
209 %defattr(644,root,root,755)
210 %doc *.gz doc/*
211 %dir /var/lib/dosemu
212 %config %{_sysconfdir}/dosemu.conf
213 %config %{_sysconfdir}/dosemu.users
214 %config /var/lib/dosemu/hdimage
215 %config /var/lib/dosemu/global.conf
216 %attr(4755,root,root) %{_bindir}/dos
217 %attr(755,root,root) %{_bindir}/dosdebug
218 %attr(755,root,root) %{_bindir}/dosexec
219 %attr(755,root,root) %{_bindir}/dexeconfig
220 %attr(755,root,root) %{_bindir}/hdinfo
221 %attr(755,root,root) %{_bindir}/do_mtools
222 %attr(755,root,root) %{_bindir}/extract-dos
223 %attr(755,root,root) %{_bindir}/mkdexe
224 %attr(755,root,root) %{_bindir}/myxcopy
225 %attr(755,root,root) %{_bindir}/mkhdimage
226 %attr(755,root,root) %{_bindir}/mkfatimage16
227 %attr(755,root,root) %{_bindir}/rundos
228 %attr(755,root,root) %{_bindir}/setup-hdimage
229 %{_mandir}/man1/dos.1*
230 %{_mandir}/man1/dosdebug.1*
231 %{_mandir}/man1/mkfatimage16.1*
232 %{_prefix}/X11R6/share/pixmaps/dosemu.xpm
233
234 %files -n xdosemu
235 %defattr(644,root,root,755)
236 %attr(4755,root,root) %{_bindir}/xdos
237 # %attr(755,root,root) %{_bindir}/xtermdos
238 %{_mandir}/man1/xdos.1*
239 # %{_mandir}/man1/xtermdos.1*
240 %{_prefix}/X11R6/lib/X11/fonts/misc/vga.pcf
241
242 %files freedos
243 %defattr(644,root,root,755)
244 %config /var/lib/dosemu/hdimage.freedos
This page took 0.071649 seconds and 4 git commands to generate.