2014-07-03 18:40:14 +04:00
|
|
|
%define bld 18
|
2012-02-01 22:51:52 +04:00
|
|
|
|
2012-11-18 13:50:11 +11:00
|
|
|
Summary: Settlers II clone
|
2012-11-18 05:56:10 +04:00
|
|
|
Name: widelands
|
|
|
|
Version: b%{bld}
|
2014-07-14 15:45:07 +04:00
|
|
|
Release: 2
|
2012-11-18 13:50:11 +11:00
|
|
|
License: GPLv2+
|
|
|
|
Group: Games/Strategy
|
2014-01-22 21:47:34 +11:00
|
|
|
Url: http://www.widelands.org/
|
2012-02-01 22:51:52 +04:00
|
|
|
Source0: %{name}-build%{bld}-src.tar.bz2
|
2012-06-06 14:00:02 +04:00
|
|
|
Source1: %{name}.desktop
|
2012-11-18 13:50:11 +11:00
|
|
|
Source10: widelands.rpmlintrc
|
|
|
|
# fix "not find boost to build" issue
|
2012-06-06 14:00:02 +04:00
|
|
|
# patch from Open Build Service
|
2014-07-03 18:46:23 +04:00
|
|
|
#Patch0: %{name}-build%{bld}_boostfix.diff
|
2012-06-06 14:00:02 +04:00
|
|
|
# lower gcc optimization from -O3 to O2
|
2014-07-03 18:46:23 +04:00
|
|
|
#Patch1: widelands-0.17-cxxflags.patch
|
2012-06-06 14:00:02 +04:00
|
|
|
# fix build error
|
2014-07-03 18:46:23 +04:00
|
|
|
#Patch2: widelands-0.17-format-not-string-literal.patch
|
2012-06-06 14:00:02 +04:00
|
|
|
|
2014-01-22 21:47:34 +11:00
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: ctags
|
|
|
|
BuildRequires: doxygen
|
2012-11-18 13:50:11 +11:00
|
|
|
BuildRequires: optipng
|
2012-02-01 22:51:52 +04:00
|
|
|
BuildRequires: pngrewrite
|
2014-01-22 21:47:34 +11:00
|
|
|
BuildRequires: boost-devel
|
2012-02-01 22:51:52 +04:00
|
|
|
BuildRequires: gettext-devel
|
|
|
|
BuildRequires: ggz-client-libs-devel
|
2012-11-18 05:56:10 +04:00
|
|
|
BuildRequires: jpeg-devel
|
2014-07-14 15:45:07 +04:00
|
|
|
BuildRequires: lua5.1-devel
|
2014-01-22 21:47:34 +11:00
|
|
|
BuildRequires: pkgconfig(gl)
|
|
|
|
BuildRequires: pkgconfig(glu)
|
|
|
|
BuildRequires: pkgconfig(glew)
|
|
|
|
BuildRequires: pkgconfig(libpng)
|
|
|
|
BuildRequires: pkgconfig(libtiff-4)
|
|
|
|
BuildRequires: pkgconfig(python)
|
|
|
|
BuildRequires: pkgconfig(SDL_gfx)
|
|
|
|
BuildRequires: pkgconfig(SDL_image)
|
|
|
|
BuildRequires: pkgconfig(SDL_mixer)
|
|
|
|
BuildRequires: pkgconfig(SDL_net)
|
|
|
|
BuildRequires: pkgconfig(SDL_ttf)
|
|
|
|
BuildRequires: pkgconfig(zlib)
|
2012-06-06 14:00:02 +04:00
|
|
|
|
2012-11-18 13:50:11 +11:00
|
|
|
Requires: %{name}-basic-data
|
|
|
|
Requires: %{name}-maps
|
|
|
|
Requires: %{name}-i18n
|
|
|
|
Requires: %{name}-music
|
2014-01-22 21:47:34 +11:00
|
|
|
Requires: ggz-client-libs
|
2012-02-01 22:51:52 +04:00
|
|
|
|
|
|
|
%description
|
|
|
|
Widelands is an open source real-time strategy game. It is built upon
|
|
|
|
libSDL and other open source libraries and is still under heavy development.
|
|
|
|
If you know Settlers I & II™ (© Bluebyte), you might already have a rough
|
|
|
|
idea what Widelands is about.
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(644,root,root,755)
|
|
|
|
%doc ChangeLog COPYING
|
2012-06-06 14:00:02 +04:00
|
|
|
%{_datadir}/applications/%{name}.desktop
|
2012-02-01 22:51:52 +04:00
|
|
|
%{_iconsdir}/%{name}.png
|
|
|
|
%{_miconsdir}/%{name}.png
|
|
|
|
%{_liconsdir}/%{name}.png
|
|
|
|
%defattr(755,root,root,755)
|
|
|
|
%{_gamesbindir}/%{name}
|
|
|
|
|
|
|
|
#------------------------------------------------
|
|
|
|
|
|
|
|
%package -n %{name}-i18n
|
2012-11-18 13:50:11 +11:00
|
|
|
Summary: Translations for %{name}
|
|
|
|
Group: Games/Strategy
|
|
|
|
Requires: %{name} = %{version}
|
2012-02-01 22:51:52 +04:00
|
|
|
|
|
|
|
%description -n %{name}-i18n
|
|
|
|
Files to play %{name} in other languages than English.
|
|
|
|
|
|
|
|
%files -n %{name}-i18n
|
|
|
|
%defattr(644,root,root,755)
|
|
|
|
%{_gamesdatadir}/%{name}/locale
|
|
|
|
|
|
|
|
#------------------------------------------------
|
|
|
|
|
|
|
|
%package -n %{name}-basic-data
|
2012-11-18 13:50:11 +11:00
|
|
|
Summary: Basic data set for %{name}
|
|
|
|
Group: Games/Strategy
|
|
|
|
Requires: %{name} = %{version}
|
2012-02-01 22:51:52 +04:00
|
|
|
|
|
|
|
%description -n %{name}-basic-data
|
2012-11-18 13:50:11 +11:00
|
|
|
Basic data set used by %{name}.
|
|
|
|
Without these files you will not be able to play.
|
2012-02-01 22:51:52 +04:00
|
|
|
|
|
|
|
%files -n %{name}-basic-data
|
|
|
|
%defattr(644,root,root,755)
|
|
|
|
%{_gamesdatadir}/%{name}/COPYING
|
|
|
|
%{_gamesdatadir}/%{name}/CREDITS
|
|
|
|
%{_gamesdatadir}/%{name}/ChangeLog
|
|
|
|
%{_gamesdatadir}/%{name}/VERSION
|
|
|
|
%{_gamesdatadir}/%{name}/campaigns
|
|
|
|
%{_gamesdatadir}/%{name}/fonts
|
|
|
|
%{_gamesdatadir}/%{name}/global
|
|
|
|
%{_gamesdatadir}/%{name}/pics
|
|
|
|
%{_gamesdatadir}/%{name}/scripting
|
|
|
|
%{_gamesdatadir}/%{name}/sound
|
|
|
|
%{_gamesdatadir}/%{name}/tribes
|
|
|
|
%{_gamesdatadir}/%{name}/txts
|
|
|
|
%{_gamesdatadir}/%{name}/worlds
|
|
|
|
|
|
|
|
#------------------------------------------------
|
|
|
|
|
|
|
|
%package -n %{name}-maps
|
2012-11-18 13:50:11 +11:00
|
|
|
Summary: Maps for %{name}
|
|
|
|
Group: Games/Strategy
|
|
|
|
Requires: %{name} = %{version}
|
2012-02-01 22:51:52 +04:00
|
|
|
|
|
|
|
%description -n %{name}-maps
|
|
|
|
Maps for %{name}.
|
|
|
|
|
|
|
|
%files -n %{name}-maps
|
|
|
|
%defattr(644,root,root,755)
|
|
|
|
%{_gamesdatadir}/%{name}/maps
|
|
|
|
|
|
|
|
#------------------------------------------------
|
|
|
|
|
|
|
|
%package -n %{name}-music
|
2012-11-18 13:50:11 +11:00
|
|
|
Summary: Music for %{name}
|
|
|
|
Group: Games/Strategy
|
|
|
|
Requires: %{name} = %{version}
|
2012-02-01 22:51:52 +04:00
|
|
|
|
|
|
|
%description -n %{name}-music
|
2012-11-18 13:50:11 +11:00
|
|
|
Music files for %{name}.
|
|
|
|
These are not needed, but may improve fun while playing.
|
2012-02-01 22:51:52 +04:00
|
|
|
|
|
|
|
%files -n %{name}-music
|
|
|
|
%defattr(644,root,root,755)
|
|
|
|
%{_gamesdatadir}/%{name}/music
|
|
|
|
|
|
|
|
#------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{name}-build%{bld}-src
|
2014-07-03 18:40:14 +04:00
|
|
|
#patch0 -p1
|
|
|
|
#patch1 -p0
|
|
|
|
#patch2 -p1
|
2012-02-01 22:51:52 +04:00
|
|
|
|
|
|
|
%build
|
2012-06-06 14:00:02 +04:00
|
|
|
sed -i "1 i #include <unistd.h>" src/main.cc
|
|
|
|
%cmake -DCMAKE_BUILD_TYPE="Release" \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
2012-02-01 22:51:52 +04:00
|
|
|
-DWL_BINDIR="games" \
|
2012-06-06 14:00:02 +04:00
|
|
|
-DWL_INSTALL_PREFIX="/usr" \
|
|
|
|
-DWL_INSTALL_DATADIR="share/games/%{name}" \
|
2014-01-22 21:47:34 +11:00
|
|
|
-DWL_INSTALL_LOCALEDIR="/usr/share/games/%{name}/locale" \
|
2012-06-06 14:00:02 +04:00
|
|
|
-DBoost_USE_STATIC_LIBS=OFF
|
2012-02-01 22:51:52 +04:00
|
|
|
|
|
|
|
%make
|
|
|
|
|
|
|
|
%install
|
2012-11-18 05:56:10 +04:00
|
|
|
%makeinstall_std -C build
|
2012-02-01 22:51:52 +04:00
|
|
|
|
|
|
|
#icons
|
2012-06-06 14:00:02 +04:00
|
|
|
install -d %{buildroot}{%{_miconsdir},%{_liconsdir}}
|
|
|
|
install -m644 pics/wl-ico-16.png -D %{buildroot}%{_miconsdir}/%{name}.png
|
|
|
|
install -m644 pics/wl-ico-32.png -D %{buildroot}%{_iconsdir}/%{name}.png
|
|
|
|
install -m644 pics/wl-ico-48.png -D %{buildroot}%{_liconsdir}/%{name}.png
|
2012-02-01 22:51:52 +04:00
|
|
|
|
2012-06-06 14:00:02 +04:00
|
|
|
# .desktop file
|
|
|
|
install -m644 %{SOURCE1} -D %{buildroot}/%{_datadir}/applications/%{name}.desktop
|