File c-evo.spec of Package c-evo

Name:           c-evo
Version:        1.3.8
Release:        1%{?dist}
Summary:        A turn-based empire building strategy game inspired by Civilization II game.

Group:          Amusements/Games/Strategy/Turn Based
License:        Public Domain
URL:            https://app.zdechov.net/c-evo
Source0:        c-evo-nh-1.3.8.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires:       sox libxmp portaudio libsndfile

BuildRequires:  lazarus >= 2.0.12

%description
With a time scope of several thousand years, it covers aspects of exploration and expansion, industry and agriculture, warfare and diplomacy, science and administration. C-evo follows the spirit of popular turn-based strategy games from the mid 90s, but with more emphasis on powerful AI and careful design of the rules, resulting in a true challenge.

It is a turn-based strategy game inspired by Civilization 2 game where you can explore the world and build your own empire. New Horizons edition is a continuation of the last released original C-evo 1.2.0 version with many quality improvements:
* Full Linux platform support
* Zoomable map by mouse wheel with three tile sizes
* User defined key mapping
* Many sample maps included
* Multiple localizations included
* High DPI and scaling support
* Multi monitor support
* In-game background music
* And much more

%global debug_package %{nil}

%prep
%setup -q -c $(RPM_NAME)-$(RPM_VERSION)


%build
lazbuild --build-mode=Release AI/StdAI/StdAI.lpi
mv AI/StdAI/libstdai.so AI/StdAI/libstdai-%{_target_cpu}.so
sed -i 's/libstdai-i386.so/libstdai-%{_target_cpu}.so/g' AI/StdAI/StdAI.ai.txt
sed -i 's/libstdai-amd64.so/libstdai-%{_target_cpu}.so/g' AI/StdAI/StdAI.ai.txt
lazbuild --build-mode=Release Integrated.lpi


%install
rm -rf $RPM_BUILD_ROOT
install -Dm755 c-evo -t $RPM_BUILD_ROOT/usr/bin
install -Dm644 Install/common/c-evo.xml -t $RPM_BUILD_ROOT/usr/share/mime/packages
install -Dm644 Install/common/c-evo.desktop -t $RPM_BUILD_ROOT/usr/share/applications
install -Dm644 Install/common/c-evo_256x256.png $RPM_BUILD_ROOT/usr/share/pixmaps/c-evo.png
install -Dm644 Install/common/c-evo_256x256.png $RPM_BUILD_ROOT/usr/share/pixmaps/application-cevo.png
install -Dm644 Install/common/c-evo_256x256.png $RPM_BUILD_ROOT/usr/share/pixmaps/application-cevomap.png
install -Dm644 AI/StdAI/libstdai-%{_target_cpu}.so -t $RPM_BUILD_ROOT/usr/share/c-evo/AI/StdAI
install -Dm644 AI/StdAI/StdAI.ai.txt -t $RPM_BUILD_ROOT/usr/share/c-evo/AI/StdAI
install -Dm644 AI/StdAI/StdAI.png -t $RPM_BUILD_ROOT/usr/share/c-evo/AI/StdAI
install -Dm644 Language.txt -t $RPM_BUILD_ROOT/usr/share/c-evo
install -Dm644 Language2.txt -t $RPM_BUILD_ROOT/usr/share/c-evo
install -Dm644 Fonts.txt -t $RPM_BUILD_ROOT/usr/share/c-evo
cp -r Help $RPM_BUILD_ROOT/usr/share/c-evo
cp -r Graphics $RPM_BUILD_ROOT/usr/share/c-evo
cp -r Sounds $RPM_BUILD_ROOT/usr/share/c-evo
cp -r Music $RPM_BUILD_ROOT/usr/share/c-evo
cp -r Tribes $RPM_BUILD_ROOT/usr/share/c-evo
cp -r Maps $RPM_BUILD_ROOT/usr/share/c-evo
cp -r Saved $RPM_BUILD_ROOT/usr/share/c-evo
cp -r AI\ Template $RPM_BUILD_ROOT/usr/share/c-evo
cp -r Localization $RPM_BUILD_ROOT/usr/share/c-evo


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
/usr/bin/c-evo
/usr/share/applications/c-evo.desktop
/usr/share/c-evo/
/usr/share/pixmaps/c-evo.png
/usr/share/pixmaps/application-cevo.png
/usr/share/pixmaps/application-cevomap.png
/usr/share/mime/packages/c-evo.xml

%doc readme.txt


%changelog
openSUSE Build Service is sponsored by