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