Browse Source

wesnoth 1.10.5-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@7319 ec354946-7b23-47d6-9f5a-488ba84defc7
iwaim 12 years ago
parent
commit
1643844c7f
1 changed files with 49 additions and 30 deletions
  1. 49 30
      w/wesnoth/wesnoth-vl.spec

+ 49 - 30
w/wesnoth/wesnoth-vl.spec

@@ -3,9 +3,9 @@
 %define with_campaignd 0
 %define with_wesnothd 0
 
-%define ver 1.8.6
+%define ver 1.10.5
 %define src_ver %{ver}
-%define rel 2
+%define rel 1
 
 %define with_svn 0
 %if %{with_svn}
@@ -45,14 +45,19 @@ Requires: SDL SDL_image SDL_mixer SDL_net SDL_ttf
 Requires: freetype2 libpng zlib pango fontconfig
 Requires: libboost-iostreams libboost-regex
 Requires: TrueType-vlgothic
+BuildRequires: cmake >= 2.6.0
 BuildRequires: desktop-file-utils
 BuildRequires: ImageMagick
 BuildRequires: xorg-x11-devel SDL-devel SDL_image-devel SDL_mixer-devel 
 BuildRequires: SDL_net-devel SDL_ttf-devel
 BuildRequires: freetype2-devel libpng-devel zlib-devel pango-devel
 BuildRequires: fontconfig-devel
-BuildRequires: libboost-devel >= 1.35
+BuildRequires: libboost-devel >= 1.36
 BuildRequires: libboost-iostreams libboost-regex
+BuildRequires: libboost-serialization
+BuildRequires: libboost-program-options
+BuildRequires: libboost-system
+BuildRequires: libboost-thread
 BuildRequires: lua-devel
 #BuildRequires: fribidi-devel
 #BuildRequires: python-devel
@@ -175,38 +180,40 @@ popd
 
 %build
 export CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" 
-%if %{with_svn}
-./autogen.sh
-%endif
-## for 1.8: missing configure script
-./autogen.sh
-%configure \
-    --disable-dependency-tracking \
+
+%__mkdir build
+pushd build
+%{cmake} \
+    -DLOCALEDIR=%{_localedir} \
+    -DENABLE_FRIBIDI:BOOL=OFF \
+    -DENABLE_GAME:BOOL=ON \
+    -DENABLE_DESKTOP_ENTRY:BOOL=ON \
+    -DENABLE_NOTIFICATIONS:BOOL=ON \
 %if %{with_editor}
-    --enable-editor \
+    --enable-editor \ # FIXME
 %endif
 %if %{with_tools}
-    --enable-tools \
+    -DENABLE_TOOLS:BOOL=ON
 %endif
 %if %{with_campaignd}
-    --enable-campaign-server \
+    -DENABLE_CAMPAIGN_SERVER:BOOL=ON \
 %endif
 %if %{with_wesnothd}
-    --enable-server=yes \
-    --with-fifodir=/var/run/wesnothd \
-    --with-server-gid=root \
-    --with-server-uid=root \
+    -DENABLE_SERVER:BOOL=ON \
+    -DFIFO_DIR=/var/run/wesnothd \
+    -DSERVER_GID=root \
+    -DSERVER_UID=root \
 %else
-    --enable-server=no \
+    -DENABLE_SERVER:BOOL=OFF \
 %endif
-    --with-localedir=%{_datadir}/locale \
-	;
+    ..
     
 %{__make}
-
+popd
 
 %install
 %{__rm} -rf ${RPM_BUILD_ROOT}
+pushd build
 %{__make} DESTDIR=${RPM_BUILD_ROOT} install 
 
 ### link sazanami-gothic.ttf
@@ -222,24 +229,22 @@ popd
 
 ### for Gnome menu
 %__mkdir_p $RPM_BUILD_ROOT/%{_datadir}/pixmaps
-%__sed -i -e 's/^Version=.*$//' \
-       -e 's/^Icon=wesnoth-icon\.png/Icon=wesnoth-icon/' \
-    icons/%{name}.desktop
+
 desktop-file-install \
     --dir $RPM_BUILD_ROOT/%{_datadir}/applications \
     --mode="0644" --vendor vine \
-    icons/%{name}.desktop
+    ../icons/%{name}.desktop
 #%__install -m 644 icons/%{name}-icon.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps
 for size in 16x16 20x20 22x22 24x24 32x32 36x36 64x64 48x48 64x64 72x72 96x96 128x128 192x192 ; do
     %__mkdir_p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${size}/apps
-    convert icons/%{name}-icon.png -size ${size} \
+    convert ../icons/%{name}-icon.png -size ${size} \
 	$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${size}/apps/%{name}-icon.png
 done
 %if %{with_editor}
 desktop-file-install \
     --dir $RPM_BUILD_ROOT/%{_datadir}/applications \
     --mode="0644" --vendor vine \
-    icons/%{name}_editor.desktop
+    ../icons/%{name}_editor.desktop
 %__install -m 644 icons/%{name}_editor-icon.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps
 %endif
 
@@ -264,7 +269,7 @@ install -Dpm 644 %{SOURCE2} ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/wesnoth
 
 ### remove unpackage files
 %if !%{with_editor}
-%{__rm} -f ${RPM_BUILD_ROOT}%{_datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-editor.mo
+%{__rm} -f ${RPM_BUILD_ROOT}%{_localedir}/*/LC_MESSAGES/wesnoth-editor.mo
 %endif
 
 find $RPM_BUILD_ROOT -name ".cvs*" | xargs rm -f
@@ -282,6 +287,8 @@ find $RPM_BUILD_ROOT -name "CVS" | xargs rm -rf
 
 %find_lang %{name} --all-name
 
+popd
+
 %clean
 %{__rm} -rf ${RPM_BUILD_ROOT}
 
@@ -319,7 +326,7 @@ fi
 %endif
 
 
-%files -f %{name}.lang
+%files -f build/%{name}.lang
 %defattr(-,root,root)
 %doc COPYING INSTALL README changelog copyright doc/manual/
 %{_bindir}/%{name}
@@ -336,7 +343,7 @@ fi
 %{_bindir}/wesnoth_editor
 %{_mandir}/man6/wesnoth_editor.*
 %{_mandir}/*/man6/wesnoth_editor.*
-%{_datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-editor.mo
+%{_localedir}/*/LC_MESSAGES/wesnoth-editor.mo
 %{_datadir}/applications/vine-wesnoth_editor.desktop
 %endif
 
@@ -370,6 +377,18 @@ fi
 
 
 %changelog
+* Fri Jan 11 2013 IWAI, Masaharu <iwai@alib.jp> 1.10.5-1
+- update to 1.10.5
+- update BR libboost version: 1.35 -> 1.36
+- add BuildRequires:
+  - libboost-serialization
+  - libboost-program-options
+  - libboost-system
+  - libboost-thread
+- using cmake
+- drop unnecessary script in install section
+  - fix desktop file script
+
 * Mon Sep  5 2011 IWAI, Masaharu <iwai@alib.jp> 1.8.6-2
 - drop Requires: xorg-x11-libs
 - drop unnecessary routine for Vine Linux 4