]> git.pld-linux.org Git - packages/dosemu.git/blob - dosemu.spec
updated to 1.0.1
[packages/dosemu.git] / dosemu.spec
1 Summary:        A DOS emulator.
2 Name:           dosemu
3 Version:        1.0.1
4 Release:        1
5 Copyright:      distributable
6 Group:          Applications/Emulators
7 Group(pl):      Aplikacje/Emulatory
8 Source0:        ftp://ftp.dosemu.org/dosemu/%{name}-%{version}.tgz
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
12 Source4:        ftp://ftp.gcfl.net/freedos/kernel/ker2019x.zip
13 Source5:        ftp://ftp.home.vim.org/pub/vim/pc/vim56d16.zip
14 Source6:        ftp://ftp.home.vim.org/pub/vim/pc/vim56rt.zip
15 Source7:        autoexec.bat
16 Source8:        config.sys
17 Patch0:         dosemu-0.66.7-config.patch
18 Patch1:         dosemu-0.66.7-glibc.patch
19 Patch2:         dosemu-0.66.7-pushal.patch
20 Patch3:         dosemu-0.98.1-security.patch
21 Patch4:         dosemu-0.98.1-justroot.patch
22 Patch5:         dosemu-make-new.patch
23 Patch6:         dosemum-1.0.0-glibc22.patch
24 Patch7:         dosemu-1.0.1-broken.patch
25 BuildRequires:  mtools
26 Requires:       kernel >= 2.0.28, mtools >= 3.6
27 Url:            http://www.dosemu.org
28 Exclusivearch:  %{ix86}
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 Dosemu is a DOS emulator. Once you've installed dosemu, start the DOS
33 emulator by typing in the dos command.
34
35 You need to install dosemu if you use DOS programs and you want to be
36 able to run them on your Red Hat Linux system. You may also need to
37 install the dosemu-freedos package.
38
39 %package -n xdosemu
40 Requires:       %{name} = %{version}
41 Summary:        A DOS emulator for the X Window System.
42 Group:          Applications/Emulators
43 Group(pl):      Aplikacje/Emulatory
44
45 %description -n xdosemu
46 Xdosemu is a version of the dosemu DOS emulator that runs with the X
47 ]Window System. Xdosemu provides VGA graphics and mouse support.
48
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
51 capabilities.
52
53 %package freedos
54 Requires:       %{name} = %{version}
55 Summary:        A FreeDOS hdimage for dosemu, a DOS emulator, to use.
56 Group:          Applications/Emulators
57 Group(pl):      Aplikacje/Emulatory
58
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
65 installed in teh /var/lib/dosemu directory. The hdimage file is
66 already bootable with FreeDOS.
67
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.
70
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.
74
75 %prep
76 %setup -q
77 %patch0 -p1
78 #%patch2 -p1
79 %patch3 -p1
80 %patch4 -p1
81 %patch5 -p1
82 %patch6 -p1
83 %patch7 -p1
84
85 rm -rf freedos
86 mkdir freedos
87 mkdir freedos/kernel
88 mkdir freedos/tmp
89 mkdir freedos/vim
90
91 unzip -o -L -d freedos/kernel/ -j $RPM_SOURCE_DIR/ker2019x.zip
92 cp -f contrib/dosC/dist/* freedos/kernel
93 for i in $RPM_SOURCE_DIR/{base1.zip,edit1.zip,util1.zip}; do
94         unzip -o -L -d freedos/tmp $i
95 done
96 for i in freedos/tmp/*.zip ; do 
97         unzip -o -L -o -d freedos $i
98 done
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
101
102 %build
103 ./default-configure --without-x
104 echo | make
105 mv bin/dos bin/dos-nox
106 ./default-configure
107 echo | make
108 mv bin/dos bin/dos-x
109 mv bin/dos-nox bin/dos
110
111 %install
112 rm -rf $RPM_BUILD_ROOT
113 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1,%{_prefix}/X11R6/share/pixmaps,/var/lib/dosemu}
114
115 %{__make} install INSTROOT=$RPM_BUILD_ROOT
116
117 rm $RPM_BUILD_ROOT%{_bindir}/xdos
118
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}
122 install etc/dosemu.xpm $RPM_BUILD_ROOT%{_prefix}/X11R6/share/pixmaps
123 install etc/dosemu.users.secure $RPM_BUILD_ROOT%{_sysconfdir}/dosemu.users
124         src/tools/periph/mkfatimage16 -p -k 16192 -l FreeDos \
125         -b freedos/kernel/boot.bin \
126         -f $RPM_BUILD_ROOT/var/lib/dosemu/hdimage.freedos \
127         freedos/kernel/* 
128 FREEDOS=`/bin/mktemp /tmp/freedos.XXXXXX`
129 echo "drive n: file=\"$RPM_BUILD_ROOT/var/lib/dosemu/hdimage.freedos\" offset=8832" > $FREEDOS
130 MTOOLSRC=$FREEDOS
131 export MTOOLSRC
132 mcopy -o/ freedos/vim-5.6 freedos/bin freedos/doc freedos/help freedos/emacs n:
133 mmd n:/DOSEMU
134 mcopy -/ commands/* n:/DOSEMU
135 mcopy -o $RPM_SOURCE_DIR/autoexec.bat $RPM_SOURCE_DIR/config.sys commands/exitemu* n:/
136 mdir -w n:
137 rm -f $FREEDOS
138 unset MTOOLSRC
139
140 install etc/hdimage.dist $RPM_BUILD_ROOT/var/lib/dosemu/hdimage
141 # install dexe utils
142 install dexe/{do_mtools,extract-dos,mkdexe,myxcopy} $RPM_BUILD_ROOT%{_bindir}
143
144 cat <<EOF >$RPM_BUILD_ROOT%{_bindir}/rundos
145 #!/bin/sh
146 BINDIR=/bin
147 export BINDIR 
148 # ignore errors if user does not have module installed
149 %{_bindir}/dos
150 EOF
151
152 # Strip things
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
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
168 killall -USR1 xfs > /dev/null 2>&1 ||:
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
174 killall -USR1 xfs > /dev/null 2>&1 ||:
175
176 %post freedos
177 [ -e /var/lib/dosemu/hdimage.first ] || \
178     ln -s hdimage.freedos /var/lib/dosemu/hdimage.first
179
180 %postun freedos
181 if [ $1 = 0 ]; then
182         if [ -e /var/lib/dosemu/hdimage.first ]; then
183                 rm -f /var/lib/dosemu/hdimage.first
184         fi
185 fi
186     
187 %files
188 %defattr(644,root,root,755)
189 %doc QuickStart.gz doc/*
190 %dir /var/lib/dosemu
191 %config %{_sysconfdir}/dosemu.conf
192 %config %{_sysconfdir}/dosemu.users
193 %config /var/lib/dosemu/hdimage
194 %config /var/lib/dosemu/global.conf
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
208 %{_mandir}/man1/dos.1*
209 %{_mandir}/man1/dosdebug.1*
210 %{_mandir}/man1/mkfatimage16.1*
211 %{_prefix}/X11R6/share/pixmaps/dosemu.xpm
212
213 %files -n xdosemu
214 %defattr(644,root,root,755)
215 %attr(4755,root,root) %{_bindir}/xdos
216 # %attr(755,root,root) %{_bindir}/xtermdos
217 %{_mandir}/man1/xdos.1*
218 # %{_mandir}/man1/xtermdos.1*
219 %{_prefix}/X11R6/lib/X11/fonts/misc/vga.pcf
220
221 %files freedos
222 %defattr(644,root,root,755)
223 %config /var/lib/dosemu/hdimage.freedos
This page took 0.096677 seconds and 4 git commands to generate.