1 |
ovitters |
256324 |
%define _version2 %(echo %version | tr . _) |
2 |
|
|
|
3 |
|
|
Name: triplea |
4 |
|
|
Version: 1.5.2.1 |
5 |
|
|
Release: %mkrel 1 |
6 |
|
|
Summary: A networked open source strategy game |
7 |
|
|
Group: Games/Strategy |
8 |
|
|
License: GPLv2 |
9 |
|
|
URL: http://triplea.sourceforge.net/ |
10 |
solbu |
256422 |
Source0: http://prdownloads.sourceforge.net/triplea/%{name}_%{_version2}_source_code_only.zip |
11 |
ovitters |
256324 |
Source1: %{name}.png |
12 |
|
|
Patch0: %{name}-build.xml.patch |
13 |
|
|
BuildRequires: ant |
14 |
|
|
BuildRequires: dos2unix |
15 |
|
|
BuildRequires: jakarta-commons-codec |
16 |
|
|
BuildRequires: jakarta-commons-logging |
17 |
|
|
BuildRequires: java-devel |
18 |
|
|
BuildRequires: java-rpmbuild |
19 |
|
|
BuildRequires: jpackage-utils |
20 |
|
|
BuildRequires: junit |
21 |
|
|
BuildRequires: ant-junit |
22 |
|
|
BuildRequires: xerces-j2 |
23 |
|
|
BuildRequires: xmlbeans |
24 |
|
|
Requires: jakarta-commons-codec |
25 |
|
|
Requires: jakarta-commons-logging |
26 |
|
|
Requires: java >= 1.6 |
27 |
|
|
BuildArch: noarch |
28 |
|
|
|
29 |
|
|
%description |
30 |
|
|
Triplea is a networked open source strategy game, based on the |
31 |
|
|
Axis & Allies board game. It allows people to implement and play various |
32 |
|
|
strategy board games (ie. Axis & Allies). The TripleA engine has full |
33 |
|
|
networking support for online play, support for sounds, XML support for |
34 |
|
|
game files, and has its own imaging subsystem that allows for customized |
35 |
|
|
user editable maps to be used. TripleA is versatile, scalable and robust. |
36 |
|
|
|
37 |
|
|
|
38 |
|
|
%prep |
39 |
|
|
%setup -q -n %{name}_%{_version2} |
40 |
|
|
%patch0 |
41 |
|
|
%__rm triplea_mac_os_x.sh |
42 |
|
|
%__rm triplea_windows.bat |
43 |
|
|
dos2unix readme.html changelog.txt doc/*.html |
44 |
|
|
|
45 |
|
|
%build |
46 |
|
|
%ant zip |
47 |
|
|
|
48 |
|
|
%install |
49 |
|
|
rm -rf %{buildroot} |
50 |
|
|
# ant makes a zip file, so unzip that into the final dir. |
51 |
|
|
# Don't know another way to do it, yet. |
52 |
|
|
%__install -dm 755 %{buildroot}%{_gamesdatadir} |
53 |
|
|
%__unzip -q -d %{buildroot}%{_gamesdatadir} release/%{name}_%{_version2}_all_platforms.zip |
54 |
|
|
|
55 |
|
|
# startscript |
56 |
|
|
%__install -dm 755 %{buildroot}%{_gamesbindir} |
57 |
|
|
|
58 |
|
|
%__cat > %{buildroot}%{_gamesbindir}/%{name} << EOF |
59 |
|
|
#!/bin/sh |
60 |
|
|
%{_gamesdatadir}/%{name}/%{name}_unix.sh |
61 |
|
|
EOF |
62 |
|
|
chmod 755 %{buildroot}%{_gamesbindir}/%{name} |
63 |
|
|
|
64 |
|
|
# icon and menu-entry |
65 |
|
|
%__install -dm 755 %{buildroot}%{_datadir}/pixmaps |
66 |
|
|
%__install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps |
67 |
|
|
|
68 |
|
|
%__install -dm 755 %{buildroot}%{_datadir}/applications |
69 |
|
|
%__cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF |
70 |
|
|
[Desktop Entry] |
71 |
|
|
Encoding=UTF-8 |
72 |
|
|
Comment=Axis and Allies clone |
73 |
|
|
Name=TripleA |
74 |
|
|
GenericName=TripleA |
75 |
|
|
Type=Application |
76 |
|
|
Exec=%{_gamesbindir}/%{name} |
77 |
|
|
Icon=%{name} |
78 |
|
|
Categories=Game;StrategyGame; |
79 |
|
|
Terminal=false |
80 |
|
|
EOF |
81 |
|
|
|
82 |
|
|
%files |
83 |
|
|
%defattr(-,root,root,-) |
84 |
|
|
%doc changelog.txt readme.html doc/* |
85 |
|
|
%{_gamesbindir}/%{name} |
86 |
|
|
%{_datadir}/applications/%{name}.desktop |
87 |
|
|
%{_datadir}/pixmaps/%{name}.png |
88 |
|
|
%dir %{_gamesdatadir}/%{name} |
89 |
|
|
%{_gamesdatadir}/%{name}/* |
90 |
|
|
|