97 lines
2.7 KiB
RPMSpec
97 lines
2.7 KiB
RPMSpec
# norootforbuild
|
|
|
|
%define build_id build-12
|
|
|
|
Name: widelands
|
|
Version: 12
|
|
Release: 1
|
|
Summary: Open source realtime-strategy game
|
|
|
|
Group: Amusements/Games
|
|
License: GPLv2+
|
|
URL: http://www.widelands.org
|
|
Source0: http://prdownloads.sourceforge.net/%{name}/%{name}-%{build_id}-source.tar.bz2
|
|
Source1: widelands.desktop
|
|
Patch0: widelands.flagfix.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-build
|
|
|
|
BuildRequires: SDL_mixer-devel SDL_image-devel SDL_net-devel SDL_ttf-devel SDL_gfx-devel
|
|
BuildRequires: update-desktop-files scons gettext libpng-devel zlib-devel ctags
|
|
BuildRequires: gcc-c++ boost-devel
|
|
#%ifnarch ppc64
|
|
#BuildRequires: optipng
|
|
#%endif
|
|
|
|
Requires: hicolor-icon-theme
|
|
AutoReqProv: On
|
|
|
|
%description
|
|
Widelands is an open source (GPLed), realtime-strategy game, using SDL and
|
|
other free libraries, which is still under development. Widelands is inspired
|
|
by Settlers II (Bluebyte) and is partly similar to it, so if you know it, you
|
|
perhaps will have a thought, what Widelands is all about.
|
|
|
|
|
|
%prep
|
|
%setup -q -n %{name}
|
|
%patch0 -p0
|
|
sed -i 's#flagi#%{optflags}##' build/scons-tools/scons_configure.py
|
|
|
|
%build
|
|
scons build=release datadir=%{_datadir}/%{name} bindir=%{_bindir} localedir=%{_datadir}/%{name}/locale build_id=%{build_id}
|
|
|
|
# ./build-widelands.sh
|
|
|
|
%install
|
|
rm -rf $RPM_BUILD_ROOT
|
|
scons datadir=$RPM_BUILD_ROOT%{_datadir}/%{name} bindir=$RPM_BUILD_ROOT%{_bindir} localedir=$RPM_BUILD_ROOT%{_datadir}/%{name} build_id=%{build_id} install
|
|
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/doc
|
|
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/game_server
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps
|
|
cp -a pics/wl-logo-64.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
|
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
|
|
|
|
%suse_update_desktop_file -i %{name} Game StrategyGame
|
|
|
|
cd $RPM_BUILD_ROOT
|
|
find usr/share/widelands/locale/ -maxdepth 1 -type d -name \*_\* | sed -n 's#\(usr/share/widelands/locale/\(.*\)_.*\)#%lang(\2) /\1#p' > %{_builddir}/%{name}/%{name}.files
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%pre
|
|
# preparing system before update
|
|
cat << EOF | while read name; do rm -rf "%{_datadir}/widelands/maps/${name}.wmf"; done
|
|
Checkmate
|
|
Dry Riverbed
|
|
Elven Forests
|
|
Enemy in sight
|
|
Finlakes
|
|
Firegames
|
|
Four Castles
|
|
Glacier Lake
|
|
Golden Peninsula
|
|
Lake of tranquility
|
|
Plateau
|
|
Riverlands
|
|
The Oasis Triangle
|
|
The big lake
|
|
The long way
|
|
Two frontiers
|
|
War of the Valleys
|
|
EOF
|
|
|
|
%files -f %{name}.files
|
|
%defattr(-,root,root,-)
|
|
%doc ChangeLog COPYING CREDITS
|
|
%{_bindir}/%{name}
|
|
%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
|
|
%{_datadir}/applications/%{name}.desktop
|
|
%dir %{_datadir}/%{name}
|
|
%dir %{_datadir}/%{name}/locale
|
|
%{_datadir}/%{name}/*s*
|
|
|
|
%changelog
|
|
|