]> git.pld-linux.org Git - packages/dosemu.git/blob - dosemu.spec
- don't make SDL subpackage when building without x
[packages/dosemu.git] / dosemu.spec
1 # NOTE: if /dev/shm is mounted, it cannot be mounted with noexec
2 #
3 # Conditional build:
4 %bcond_with     static          # link statically
5 %bcond_with     AC
6 %bcond_without  htmldocs        # do not build documentation in HTML
7 %bcond_without  x               # X support
8 %bcond_with     samba           # samba support
9 #
10 %define         smarthogver     0.1.0
11 %define         smbrel          01
12
13 Summary:        A DOS emulator
14 Summary(de.UTF-8):      DOS-Emulator
15 Summary(es.UTF-8):      Emulador DOS
16 Summary(fr.UTF-8):      Emulateur DOS
17 Summary(pl.UTF-8):      Emulator DOS-a
18 Summary(pt_BR.UTF-8):   Emulador DOS
19 Summary(tr.UTF-8):      DOS öykünümcüsü
20 Name:           dosemu
21 Version:        1.4.0
22 Release:        4%{?with_samba:.smb%{smbrel}}
23 License:        GPL v2
24 Group:          Applications/Emulators
25 Source0:        http://dl.sourceforge.net/dosemu/%{name}-%{version}.tgz
26 # Source0-md5:  0bba530637266f99d404ba15e3f118d4
27 #Source2:       %{name}-sys.tar.gz
28 Source3:        %{name}-PRZECZYTAJ_TO
29 Source4:        %{name}-README.PLD
30 Source5:        %{name}.desktop
31 Source6:        http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-pl-man-pages.tar.bz2
32 # Source6-md5:  7a8abf5c656e6b99bdd03a4783751895
33 Source7:        smarthog-%{smarthogver}.tgz
34 Patch0:         %{name}-man-pages.patch
35 Patch1:         %{name}-make-new.patch
36 Patch2:         %{name}-%{name}_conf.patch
37 Patch3:         %{name}-doSgmlTools.patch
38 Patch4:         %{name}-makehtml.patch
39 Patch5:         http://pascalek.pers.pl/files/projects/Samba4DosEmu/%{name}-1.4.0-samba-beta2.patch.gz
40 Patch6:         http://pascalek.pers.pl/files/projects/Samba4DosEmu/s4d-beta2-fix1.patch
41 Patch7:         %{name}-lpt4.patch
42 Patch8:         %{name}-Xquit.patch
43 Patch9:         %{name}-creat_mode.patch
44 URL:            http://www.dosemu.org/
45 BuildRequires:  alsa-lib-devel >= 0.9
46 BuildRequires:  autoconf >= 2.59-9
47 BuildRequires:  bin86
48 BuildRequires:  bison
49 BuildRequires:  docbook-dtd30-sgml
50 BuildRequires:  docbook-style-dsssl
51 BuildRequires:  flex
52 %{?with_static:BuildRequires:   glibc-static}
53 BuildRequires:  gpm-devel
54 %{?with_samba:BuildRequires:    libcli_smb-devel}
55 BuildRequires:  libsndfile-devel
56 BuildRequires:  lynx
57 %{?with_htmldocs:BuildRequires: openjade}
58 %{?with_htmldocs:BuildRequires: perl-base}
59 %{?with_htmldocs:BuildRequires: sgml-tools}
60 BuildRequires:  slang-devel
61 %{?with_static:BuildRequires:   slang-static}
62 BuildRequires:  unzip
63 BuildRequires:  util-linux
64 %if %{with x}
65 BuildRequires:  SDL-devel
66 %if !%{with AC}
67 BuildRequires:  xorg-app-bdftopcf
68 BuildRequires:  xorg-app-mkfontdir
69 BuildRequires:  xorg-lib-libX11-devel
70 BuildRequires:  xorg-lib-libXext-devel
71 BuildRequires:  xorg-lib-libXxf86vm-devel
72 %if %{with static}
73 BuildRequires:  xorg-lib-libX11-static
74 BuildRequires:  xorg-lib-libXext-static
75 BuildRequires:  xorg-lib-libXxf86vm-static
76 %endif
77 %endif
78 %if %{with AC}
79 BuildRequires:  X11-devel
80 %{?with_static:BuildRequires:   X11-static}
81 %endif
82 %endif
83 Obsoletes:      xdosemu
84 Conflicts:      dosemu-freedos-minimal < 2.0.33
85 Conflicts:      kernel < 2.0.28
86 Conflicts:      mtools < 3.6
87 ExclusiveArch:  %{ix86} %{x8664}
88 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
89
90 %define         _dosemudir      /var/lib/dosemu
91 %define         specflags       -fomit-frame-pointer
92
93 %description
94 Dosemu is a DOS emulator. Once you've installed dosemu, start the DOS
95 emulator by typing in the "dos" command.
96
97 You need to install dosemu if you use DOS programs and you want to be
98 able to run them on your GNU/Linux system. You may also need to
99 install the dosemu-freedos-* packages.
100
101 %description -l pl.UTF-8
102 Dosemu to Emulator systemu DOS. Po zainstalowaniu możesz go uruchomić
103 komendą "dos".
104
105 Jeśli korzystasz z dosowych programów i chciałbyś je uruchamiać na
106 twoim linuksowym systemie zainstaluj dosemu. Możesz też potrzebować
107 pakietów dosemu-freedos-*.
108
109 %description -l pt_BR.UTF-8
110 Essa é uma versão do emulador DOS que foi projetada para rodar em
111 sessões X Window. Oferece suporte para gráficos VGA bem como suporte
112 para mouse.
113
114 %package utils
115 Summary:        Utilities for dosemu
116 Summary(pl.UTF-8):      Programy pomocnicze do dosemu
117 Group:          Applications/Emulators
118 Requires:       %{name} = %{version}-%{release}
119
120 %description utils
121 Utilities for dosemu: dexeconfig, hdinfo, mkhdimage, mkfatimage16.
122
123 %description utils -l pl.UTF-8
124 Programy pomocnicze dla dosemu: dexeconfig, hdinfo, mkhdimage,
125 mkfatimage16.
126
127 %package SDL
128 Summary:        SDL plugin for dosemu
129 Summary(pl.UTF-8):      Wtyczka SDL dla dosemu
130 Group:          Libraries
131 Requires:       %{name} = %{version}-%{release}
132
133 %description SDL
134 SDL plugin for dosemu.
135
136 %description SDL -l pl.UTF-8
137 Wtyczka SDL dla dosemu.
138
139 %package X
140 Summary:        X plugin for dosemu
141 Summary(pl.UTF-8):      Wtyczka X dla dosemu
142 Group:          Libraries
143 Requires:       %{name} = %{version}-%{release}
144
145 %description X
146 X plugin for dosemu.
147
148 %description X -l pl.UTF-8
149 Wtyczka X dla dosemu.
150
151 %prep
152 %setup -q -a6 -a7
153
154 %patch0 -p1
155 %patch1 -p1
156 %patch2 -p1
157 %patch3 -p1
158 %patch4 -p1
159 %{?with_samba:%patch5 -p1}
160 %{?with_samba:%patch6 -p1}
161 %patch7 -p1
162 %patch8 -p1
163 %patch9 -p1
164
165 %build
166 OPTFLAGS="%{rpmcflags}"; export OPTFLAGS
167
168 ./mkpluginhooks enable plugin_keyboard off plugin_kbd_unicode on \
169 plugin_extra_charset on plugin_term on plugin_translate on plugin_demo off
170
171 %{__autoconf}
172 # configure2_13 must be used though because of ./default-configure
173
174 # non-X version
175 %configure2_13 \
176         %{?with_static:--enable-linkstatic} \
177         --enable-new-intcode \
178         --enable-aspi \
179         %{!?with_x:--without-x}
180
181 %{__make} \
182         WAIT=no
183
184 %{__make} -C man
185 mv -f man/dosemu.bin.1 man/dosemu.1
186 echo '.so dosemu.1' > man/dos.1
187 mv -f man/ru/dosemu.bin.1 man/ru/dosemu.1
188 echo '.so dosemu.1' > man/ru/dos.1
189
190 mv -f pl/man1/dos.1 pl/man1/dosemu.1
191 echo '.so dosemu.1' > pl/man1/dos.1
192 echo '.so dosemu.1' > pl/man1/xdosemu.1
193 echo '.so dosemu.1' > pl/man1/dosdebug.1
194
195 %if %{with htmldocs}
196 # documentation
197 %{__make} -C src/doc/DANG html
198 %{__make} -C src/doc/HOWTO html
199 %{__make} -C src/doc/README html
200
201 find src/doc -name "*.html" -exec cp -f '{}' doc/ ';'
202 %endif
203
204 %install
205 rm -rf $RPM_BUILD_ROOT
206 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir},%{_pixmapsdir},%{_desktopdir}} \
207         $RPM_BUILD_ROOT{%{_mandir}/man1,%{_mandir}/{pl,ru}/man1} \
208         $RPM_BUILD_ROOT%{_dosemudir}/bootdir/{dosemu,freedos/doc/fdkernel} \
209         $RPM_BUILD_ROOT%{_libdir}/dosemu
210
211 #%%{__make} install \
212 #       DESTDIR=$RPM_BUILD_ROOT
213
214 install bin/midid $RPM_BUILD_ROOT%{_bindir}/midid
215 install bin/dosemu.bin $RPM_BUILD_ROOT%{_bindir}/dosemu
216 ln -sf dosemu $RPM_BUILD_ROOT%{_bindir}/dos
217 %if %{with x}
218 ln -sf dosemu $RPM_BUILD_ROOT%{_bindir}/xdos
219 ln -sf dosemu $RPM_BUILD_ROOT%{_bindir}/xdosemu
220 ln -sf dosemu $RPM_BUILD_ROOT%{_bindir}/xdosexec
221 %endif
222
223 install bin/libplugin*.so  $RPM_BUILD_ROOT%{_libdir}/dosemu
224
225 install bin/{dosdebug,mkfatimage16} $RPM_BUILD_ROOT%{_bindir}
226 install src/tools/periph/{dexeconfig,hdinfo,mkhdimage} $RPM_BUILD_ROOT%{_bindir}
227 ln -sf dos $RPM_BUILD_ROOT%{_bindir}/dosexec
228
229 install etc/dosemu.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
230 install etc/dosemu.users.example $RPM_BUILD_ROOT%{_sysconfdir}/dosemu.users
231 install etc/global.conf $RPM_BUILD_ROOT%{_dosemudir}/global.conf
232 install etc/dosemu.conf $RPM_BUILD_ROOT%{_sysconfdir}/dosemu.conf
233
234 install man/{dosemu.1,dosdebug.1,xdosemu.1,dos.1,mkfatimage16.1} $RPM_BUILD_ROOT%{_mandir}/man1
235 install pl/man1/{dosemu.1,dosdebug.1,xdosemu.1,dos.1} $RPM_BUILD_ROOT%{_mandir}/pl/man1
236 install man/ru/{dosemu.1,dosdebug.1,xdosemu.1,dos.1,mkfatimage16.1} $RPM_BUILD_ROOT%{_mandir}/ru/man1
237
238 install commands/*.com $RPM_BUILD_ROOT%{_dosemudir}/bootdir/dosemu
239 install commands/*.sys $RPM_BUILD_ROOT%{_dosemudir}/bootdir/dosemu
240 install smarthog-%{smarthogver}/*.exe   $RPM_BUILD_ROOT%{_dosemudir}/bootdir/dosemu
241 cp %{SOURCE3} PRZECZYTAJ_TO
242 cp %{SOURCE4} README.PLD
243 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
244
245 rm -f doc/{configuration,dosemu.lsm}
246
247 %clean
248 rm -rf $RPM_BUILD_ROOT
249
250 %files
251 %defattr(644,root,root,755)
252 %doc QuickStart COPYING ChangeLog* doc/* README.PLD
253 %lang(pl) %doc PRZECZYTAJ_TO
254 %dir %{_dosemudir}
255 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dosemu.conf
256 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dosemu.users
257 %config(noreplace) %verify(not md5 mtime size) %{_dosemudir}/global.conf
258 %attr(755,root,root) %{_bindir}/dos
259 %attr(755,root,root) %{_bindir}/dosdebug
260 %attr(755,root,root) %{_bindir}/dosemu
261 %attr(755,root,root) %{_bindir}/dosexec
262 %attr(755,root,root) %{_bindir}/midid
263 %dir %{_libdir}/dosemu
264 %{_libdir}/dosemu/libplugin_alsa.so
265 %{_libdir}/dosemu/libplugin_gpm.so
266 %{_libdir}/dosemu/libplugin_sndfile.so
267 %{_libdir}/dosemu/libplugin_term.so
268 %dir %{_dosemudir}/bootdir
269 %dir %{_dosemudir}/bootdir/dosemu
270 %{_dosemudir}/bootdir/dosemu/*
271 %{_mandir}/man1/d*
272 %lang(pl) %{_mandir}/pl/man1/d*
273 %lang(ru) %{_mandir}/ru/man1/d*
274 %{_pixmapsdir}/dosemu.xpm
275 %if %{with x}
276 %attr(755,root,root) %{_bindir}/xdos*
277 %{_mandir}/man1/xdosemu.1*
278 %lang(pl) %{_mandir}/pl/man1/xdosemu.1*
279 %lang(ru) %{_mandir}/ru/man1/xdosemu.1*
280 %{_desktopdir}/dosemu.desktop
281 %endif
282
283 %files utils
284 %defattr(644,root,root,755)
285 %attr(755,root,root) %{_bindir}/dexeconfig
286 %attr(755,root,root) %{_bindir}/hdinfo
287 %attr(755,root,root) %{_bindir}/mkhdimage
288 %attr(755,root,root) %{_bindir}/mkfatimage16
289 %{_mandir}/man1/mkfatimage16.1*
290 %lang(ru) %{_mandir}/ru/man1/mkfatimage16.1*
291
292 %if %{with x}
293 %files SDL
294 %defattr(644,root,root,755)
295 %attr(755,root,root) %{_libdir}/dosemu/libplugin_sdl.so
296
297 %files X
298 %defattr(644,root,root,755)
299 %attr(755,root,root) %{_libdir}/dosemu/libplugin_X.so
300 %endif
This page took 0.086515 seconds and 3 git commands to generate.