|
|
5602e26 |
%global icon_file 7kaa_icon.png
|
|
|
5602e26 |
%global icon_dest_dir %{_datadir}/icons/hicolor/32x32/apps
|
|
|
5602e26 |
Name: 7kaa
|
|
|
5602e26 |
Version: 2.14.5
|
|
|
7b925ab |
Release: 10%{?dist}
|
|
|
5602e26 |
Summary: Seven Kingdoms: Ancient Adversaries
|
|
|
5602e26 |
|
|
|
5602e26 |
License: GPLv3+ and GPLv2+
|
|
|
5602e26 |
URL: http://7kfans.com/
|
|
|
5602e26 |
Source0: http://sourceforge.net/projects/skfans/files/%{name}-%{version}.tar.xz
|
|
|
5602e26 |
Source1: %{name}.autodlrc
|
|
|
5602e26 |
Patch0: http://sf.net/p/skfans/bugs/4/attachment/%{name}-formatSecurity.patch
|
|
|
5602e26 |
|
|
|
5602e26 |
BuildRequires: SDL2-devel, SDL2_net-devel
|
|
|
5602e26 |
BuildRequires: enet-devel
|
|
|
5602e26 |
BuildRequires: openal-soft-devel, autoconf
|
|
|
5602e26 |
BuildRequires: gettext-devel
|
|
|
5602e26 |
BuildRequires: desktop-file-utils
|
|
|
5602e26 |
BuildRequires: ImageMagick
|
|
|
5602e26 |
Requires: %{name}-data = %{version}-%{release}
|
|
|
5602e26 |
|
|
|
5602e26 |
%description
|
|
|
5602e26 |
Seven Kingdoms is a real-time strategy (RTS) computer game developed
|
|
|
5602e26 |
by Trevor Chan of Enlight Software. The game enables players to
|
|
|
5602e26 |
compete against up to six other kingdoms allowing players to conquer
|
|
|
5602e26 |
opponents by defeating them in war (with troops or machines),
|
|
|
5602e26 |
capturing their buildings with spies, or offering opponents money
|
|
|
5602e26 |
for their kingdom.
|
|
|
5602e26 |
|
|
|
5602e26 |
Seven Kingdoms: Ancient Adversaries is a free patch provided by
|
|
|
5602e26 |
Interactive Magic and added three new cultures, the Egyptians, the
|
|
|
5602e26 |
Mughals and the Zulus, and a new war machine, Unicorn.
|
|
|
5602e26 |
|
|
|
5602e26 |
%package data
|
|
|
5602e26 |
BuildArch: noarch
|
|
|
5602e26 |
Summary: In-Game data Seven Kingdoms: Ancient Adversaries
|
|
|
5602e26 |
|
|
|
5602e26 |
Requires: %{name} = %{version}-%{release}
|
|
|
5602e26 |
Requires: hicolor-icon-theme
|
|
|
5602e26 |
|
|
|
5602e26 |
%description data
|
|
|
5602e26 |
In-Game music data Seven Kingdoms: Ancient Adversaries
|
|
|
5602e26 |
|
|
|
5602e26 |
%package music
|
|
|
5602e26 |
License: Redistributable, no modification permitted
|
|
|
5602e26 |
BuildArch: noarch
|
|
|
5602e26 |
Summary: In-Game music for Seven Kingdoms: Ancient Adversaries
|
|
|
5602e26 |
|
|
|
5602e26 |
Requires: %{name}-data = %{version}-%{release}
|
|
|
5602e26 |
Requires: autodownloader, sudo
|
|
|
5602e26 |
|
|
|
5602e26 |
%description music
|
|
|
5602e26 |
In-Game music for Seven Kingdoms: Ancient Adversaries
|
|
|
5602e26 |
Due to license issue, you need to run 7kaa-data-installer install the music.
|
|
|
5602e26 |
|
|
|
5602e26 |
%prep
|
|
|
5602e26 |
%setup -q
|
|
|
5602e26 |
%patch0 -p0 -b .formatSecurity
|
|
|
5602e26 |
|
|
|
5602e26 |
%build
|
|
|
5602e26 |
%configure
|
|
|
5602e26 |
make %{?_smp_mflags}
|
|
|
5602e26 |
convert data/image/7k_icon.bmp %{icon_file}
|
|
|
5602e26 |
|
|
|
5602e26 |
|
|
|
5602e26 |
%install
|
|
|
5602e26 |
%make_install
|
|
|
5602e26 |
mkdir -p %{buildroot}%{icon_dest_dir}
|
|
|
5602e26 |
install -m 644 %{icon_file} %{buildroot}%{icon_dest_dir}
|
|
|
5602e26 |
|
|
|
5602e26 |
### == desktop file
|
|
|
5602e26 |
cat>%{name}.desktop<
|
|
|
5602e26 |
[Desktop Entry]
|
|
|
5602e26 |
Name=%{name}
|
|
|
5602e26 |
GenericName=Seven Kingdoms: Ancient Adversaries
|
|
|
5602e26 |
Comment=A real-time strategy (RTS) computer game
|
|
|
5602e26 |
Exec=/usr/bin/%{name}
|
|
|
5602e26 |
Icon=%{name}_icon
|
|
|
5602e26 |
Terminal=false
|
|
|
5602e26 |
Type=Application
|
|
|
5602e26 |
Categories=Game;StrategyGame
|
|
|
5602e26 |
END
|
|
|
5602e26 |
|
|
|
5602e26 |
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{name}.desktop
|
|
|
5602e26 |
|
|
|
5602e26 |
### == music autodownload
|
|
|
5602e26 |
%global data_installer %{name}-data-installer
|
|
|
5602e26 |
%global prj_music_dir %{_datadir}/%{name}/music
|
|
|
5602e26 |
mkdir -p %{buildroot}%{prj_music_dir}
|
|
|
5602e26 |
mkdir -p %{buildroot}/usr/share/doc/%{name}-music
|
|
|
5602e26 |
|
|
|
5602e26 |
### === Downloader
|
|
|
5602e26 |
cat >%{data_installer}<
|
|
|
5602e26 |
#!/bin/bash
|
|
|
5602e26 |
echo "This program will download necessary data files."
|
|
|
5602e26 |
if [ -r %{prj_music_dir}/win.wav ];then
|
|
|
5602e26 |
echo "music already downloaded" > /dev/stderr
|
|
|
5602e26 |
exit 2
|
|
|
5602e26 |
fi
|
|
|
5602e26 |
if ! /usr/share/autodl/AutoDL.py %{prj_music_dir}/%{name}.autodlrc; then
|
|
|
5602e26 |
echo "Error on music download" > /dev/stderr
|
|
|
5602e26 |
exit 3
|
|
|
5602e26 |
fi
|
|
|
5602e26 |
cd /tmp/%{name}-music
|
|
|
5602e26 |
tar xjvf /tmp/%{name}-music/%{name}-music.tar.bz2
|
|
|
5602e26 |
sudo install -v -m 644 /tmp/%{name}-music/%{name}-music/music/* /usr/share/%{name}/music
|
|
|
5602e26 |
sudo install -v -m 644 /tmp/%{name}-music/%{name}-music/*.txt /usr/share/doc/%{name}-music
|
|
|
5602e26 |
echo "Done"
|
|
|
5602e26 |
END
|
|
|
5602e26 |
|
|
|
5602e26 |
install -m 755 %{data_installer} %{buildroot}%{_bindir}/%{data_installer}
|
|
|
5602e26 |
install -m 644 %{SOURCE1} %{buildroot}%{prj_music_dir}
|
|
|
5602e26 |
|
|
|
7b925ab |
rm -f %{buildroot}%{_docdir}/%{name}/COPYING
|
|
|
7b925ab |
|
|
|
5602e26 |
%post data
|
|
|
5602e26 |
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
|
|
5602e26 |
|
|
|
5602e26 |
%postun data
|
|
|
5602e26 |
if [ $1 -eq 0 ] ; then
|
|
|
5602e26 |
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
|
|
|
5602e26 |
if [ -x /usr/bin/gtk-update-icon-cache ];then
|
|
|
5602e26 |
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|
|
5602e26 |
fi
|
|
|
5602e26 |
fi
|
|
|
5602e26 |
|
|
|
5602e26 |
%posttrans data
|
|
|
5602e26 |
if [ -x /usr/bin/gtk-update-icon-cache ];then
|
|
|
5602e26 |
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|
|
5602e26 |
fi
|
|
|
5602e26 |
|
|
|
5602e26 |
%postun music
|
|
|
cc54ba1 |
if [ $1 -eq 0 ] ; then
|
|
|
cc54ba1 |
## When Uninstall
|
|
|
cc54ba1 |
rm -fr %{prj_music_dir}
|
|
|
cc54ba1 |
fi
|
|
|
5602e26 |
|
|
|
5602e26 |
%files
|
|
|
5602e26 |
%doc README
|
|
|
5602e26 |
%license COPYING
|
|
|
5602e26 |
%{_bindir}/%{name}
|
|
|
5602e26 |
%{_datadir}/applications/%{name}.desktop
|
|
|
5602e26 |
|
|
|
5602e26 |
%files data
|
|
|
5602e26 |
%dir %{_datadir}/%{name}
|
|
|
5602e26 |
%{_datadir}/%{name}/[^m]*
|
|
|
5602e26 |
%{icon_dest_dir}/%{icon_file}
|
|
|
5602e26 |
|
|
|
5602e26 |
%files music
|
|
|
5602e26 |
%{_bindir}/%{data_installer}
|
|
|
5602e26 |
%dir %{prj_music_dir}
|
|
|
5602e26 |
%{prj_music_dir}/%{name}.autodlrc
|
|
|
5602e26 |
%dir %{_docdir}/%{name}-music
|
|
|
5602e26 |
|
|
|
5602e26 |
%changelog
|
|
|
7b925ab |
* Tue Oct 20 2015 Ding-Yi Chen <dchen@redhat.com> 2.14.5-10
|
|
|
cc54ba1 |
- music won't get uninstall when upgrading.
|
|
|
7b925ab |
- Remove /usr/share/doc/COPYING as it is already installed.
|
|
|
cc54ba1 |
|
|
|
5602e26 |
* Fri Jun 26 2015 Ding-Yi Chen <dchen@redhat.com> 2.14.5-8
|
|
|
5602e26 |
- Use name macro whenever possible.
|
|
|
5602e26 |
|
|
|
5602e26 |
* Wed Jun 24 2015 Ding-Yi Chen <dchen@redhat.com> 2.14.5-7
|
|
|
5602e26 |
- Fix the .desktop file.
|
|
|
5602e26 |
|
|
|
5602e26 |
* Tue Jun 23 2015 Ding-Yi Chen <dchen@redhat.com> 2.14.5-6
|
|
|
5602e26 |
- Requires: hicolor-icon-theme
|
|
|
5602e26 |
- License become GPLv3+ and GPLv2+ as "gettext.h" is GPLv3
|
|
|
5602e26 |
|
|
|
5602e26 |
* Wed Jun 17 2015 Ding-Yi Chen <dchen@redhat.com> 2.14.5-5
|
|
|
5602e26 |
- Fix for Review Request Comment #11
|
|
|
5602e26 |
|
|
|
5602e26 |
* Tue Jun 16 2015 Ding-Yi Chen <dchen@redhat.com> 2.14.5-4
|
|
|
5602e26 |
- Fix for Review Request Comment #10
|
|
|
5602e26 |
|
|
|
5602e26 |
* Tue Jun 02 2015 Ding-Yi Chen <dchen@redhat.com> 2.14.5-3
|
|
|
5602e26 |
- Fix for Review Request Comment #8
|
|
|
5602e26 |
|
|
|
5602e26 |
* Mon Jun 01 2015 Ding-Yi Chen <dchen@redhat.com> 2.14.5-2
|
|
|
5602e26 |
- Fix for Review Request Comment #6
|
|
|
5602e26 |
|
|
|
5602e26 |
* Sun May 31 2015 Ding-Yi Chen <dchen@redhat.com> 2.14.5-1
|
|
|
5602e26 |
- Upstream update to 2.14.5
|
|
|
5602e26 |
- BuildRequires: add enet-devel
|
|
|
5602e26 |
- Use autodownloader to download music.
|
|
|
5602e26 |
|
|
|
5602e26 |
* Wed May 27 2015 Ding-Yi Chen <dchen@redhat.com> 2.14.4-2
|
|
|
5602e26 |
- Remove music.
|
|
|
5602e26 |
|
|
|
5602e26 |
* Tue May 05 2015 Ding-Yi Chen <dchen@redhat.com> 2.14.4-1
|
|
|
5602e26 |
- Initial packaging.
|
|
|
5602e26 |
|