Sisyphus repository
Last update: 26 november 2020 | SRPMs: 17744 | Visits: 19693922
en ru br
ALT Linux repos
S:0.11.6-alt2
5.0: 0.7.4-alt1

Other repositories
Upstream:0.7.3

Group :: Games/Strategy
RPM: freecol

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%define _unpackaged_files_terminate_build 1

Name: freecol
Version: 0.11.6
Release: alt2
Summary: FreeCol is opensource Colonization clone.
Url: http://freecol.org
Group: Games/Strategy
License: GPL-2.0+

BuildArch: noarch

Source: %name-%version.tar
Source1: %name.desktop
Source2: %name.xpm

Patch1: %name-%version-fedora-source-encoding.patch
Patch2: CVE-2018-1000825.patch

BuildRequires: rpm-build-java
BuildRequires: ant ant-nodeps
BuildRequires: subversion
BuildRequires: java-devel junit

Requires: java

%description
FreeCol is a turn-based strategy game based on the old game Colonization and similar to Civilization.
The objective of the game is to create an independent nation.

%prep
%setup
%patch1 -p1
%patch2 -p1

%build
export CLASSPATH=$(build-classpath junit)
%ant

%install
mkdir -p %buildroot%_bindir \
%buildroot%_gamesdatadir/%name/jars/ \
%buildroot%_gamesdatadir/%name/data/{audio,fonts,images,maps,strings} \
%buildroot%_gamesdatadir/%name/data/audio/sfx \
%buildroot%_gamesdatadir/%name/data/images/{bonus,colonies,forest,good,indians,misc,monarch,order-buttons,river,terrain,ui,units} \
%buildroot%_gamesdatadir/%name/data/images/order-buttons/{order-buttons00,order-buttons01,order-buttons02,order-buttons03} \
%buildroot%_gamesdatadir/%name/data/images/terrain/{terrain00,terrain01,terrain02,terrain03,terrain04,terrain05,terrain06,terrain07,terrain08,terrain09,terrain10,terrain11,terrain12,terrain13,terrain14,terrain15} \
%buildroot%_desktopdir \
%buildroot%_niconsdir

install -p FreeCol.jar %buildroot%_gamesdatadir/%name/FreeCol.jar
install -p jars/*.jar %buildroot%_gamesdatadir/%name/jars/
cp -pr data/ %buildroot%_gamesdatadir/%name/

cat > %buildroot%_bindir/%name <<EOF
pushd %_gamesdatadir/%name >/dev/null 2>&1
/usr/bin/java -Xmx256M -jar %_gamesdatadir/%name/FreeCol.jar $1 $2 $3 $4 $5 $6 $7 $8 $9
popd >/dev/null 2>&1
EOF

chmod +x %buildroot%_bindir/%name
install -p %SOURCE1 %buildroot%_desktopdir/%name.desktop
install -p %SOURCE2 %buildroot%_niconsdir/%name.xpm

%files
%_bindir/%name
%_gamesdatadir/%{name}*
%_desktopdir/%name.desktop
%_niconsdir/%name.xpm

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin