forked from pool/widelands
This commit is contained in:
commit
8b1425f172
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
3
widelands-build-11-source.tar.bz2
Normal file
3
widelands-build-11-source.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:102a305703070eb20af23f3015c8e1dfc9f87d7f719d71e07fcdbf84e85de0d3
|
||||||
|
size 35011678
|
3
widelands-build-12-source.tar.bz2
Normal file
3
widelands-build-12-source.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3640ab4a5147ebd826accb013e2013563759ad13b31e9e41193e203c94ee6384
|
||||||
|
size 41442971
|
5
widelands.changes
Normal file
5
widelands.changes
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Apr 11 23:02:49 CEST 2008 - claes.backstrom@fsfe.org
|
||||||
|
|
||||||
|
- Initial package (build11-1)
|
||||||
|
|
9
widelands.desktop
Normal file
9
widelands.desktop
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=Widelands
|
||||||
|
GenericName=Realtime Strategy Game
|
||||||
|
Comment=Build a growing settlement and rule the world
|
||||||
|
Icon=widelands
|
||||||
|
Exec=widelands
|
||||||
|
Categories=Game;StrategyGame;
|
||||||
|
|
64
widelands.flagfix.patch
Normal file
64
widelands.flagfix.patch
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
diff -up ./build/scons-tools/scons_configure.py.flagfix ./build/scons-tools/scons_configure.py
|
||||||
|
--- ./build/scons-tools/scons_configure.py.flagfix 2007-06-03 17:17:45.000000000 +0200
|
||||||
|
+++ ./build/scons-tools/scons_configure.py 2007-09-08 00:03:37.000000000 +0200
|
||||||
|
@@ -263,58 +263,4 @@ def do_configure(config_h_file, conf, en
|
||||||
|
print 'Could not find efence, so doing a debug-efence build is impossible !'
|
||||||
|
env.Exit(1)
|
||||||
|
|
||||||
|
- conf.CheckCompilerFlag('-fstack-protector-all', env)
|
||||||
|
- conf.CheckCompilerFlag('-fbounds-check', env)
|
||||||
|
- conf.CheckCompilerFlag('-pipe', env)
|
||||||
|
- conf.CheckCompilerFlag('-Wall', env)
|
||||||
|
- conf.CheckCompilerFlag('-Wcast-align', env)
|
||||||
|
- conf.CheckCompilerFlag('-Wcast-qual', env)
|
||||||
|
- conf.CheckCompilerFlag('-Wconversion', env)
|
||||||
|
- conf.CheckCompilerFlag('-Wdisabled-optimization', env)
|
||||||
|
- conf.CheckCompilerFlag('-Wextra', env)
|
||||||
|
- #conf.CheckCompilerFlag('-Wfloat-equal', env)
|
||||||
|
- #conf.CheckCompilerFlag('-Wformat=2', env)
|
||||||
|
- conf.CheckCompilerFlag('-Winline', env)
|
||||||
|
- conf.CheckCompilerFlag('-Winvalid-pch', env)
|
||||||
|
- conf.CheckCompilerFlag('-Wmissing-format-attribute', env)
|
||||||
|
- conf.CheckCompilerFlag('-Wmissing-include-dirs', env)
|
||||||
|
- conf.CheckCompilerFlag('-Wmissing-noreturn', env)
|
||||||
|
- conf.CheckCompilerFlag('-Wno-comment', env)
|
||||||
|
- conf.CheckCompilerFlag('-Wnormalized=nfc', env)
|
||||||
|
- #conf.CheckCompilerFlag('-Wold-style-cast', env)
|
||||||
|
- #conf.CheckCompilerFlag('-Wpadded', env)
|
||||||
|
- conf.CheckCompilerFlag('-Wpointer-arith', env)
|
||||||
|
- conf.CheckCompilerFlag('-Wunsafe-loop-optimizations', env)
|
||||||
|
- conf.CheckCompilerFlag('-Wshadow', env)
|
||||||
|
- conf.CheckCompilerFlag('-Wstack-protector', env)
|
||||||
|
- conf.CheckCompilerFlag('-Wstrict-aliasing=2', env)
|
||||||
|
- #conf.CheckCompilerFlag('-Wunreachable-code', env)
|
||||||
|
- conf.CheckCompilerFlag('-Wwrite-strings', env)
|
||||||
|
-
|
||||||
|
- #conf.CheckCompilerFlag('-Wno-deprecated-declarations', env)
|
||||||
|
- #conf.CheckCompilerFlag('-Wno-unused-variable', env)
|
||||||
|
- #conf.CheckCompilerFlag('-Wno-unused-parameter', env)
|
||||||
|
- #conf.CheckCompilerFlag('-Werror', env)
|
||||||
|
-
|
||||||
|
- if env.optimize:
|
||||||
|
- # !!!! -fomit-frame-pointer breaks execeptions !!!!
|
||||||
|
- conf.CheckCompilerFlag('-fexpensive-optimizations', env)
|
||||||
|
- conf.CheckCompilerFlag('-finline-functions', env)
|
||||||
|
- conf.CheckCompilerFlag('-ffast-math', env)
|
||||||
|
- conf.CheckCompilerFlag('-funroll-loops', env)
|
||||||
|
- conf.CheckCompilerFlag('-O3', env)
|
||||||
|
- else:
|
||||||
|
- conf.CheckCompilerFlag('-O0', env)
|
||||||
|
-
|
||||||
|
- if env.profile:
|
||||||
|
- conf.CheckCompilerFlag('-pg', env)
|
||||||
|
- conf.CheckCompilerFlag('-fprofile-arcs', env)
|
||||||
|
- conf.CheckLinkerFlag('-pg', env)
|
||||||
|
- conf.CheckLinkerFlag('-fprofile-arcs', env)
|
||||||
|
-
|
||||||
|
- if env.debug:
|
||||||
|
- conf.CheckCompilerFlag('-g', env)
|
||||||
|
- conf.CheckCompilerFlag('-fmessage-length=0', env)
|
||||||
|
-
|
||||||
|
- if env.strip:
|
||||||
|
- conf.CheckLinkerFlag('-s', env)
|
||||||
|
+ conf.CheckCompilerFlag('flagi', env)
|
||||||
|
|
121
widelands.spec
Normal file
121
widelands.spec
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
# norootforbuild
|
||||||
|
|
||||||
|
%define build_id build-11
|
||||||
|
|
||||||
|
Name: widelands
|
||||||
|
Version: 11
|
||||||
|
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
|
||||||
|
#begin porting to gcc43
|
||||||
|
find src -type f -exec sed -i 's/#include <string>/#include <string>\n#include <cstring>/' {} \; ;
|
||||||
|
sed -i 's/#include <stdexcept>/#include <stdexcept>\n#include <typeinfo>/' src/main.cc
|
||||||
|
sed -i 's/#include <algorithm>/#include <algorithm>\n#include <climits>/' src/network.cc
|
||||||
|
sed -i 's/#include <vector>/#include <vector>\n#include <algorithm>/' src/text_parser.cc
|
||||||
|
sed -i 's/user_info(std::string name, std::string name, std::string room)/user_info(std::string user, std::string game, std::string room)/' src/ui/ui_fs_menus/fullscreen_menu_inet_lobby.h
|
||||||
|
sed -i 's/#include <cstdarg>/#include <cstdarg>\n#include <algorithm>/' src/transport.cc
|
||||||
|
sed -i 's/#include <set>/#include <set>\n#include <algorithm>/' src/editor_game_base.cc
|
||||||
|
sed -i 's/std::abs/abs/' src/ui/ui_basic/ui_window.cc
|
||||||
|
sed -i 's/#include <vector>/#include <vector>\n#include <climits>\n#include <cstdlib>/' src/editor/tools/multi_select.h
|
||||||
|
sed -i 's/#include <vector>/#include <vector>\n#include <climits>\n#include <cstdlib>/' src/filesystem/filesystem.cc
|
||||||
|
sed -i 's/#include <cstring>/#include <cstring>\n#include <cstdlib>/' src/filesystem/zip_filesystem.cc
|
||||||
|
#end
|
||||||
|
|
||||||
|
%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
|
||||||
|
|
||||||
|
%post
|
||||||
|
touch --no-create %{_datadir}/icons/hicolor || :
|
||||||
|
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
||||||
|
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
|
||||||
|
fi
|
||||||
|
|
||||||
|
%postun
|
||||||
|
touch --no-create %{_datadir}/icons/hicolor || :
|
||||||
|
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
||||||
|
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
|
||||||
|
fi
|
||||||
|
|
||||||
|
%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
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user