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