]>
Commit | Line | Data |
---|---|---|
ff45e169 JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without lua # build LUA scripting | |
4 | # | |
5 | ||
6 | %ifarch x32 | |
7 | %undefine with_lua | |
8 | %endif | |
9 | ||
87e5a4d5 JB |
10 | Summary: "Heroes 3: WoG recreated |
11 | Summary(pl.UTF-8): Gra "Heroes 3: WoG" stworzona od nowa | |
fcb3353f | 12 | Name: vcmi |
b1a5f90d | 13 | Version: 1.3.0 |
36b5b16d | 14 | Release: 2 |
fcb3353f TP |
15 | License: GPL v2+ |
16 | Group: X11/Applications/Games | |
0b8124b1 | 17 | Source0: https://github.com/vcmi/vcmi/archive/%{version}/%{name}-%{version}.tar.gz |
b1a5f90d | 18 | # Source0-md5: 6a657666e335bfde5f007b9542a08cfa |
aa1de504 JR |
19 | Source1: http://download.vcmi.eu/core.zip |
20 | # Source1-md5: 5cf75d588cc53b93aceb809a6068ae37 | |
b1a5f90d | 21 | Patch0: erm.patch |
2aca5829 | 22 | Patch1: absolute-dirs.patch |
b381a72f | 23 | URL: http://www.vcmi.eu/ |
87e5a4d5 JB |
24 | BuildRequires: Qt5Network-devel >= 5 |
25 | BuildRequires: Qt5Widgets-devel >= 5 | |
26 | BuildRequires: SDL2-devel >= 2 | |
27 | BuildRequires: SDL2_image-devel >= 2 | |
28 | BuildRequires: SDL2_mixer-devel >= 2 | |
29 | BuildRequires: SDL2_ttf-devel >= 2 | |
30 | BuildRequires: boost-devel >= 1.50 | |
31 | BuildRequires: cmake >= 2.8.12 | |
32 | # avformat, swscale | |
fcb3353f | 33 | BuildRequires: ffmpeg-devel |
5cc9205d | 34 | BuildRequires: fuzzylite-devel |
fcb3353f | 35 | BuildRequires: libstdc++-devel |
ff45e169 | 36 | %{?with_lua:BuildRequires: luajit-devel} |
87e5a4d5 JB |
37 | BuildRequires: minizip-devel |
38 | BuildRequires: qt5-build >= 5 | |
09c7c7a4 | 39 | BuildRequires: rpmbuild(macros) >= 1.605 |
87e5a4d5 | 40 | BuildRequires: zlib-devel |
3c398907 | 41 | Suggests: smpeg-libs |
fcb3353f TP |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
43 | ||
1d194fcc JR |
44 | %define specflags -fpermissive |
45 | ||
9e9722b6 | 46 | # symbols defined in binaries and main library |
87e5a4d5 | 47 | %define skip_post_check_so vcmi/Scripting/libvcmiERM.so.0.0.0 |
fcb3353f TP |
48 | |
49 | %description | |
87e5a4d5 JB |
50 | H3 engine rewrite (not another mod) with new possibilities. |
51 | ||
52 | %description -l pl.UTF-8 | |
53 | Napisany od nowa silnik H3 (nie kolejna modyfikacja) z nowymi | |
54 | możliwościami. | |
fcb3353f TP |
55 | |
56 | %prep | |
aa1de504 | 57 | %setup -q |
0b8124b1 | 58 | %patch0 -p1 |
2aca5829 | 59 | %patch1 -p1 |
fcb3353f TP |
60 | |
61 | %build | |
1b8764d7 AM |
62 | install -d build |
63 | cd build | |
87e5a4d5 | 64 | %cmake .. \ |
ff45e169 JR |
65 | %cmake_on_off lua ENABLE_LUA \ |
66 | %cmake_on_off lua ENABLE_ERM \ | |
5cc9205d JR |
67 | -DENABLE_EDITOR=ON \ |
68 | -DFORCE_BUNDLED_FL=OFF | |
87e5a4d5 | 69 | |
fcb3353f TP |
70 | %{__make} |
71 | ||
72 | %install | |
73 | rm -rf $RPM_BUILD_ROOT | |
aa1de504 JR |
74 | install -d $RPM_BUILD_ROOT%{_datadir}/%{name} \ |
75 | $RPM_BUILD_ROOT%{_pixmapsdir} \ | |
76 | $RPM_BUILD_ROOT%{_iconsdir}/hicolor/{64x64,48x48,32x32}/apps | |
fcb3353f | 77 | |
1b8764d7 | 78 | %{__make} -C build install \ |
fcb3353f TP |
79 | DESTDIR=$RPM_BUILD_ROOT |
80 | ||
36b5b16d JR |
81 | %{__rm} -r $RPM_BUILD_ROOT%{_iconsdir}/hicolor/2048x2048 |
82 | ||
87e5a4d5 | 83 | %{__unzip} -o %{SOURCE1} -d $RPM_BUILD_ROOT%{_datadir}/%{name} |
fcb3353f TP |
84 | |
85 | %clean | |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | ||
88 | %files | |
89 | %defattr(644,root,root,755) | |
b1a5f90d | 90 | %doc AUTHORS ChangeLog.md README.md |
87e5a4d5 JB |
91 | %attr(755,root,root) %{_bindir}/vcmibuilder |
92 | %attr(755,root,root) %{_bindir}/vcmiclient | |
b1a5f90d | 93 | %attr(755,root,root) %{_bindir}/vcmieditor |
87e5a4d5 JB |
94 | %attr(755,root,root) %{_bindir}/vcmilauncher |
95 | %attr(755,root,root) %{_bindir}/vcmiserver | |
fcb3353f | 96 | %dir %{_libdir}/%{name} |
87e5a4d5 | 97 | %attr(755,root,root) %{_libdir}/%{name}/libvcmi.so |
fcb3353f TP |
98 | %dir %{_libdir}/%{name}/AI |
99 | %attr(755,root,root) %{_libdir}/%{name}/AI/lib*.so | |
ff45e169 | 100 | %if %{with lua} |
0cc7b78a JB |
101 | %dir %{_libdir}/%{name}/scripting |
102 | %attr(755,root,root) %{_libdir}/%{name}/scripting/libvcmiERM.so | |
b1a5f90d | 103 | %attr(755,root,root) %{_libdir}/%{name}/scripting/libvcmiLua.so |
ff45e169 | 104 | %endif |
7f61dc29 | 105 | %{_datadir}/%{name} |
87e5a4d5 | 106 | %{_desktopdir}/vcmiclient.desktop |
b1a5f90d | 107 | %{_desktopdir}/vcmieditor.desktop |
1b8764d7 | 108 | %{_desktopdir}/vcmilauncher.desktop |
87e5a4d5 | 109 | %{_iconsdir}/hicolor/*x*/apps/vcmiclient.png |
b1a5f90d JR |
110 | %{_iconsdir}/hicolor/*x*/apps/vcmieditor.png |
111 | %{_iconsdir}/hicolor/scalable/apps/vcmiclient.svg | |
112 | %{_datadir}/metainfo/eu.vcmi.VCMI.metainfo.xml |