triplea/triplea.spec

95 lines
2.6 KiB
RPMSpec

%define sourcever %(echo %version | tr . _)
Name: triplea
Version: 2.6.586
Release: 1mamba
Summary: A turn based strategy game engine and axis and allies clone
Group: Graphical Desktop/Applications/Games
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://triplea-game.org/
Source: https://github.com/triplea-game/triplea/releases/download/%{version}/triplea-game-headed-%{version}.zip
Patch0: triplea-0.9.0.2-getWindows_conflict.patch
Patch1: triplea-0.9.0.2-disable_LookAndFeel.patch
License: GPL
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
BuildRequires: javapackages
Requires: javapackages
%description
TripleA is a turn based strategy game engine and axis and allies clone.
%prep
%setup -q -c
#%patch0 -p1
#%patch1 -p1
%build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -d -m0755 %{buildroot}%{_datadir}/triplea
install -d -m0755 %{buildroot}%{_bindir}
cp -a bin %{buildroot}%{_datadir}/triplea/
cp -a assets %{buildroot}%{_datadir}/triplea/
cp .triplea-root %{buildroot}%{_datadir}/triplea/
cat > %{buildroot}%{_bindir}/triplea << _EOF
#!/usr/bin/bash
cd %{_datadir}/triplea
java -jar triplea-game-headed-%{version}.jar
_EOF
chmod +x %{buildroot}%{_bindir}/triplea
# create menu link
install -d %{buildroot}/%{_datadir}/applications
cat > %{buildroot}/%{_datadir}/applications/%{name}.desktop <<EOF
[Desktop Entry]
Name=TripleA
GenericName=A strategy game
GenericName[it]=Un gioco di strategia
Exec=%{_bindir}/triplea
Type=Application
Icon=kmines
Terminal=false
Categories=Application;Game;StrategyGame;
EOF
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_bindir}/triplea
%dir %{_datadir}/triplea
%{_datadir}/triplea/.triplea-root
%dir %{_datadir}/triplea/bin
%{_datadir}/triplea/bin/*
%dir %{_datadir}/triplea/assets
%{_datadir}/triplea/assets/*
%{_datadir}/applications/%{name}.desktop
%changelog
* Tue Aug 16 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 2.6.586-1mamba
- update to 2.6.586
* Thu Oct 11 2012 Automatic Build System <autodist@mambasoft.it> 1.6.1.2-1mamba
- automatic version update by autodist
* Sat Jul 21 2012 Automatic Build System <autodist@mambasoft.it> 1.5.2.1-1mamba
- update to 1.5.2.1
* Mon Dec 08 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.0.3-1mamba
- update to 1.0.0.3
* Mon Dec 08 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0-1mamba
- automatic update by autodist
* Tue Mar 11 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.0.2-1mamba
- package created by autospec