]>
Commit | Line | Data |
---|---|---|
f2bb4f3f JB |
1 | # |
2 | # Conditional build: | |
f2bb4f3f JB |
3 | %bcond_with capsimage # use capsimage for .IPF, .RAW and .CTR disk image support |
4 | # | |
040d2dad | 5 | Summary: hatari - an Atari ST and STE emulator for Linux |
5f9653a4 | 6 | Summary(pl.UTF-8): hatari - emulator Atari ST i STE dla Linuksa |
67043e95 | 7 | Name: hatari |
b8256471 | 8 | Version: 2.3.1 |
67043e95 | 9 | Release: 1 |
04862692 | 10 | License: GPL v2+ |
67043e95 | 11 | Group: Applications/Emulators |
8a2be9ec | 12 | Source0: http://download.tuxfamily.org/hatari/%{version}/%{name}-%{version}.tar.bz2 |
b8256471 | 13 | # Source0-md5: 52f572328edc575db17e54d4fd2d3a20 |
2d067944 | 14 | Patch0: %{name}-useless_files.patch |
b8256471 JB |
15 | Patch1: %{name}-desktop.patch |
16 | URL: http://hatari.tuxfamily.org/ | |
17 | BuildRequires: SDL2-devel >= 2.0 | |
18 | BuildRequires: cmake >= 3.3 | |
19 | %{?with_capsimage:BuildRequires: libcapsimage-devel >= 5} | |
82460f04 | 20 | BuildRequires: libpng-devel |
7b523ffb | 21 | BuildRequires: pkgconfig |
b4f366c0 | 22 | BuildRequires: portaudio-devel |
b8256471 JB |
23 | BuildRequires: portmidi-devel |
24 | BuildRequires: python3 >= 1:3 | |
82460f04 | 25 | BuildRequires: readline-devel |
b4f366c0 | 26 | BuildRequires: rpm-pythonprov |
37c83202 | 27 | BuildRequires: rpmbuild(macros) >= 1.577 |
76c7c8df | 28 | BuildRequires: sed >= 4.0 |
b8256471 | 29 | BuildRequires: udev-devel |
85dd4c21 | 30 | BuildRequires: xorg-lib-libX11-devel |
67043e95 | 31 | BuildRequires: zlib-devel |
b8256471 JB |
32 | %{!?with_capsimage:BuildConflicts: libcapsimage-devel} |
33 | Requires(post,postun): desktop-file-utils | |
34 | Requires(post,postun): gtk-update-icon-cache | |
35 | Requires: gtk+3 >= 3.0 | |
36 | Requires: hicolor-icon-theme | |
37 | Requires: python3 >= 1:3.2 | |
38 | Requires: python3-pygobject3 >= 3 | |
39 | Requires: shared-mime-info | |
67043e95 | 40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
41 | ||
42 | %description | |
43 | Hatari is an Atari ST and STE emulator for Linux and other systems | |
44 | that are supported by the SDL library. Hatari supports the emulation | |
45 | of most of the ST and STE hardware. | |
46 | ||
af760cbd JR |
47 | %description -l pl.UTF-8 |
48 | Hatari jest emulatorem Atari ST i STE dla Linuksa i innych systemów | |
f5ca83c1 | 49 | obsługiwanych przez bibliotekę SDL. Hatari emuluje większość sprzętu |
50 | Atari ST i STE. | |
67043e95 | 51 | |
52 | %prep | |
53 | %setup -q | |
2d067944 | 54 | %patch0 -p1 |
1a15a251 | 55 | %patch1 -p1 |
67043e95 | 56 | |
b8256471 | 57 | %{__sed} -i -e '1s,#!/usr/bin/env python3,#!%{__python3},' python-ui/*.py tools/*.py tools/debugger/*.py tools/hconsole/*.py |
b4f366c0 | 58 | |
67043e95 | 59 | %build |
f5ca83c1 | 60 | install -d build |
61 | cd build | |
62 | %cmake .. \ | |
37c83202 | 63 | -DBUILD_SHARED_LIBS:BOOL=OFF \ |
f2bb4f3f JB |
64 | -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \ |
65 | %{?with_sdl2:-DENABLE_SDL2=ON} | |
f5ca83c1 | 66 | |
67043e95 | 67 | %{__make} |
68 | ||
69 | %install | |
70 | rm -rf $RPM_BUILD_ROOT | |
b4f366c0 | 71 | install -d $RPM_BUILD_ROOT%{_mandir}/fr/man1 |
67043e95 | 72 | |
f5ca83c1 | 73 | %{__make} -C build install \ |
67043e95 | 74 | DESTDIR=$RPM_BUILD_ROOT |
75 | ||
1a6fc867 | 76 | install doc/fr/hatari.1 $RPM_BUILD_ROOT%{_mandir}/fr/man1 |
4de9c580 | 77 | |
b8256471 JB |
78 | %py3_comp $RPM_BUILD_ROOT%{_datadir}/%{name}/hatariui |
79 | %py3_ocomp $RPM_BUILD_ROOT%{_datadir}/%{name}/hatariui | |
b4f366c0 JB |
80 | |
81 | for f in README TODO ; do | |
f2bb4f3f | 82 | %{__mv} python-ui/${f} python-ui/${f}-ui |
b4f366c0 | 83 | done |
f2bb4f3f JB |
84 | %{__mv} tools/hconsole/{release-notes.txt,release-notes-hconsole.txt} |
85 | %{__mv} python-ui/{release-notes.txt,release-notes-ui.txt} | |
b4f366c0 | 86 | |
67043e95 | 87 | %clean |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
b8256471 JB |
90 | %post |
91 | %update_desktop_database | |
92 | %update_icon_cache hicolor | |
93 | %update_mime_database | |
94 | ||
95 | %postun | |
96 | %update_desktop_database | |
97 | %update_icon_cache hicolor | |
98 | %update_mime_database | |
99 | ||
67043e95 | 100 | %files |
101 | %defattr(644,root,root,755) | |
b4f366c0 | 102 | %doc readme.txt doc/{authors,changelog,emutos,keymap-sample,memory-usage,midi-linux,release-notes,todo}.txt doc/{compatibility,manual}.html tools/hconsole/release-notes-hconsole.txt python-ui/{README-ui,TODO-ui,release-notes-ui.txt} |
b8256471 | 103 | %attr(755,root,root) %{_bindir}/atari-convert-dir |
b4f366c0 | 104 | %attr(755,root,root) %{_bindir}/atari-hd-image |
b8256471 | 105 | %attr(755,root,root) %{_bindir}/gst2ascii |
37c83202 | 106 | %attr(755,root,root) %{_bindir}/hatari |
b8256471 JB |
107 | %attr(755,root,root) %{_bindir}/hatari-prg-args |
108 | %attr(755,root,root) %{_bindir}/hatari_profile | |
37c83202 JB |
109 | %attr(755,root,root) %{_bindir}/hatariui |
110 | %attr(755,root,root) %{_bindir}/hmsa | |
b4f366c0 | 111 | %attr(755,root,root) %{_bindir}/zip2st |
67043e95 | 112 | %{_datadir}/%{name} |
b8256471 | 113 | %{_mandir}/man1/atari-convert-dir.1* |
b4f366c0 | 114 | %{_mandir}/man1/atari-hd-image.1* |
b8256471 JB |
115 | %{_mandir}/man1/gst2ascii.1* |
116 | %{_mandir}/man1/hatari-prg-args.1* | |
117 | %{_mandir}/man1/hatari_profile.1* | |
37c83202 | 118 | %{_mandir}/man1/hatariui.1* |
b4f366c0 JB |
119 | %{_mandir}/man1/hconsole.1* |
120 | %{_mandir}/man1/hmsa.1* | |
121 | %{_mandir}/man1/zip2st.1* | |
a28ce0e4 | 122 | %lang(fr) %{_mandir}/fr/man1/hatari.1* |
be735d2b | 123 | %{_desktopdir}/hatariui.desktop |
8a2be9ec | 124 | %{_desktopdir}/hatari.desktop |
f2bb4f3f JB |
125 | %{_iconsdir}/hicolor/*/apps/hatari.* |
126 | %{_iconsdir}/hicolor/*/mimetypes/application-x-st-disk-image.* | |
ebdc20bd ŁM |
127 | %{_iconsdir}/hicolor/*/mimetypes/application-vnd.fastcopy-disk-image.* |
128 | %{_iconsdir}/hicolor/*/mimetypes/application-vnd.msa-disk-image.* | |
129 | %{_iconsdir}/hicolor/*/mimetypes/application-x-stx-disk-image.* | |
f2bb4f3f | 130 | %{_datadir}/mime/packages/hatari.xml |