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