rpms/btanks/devel btanks-0.8-disable-smpeg.patch, NONE, 1.1 btanks-0.8-remove-rpath.patch, NONE, 1.1 btanks.desktop, NONE, 1.1 btanks.spec, NONE, 1.1 bted.desktop, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Alexey Torkhov atorkhov at fedoraproject.org
Wed Mar 18 08:42:26 UTC 2009


Author: atorkhov

Update of /cvs/pkgs/rpms/btanks/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13911/devel

Modified Files:
	.cvsignore sources 
Added Files:
	btanks-0.8-disable-smpeg.patch btanks-0.8-remove-rpath.patch 
	btanks.desktop btanks.spec bted.desktop import.log 
Log Message:
Initial import.


btanks-0.8-disable-smpeg.patch:

--- NEW FILE btanks-0.8-disable-smpeg.patch ---
diff -urp btanks-0.8.7686.orig/engine/menu/video_control.cpp btanks-0.8.7686/engine/menu/video_control.cpp
--- btanks-0.8.7686.orig/engine/menu/video_control.cpp	2008-08-06 15:04:29.000000000 +0400
+++ btanks-0.8.7686/engine/menu/video_control.cpp	2009-03-17 13:43:44.000000000 +0300
@@ -7,10 +7,10 @@
 #include "config.h"
 #include <assert.h>
 
-#define SMPEG_CHECK(f) do { const char * err; if ((err = SMPEG_error(mpeg)) != NULL) throw_ex(("%s: %s", f, err)); } while(0)
+//#define SMPEG_CHECK(f) do { const char * err; if ((err = SMPEG_error(mpeg)) != NULL) throw_ex(("%s: %s", f, err)); } while(0)
 
 VideoControl::VideoControl(const std::string &base, const std::string &name) : 
-base(base), name(name), mpeg(0), lock(SDL_CreateMutex()), active(false), started(false) //, updated(false)  
+base(base), name(name), /*mpeg(0),*/ lock(SDL_CreateMutex()), active(false), started(false) //, updated(false)  
 {
 	if (lock == NULL)
 		throw_sdl(("SDL_CreateMutex"));
@@ -25,6 +25,7 @@ base(base), name(name), mpeg(0), lock(SD
 	if (edv)
 		return;
 	
+	/*
 	fname = "maps/" + name + ".mpg";
 	if (Finder->exists(base, fname)) {
 		{
@@ -62,6 +63,7 @@ base(base), name(name), mpeg(0), lock(SD
 		//SMPEG_play(mpeg);
 		//SMPEG_CHECK("SMPEG_play");
 	}
+	*/
 }
 
 void VideoControl::activate(const bool a) {
@@ -71,6 +73,7 @@ void VideoControl::activate(const bool a
 }
 
 void VideoControl::checkStatus() {
+	/*
 	if (mpeg == NULL)
 		return;
 	
@@ -101,10 +104,12 @@ void VideoControl::checkStatus() {
 		mpeg = NULL;
 		break;
 	}
+	*/
 }
 
 void VideoControl::tick(const float dt) {
 	Control::tick(dt);
+	/*
 	if (mpeg == NULL || !active) 
 		return;
 		
@@ -134,19 +139,22 @@ void VideoControl::tick(const float dt) 
 		//updated = false;
 		SDL_mutexV(lock);
 	}
+	*/
 }
 
 void VideoControl::render(sdlx::Surface &surface, const int x, const int y) const {
-	if (mpeg == NULL || !active) {
+	//if (mpeg == NULL || !active) {
 		surface.blit(*screenshot, x, y);
 		return;
-	}
+	//}
+	/*
 	//int dx = (screenshot->get_width() - mpeg_info.width) / 2;
 	//int dy = (screenshot->get_height() - mpeg_info.height) / 2;
 	int dx = 0, dy = 0;
 	//LOG_DEBUG(("render %d %d", dx, dy));
 	
 	surface.blit(frame, x + dx, y + dy);
+	*/
 }
 
 void VideoControl::get_size(int &w, int &h) const {
@@ -155,9 +163,11 @@ void VideoControl::get_size(int &w, int 
 }
 
 VideoControl::~VideoControl() {
+	/*
 	if (mpeg != NULL) {
 		SMPEG_stop(mpeg);
 		SMPEG_delete(mpeg);
 	}
+	*/
 	SDL_DestroyMutex(lock);
 }
diff -urp btanks-0.8.7686.orig/engine/menu/video_control_disabled.h btanks-0.8.7686/engine/menu/video_control_disabled.h
--- btanks-0.8.7686.orig/engine/menu/video_control_disabled.h	2008-06-08 13:02:39.000000000 +0400
+++ btanks-0.8.7686/engine/menu/video_control_disabled.h	2009-03-17 13:42:48.000000000 +0300
@@ -3,7 +3,7 @@
 
 #include <string>
 #include "control.h"
-#include <smpeg/smpeg.h>
+//#include <smpeg/smpeg.h>
 #include "sdlx/surface.h"
 
 class DisabledVideoControl : public Control {
diff -urp btanks-0.8.7686.orig/engine/menu/video_control.h btanks-0.8.7686/engine/menu/video_control.h
--- btanks-0.8.7686.orig/engine/menu/video_control.h	2008-06-08 13:02:39.000000000 +0400
+++ btanks-0.8.7686/engine/menu/video_control.h	2009-03-17 13:42:48.000000000 +0300
@@ -3,7 +3,7 @@
 
 #include <string>
 #include "control.h"
-#include <smpeg/smpeg.h>
+//#include <smpeg/smpeg.h>
 #include "sdlx/surface.h"
 #include <SDL_thread.h>
 
@@ -20,8 +20,8 @@ private: 
 	void checkStatus();
 	std::string base, name;
 	const sdlx::Surface *screenshot;
-	SMPEG * mpeg;
-	SMPEG_Info mpeg_info;
+//	SMPEG * mpeg;
+//	SMPEG_Info mpeg_info;
 	sdlx::Surface shadow, frame;
 	SDL_mutex * lock;
 	bool active, started;
diff -urp btanks-0.8.7686.orig/engine/SConscript btanks-0.8.7686/engine/SConscript
--- btanks-0.8.7686.orig/engine/SConscript	2008-09-02 15:37:07.000000000 +0400
+++ btanks-0.8.7686/engine/SConscript	2009-03-17 13:42:54.000000000 +0300
@@ -7,7 +7,6 @@ Import('debug')
 Import('sdl_cflags')
 Import('sdl_libs')
 Import('lib_dir')
-Import('smpeg_lib')
 
 venv = env.Clone()
 env = env.Clone()
@@ -73,7 +72,7 @@ vorbis = 'vorbisfile'
 if debug and sys.platform == "win32": 
 	vorbis = 'vorbisfile_d'
 
-bt_libs = ['mrt', 'sdlx', smpeg_lib, 'SDL', vorbis, 'clunk']
+bt_libs = ['mrt', 'sdlx', 'SDL', vorbis, 'clunk']
 
 if sys.platform != 'win32' and env['enable_lua']:
 	got_lua = False
diff -urp btanks-0.8.7686.orig/SConstruct btanks-0.8.7686/SConstruct
--- btanks-0.8.7686.orig/SConstruct	2008-07-29 13:08:59.000000000 +0400
+++ btanks-0.8.7686/SConstruct	2009-03-17 13:42:48.000000000 +0300
@@ -133,13 +133,6 @@ else: 
 
 Export('sdl_cflags')
 Export('sdl_libs')
-smpeg_lib = 'smpeg'
-if debug and sys.platform == 'win32':
-	smpeg_lib = 'smpeg_d'
-Export('smpeg_lib')
-
-if not conf.CheckLibWithHeader(smpeg_lib, 'smpeg/smpeg.h', 'c++', "SMPEG_new_data(malloc(42), 42, NULL, 0);", False):
-	Exit(1)
 
 if not conf.CheckLibWithHeader('SDL_image', 'SDL/SDL_image.h', 'c++', "IMG_Load(0);", False):
 	Exit(1)

btanks-0.8-remove-rpath.patch:

--- NEW FILE btanks-0.8-remove-rpath.patch ---
diff -urp btanks-0.8.7686.orig/clunk/SConscript btanks-0.8.7686/clunk/SConscript
--- btanks-0.8.7686.orig/clunk/SConscript	2008-08-04 14:55:03.000000000 +0400
+++ btanks-0.8.7686/clunk/SConscript	2009-03-11 19:11:13.000000000 +0300
@@ -14,7 +14,6 @@ env.Append(CPPDEFINES=['CLUNKAPI=DLLEXPO
 clunk_libs = ['SDL', 'mrt']
 
 if sys.platform != 'win32':
-	env.Append(LINKFLAGS=['-Wl,-rpath,'+ lib_dir])
 	env.Append(LINKFLAGS=['-Wl,-rpath-link,build/' + env['mode'] + '/mrt'])
 	env.Append(LINKFLAGS=['-Wl,-rpath-link,build/' + env['mode'] + '/sdlx'])
 	clunk_libs.append('m')
diff -urp btanks-0.8.7686.orig/editor/SConscript btanks-0.8.7686/editor/SConscript
--- btanks-0.8.7686.orig/editor/SConscript	2008-07-25 14:28:41.000000000 +0400
+++ btanks-0.8.7686/editor/SConscript	2009-03-11 19:11:23.000000000 +0300
@@ -21,7 +21,6 @@ env.MergeFlags(sdl_cflags, sdl_libs)
 env.Append(CPPPATH=['#/engine', '#/engine/src'])
 
 if sys.platform != 'win32':
-	env.Append(LINKFLAGS=['-Wl,-rpath,' + lib_dir])
 	env.Append(LINKFLAGS=['-Wl,-rpath-link,build/' + env['mode']])
 	env.Append(LINKFLAGS=['-Wl,-rpath-link,build/' + env['mode'] + '/mrt'])
 	env.Append(LINKFLAGS=['-Wl,-rpath-link,build/' + env['mode'] + '/sdlx'])
diff -urp btanks-0.8.7686.orig/engine/SConscript btanks-0.8.7686/engine/SConscript
--- btanks-0.8.7686.orig/engine/SConscript	2008-09-02 15:37:07.000000000 +0400
+++ btanks-0.8.7686/engine/SConscript	2009-03-11 19:11:50.000000000 +0300
@@ -105,7 +105,6 @@ if sys.platform == "win32":
 #	bt_libs.append('GL')
 
 if sys.platform != 'win32':
-	env.Append(LINKFLAGS=['-Wl,-rpath,'+ lib_dir])
 	env.Append(LINKFLAGS=['-Wl,-rpath-link,build/' + env['mode'] + '/mrt'])
 	env.Append(LINKFLAGS=['-Wl,-rpath-link,build/' + env['mode'] + '/sdlx'])
 	env.Append(LINKFLAGS=['-Wl,-rpath-link,build/' + env['mode'] + '/clunk'])
@@ -130,7 +129,6 @@ if sys.platform == "win32":
 	bt_main_libs.append('sdlx_main')
 
 if sys.platform != 'win32':
-	bt_env.Append(LINKFLAGS=['-Wl,-rpath,'+ lib_dir])
 	bt_env.Append(LINKFLAGS=['-Wl,-rpath-link,build/' + env['mode'] + '/mrt'])
 	bt_env.Append(LINKFLAGS=['-Wl,-rpath-link,build/' + env['mode'] + '/sdlx'])
 	bt_env.Append(LINKFLAGS=['-Wl,-rpath-link,build/' + env['mode'] + '/clunk'])
diff -urp btanks-0.8.7686.orig/objects/SConscript btanks-0.8.7686/objects/SConscript
--- btanks-0.8.7686.orig/objects/SConscript	2008-09-02 15:43:40.000000000 +0400
+++ btanks-0.8.7686/objects/SConscript	2009-03-11 19:12:00.000000000 +0300
@@ -15,7 +15,6 @@ env.Append(CPPPATH=['#/engine', '#/engin
 env.MergeFlags(sdl_cflags, sdl_libs)
 
 if sys.platform != 'win32':
-	env.Append(LINKFLAGS=['-Wl,-rpath,'+ lib_dir])
 	env.Append(LINKFLAGS=['-Wl,-rpath-link,build/' + env['mode'] + '/mrt'])
 	env.Append(LINKFLAGS=['-Wl,-rpath-link,build/' + env['mode'] + '/sdlx'])
 	env.Append(LINKFLAGS=['-Wl,-rpath-link,build/' + env['mode'] + '/clunk'])
diff -urp btanks-0.8.7686.orig/sdlx/SConscript btanks-0.8.7686/sdlx/SConscript
--- btanks-0.8.7686.orig/sdlx/SConscript	2008-09-02 14:43:34.000000000 +0400
+++ btanks-0.8.7686/sdlx/SConscript	2009-03-11 19:12:15.000000000 +0300
@@ -22,7 +22,6 @@ if sys.platform != "win32":
 	libs.append('rt')
 	libs.append('X11')
 
-	env.Append(LINKFLAGS=['-Wl,-rpath,'+ lib_dir])
 	env.Append(LINKFLAGS=['-Wl,-rpath-link,build/' + env['mode'] + '/mrt'])
 else: 
 	c_map = env.SharedObject('c_map.cpp')


--- NEW FILE btanks.desktop ---
[Desktop Entry]
Type=Application
Name=Battle Tanks
Comment=Battle Tanks is a funny battle on your desk
Comment[ru]=Battle Tanks — это веселая маленькая война на столе
Exec=btanks
Icon=btanks
Categories=Game;ActionGame;


--- NEW FILE btanks.spec ---
Name:           btanks
Version:        0.8.7686
Release:        8%{?dist}
Summary:        Funny battle on your desk
Summary(ru):    Веселая маленькая война на столе

Group:          Amusements/Games
# Libraries clunk, mrt and sdlx are under LGPLv2+, all other sources are GPLv2+
License:        GPLv2+ and LGPLv2+
URL:            http://btanks.sourceforge.net/
# Remove RPath from binaries
Patch0:         %{name}-0.8-remove-rpath.patch
# Disable video previews of map levels (we don't distribute video anyway)
Patch1:         %{name}-0.8-disable-smpeg.patch
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
Source1:        %{name}.desktop
Source2:        bted.desktop
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

Requires:       %{name}-data = %{version}-%{release}
BuildRequires:  mesa-libGL-devel SDL-devel SDL_image-devel expat-devel
BuildRequires:  libvorbis-devel lua-devel zlib-devel scons zip dos2unix
BuildRequires:  desktop-file-utils
# Disabled video previews of map levels
#BuildRequires:  smpeg-devel

%description
Battle Tanks is a funny battle on your desk, where you can choose one of three
vehicles and eliminate your enemy using the whole arsenal of weapons. has
original cartoon-like graphics and cool music, it is fun and dynamic, it has
several network modes for deathmatch and cooperative.
What else is needed to have fun with your friends?

And all is packed and ready for you in Battle Tanks.

%description -l ru
«Battle Tanks» — это веселая маленькая война на столе, где вы можете выбрать
одну из трех доступных боевых машин и, используя весь доступный арсенал
вооружения, уничтожать своих противников. Это оригинальная графика в
мультипликационном стиле, забойная музыка, юмор, динамичность и большое
количество оружия. Это сетевые потасовки и кооперативные миссии в разнообразных
игровых локациях.
Что еще нужно игроку, чтобы отлично провести время с друзьями?

Все это вы найдете в «Battle Tanks».


%package        data
Summary:        Data files for %{name}
Group:          Amusements/Games
Requires:       %{name} = %{version}-%{release}

%description    data
The %{name}-data package contains data files that are needed for
running %{name}.


%prep
%setup -q
%patch0 -p1 -b .remove-rpath
%patch1 -p1 -b .disable-smpeg
dos2unix -k *.txt ChangeLog *.url LICENSE EXCEPTION

iconv -f latin1 -t utf-8 EXCEPTION > EXCEPTION.new
touch -r EXCEPTION{,.new}
mv -f EXCEPTION{.new,}

iconv -f latin1 -t utf-8 README-fr.txt > README-fr.txt.new
touch -r README-fr.txt{,.new}
mv -f README-fr.txt{.new,}

iconv -f cp1251 -t utf-8 README-ru.txt > README-ru.txt.new
touch -r README-ru.txt{,.new}
mv -f README-ru.txt{.new,}


%build
scons %{?_smp_mflags} \
        prefix=%{_prefix} \
        lib_dir=%{_libdir} \
        plugins_dir=%{_libdir}/%{name} \
        resources_dir=%{_datadir}/%{name} \
        mode=release \
        CFLAGS="%{optflags}" \
        CXXFLAGS="%{optflags}" \
        enable_lua=true


%install
rm -rf %{buildroot}

# binaries
install -dm 755 %{buildroot}%{_bindir}
install -m 755 build/release/engine/%{name} %{buildroot}%{_bindir}
install -m 755 build/release/editor/bted %{buildroot}%{_bindir}

# libs
install -dm 755 %{buildroot}%{_libdir}/%{name}
install -m 755 build/release/engine/libbt.so %{buildroot}%{_libdir}
install -m 755 build/release/mrt/libmrt.so %{buildroot}%{_libdir}
install -m 755 build/release/sdlx/libsdlx.so %{buildroot}%{_libdir}
install -m 755 build/release/clunk/libclunk.so %{buildroot}%{_libdir}

# plugins
install -m 755 build/release/objects/libbt_objects.so %{buildroot}%{_libdir}/%{name}

# data-files (see pack-resources.sh)
install -dm 755 %{buildroot}%{_datadir}/%{name}
install -dm 755 %{buildroot}%{_datadir}/%{name}/data
pushd data
find . \( -wholename \*.svn\* -or -name \*.wav \) -exec rm -rf {} \;
cp -pR * %{buildroot}%{_datadir}/%{name}/data
#zip -q -0 -r ../resources.dat * -x \*.svn\* -x \*.wav
popd
#install -m 644 resources.dat %{buildroot}%{_datadir}/%{name}

# icon
install -dm 755 %{buildroot}%{_datadir}/pixmaps
install -p -m 644 data/tiles/icon.png %{buildroot}%{_datadir}/pixmaps/%{name}.png

# menu-entries
install -dm 755 %{buildroot}%{_datadir}/applications
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE2}


%clean
rm -rf %{buildroot}


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc README-{editor,en,fr,ru}.txt ChangeLog *.url LICENSE EXCEPTION
%{_bindir}/%{name}
%{_bindir}/bted
%{_libdir}/*.so
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*.so
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%{_datadir}/applications/bted.desktop

%files data
%defattr(-,root,root,-)
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/data


%changelog
* Wed Mar 18 2009 Alexey Torkhov <atorkhov at gmail.com> - 0.8.7686-8
- Package data as separate files instead of big zip blob

* Tue Mar 17 2009 Alexey Torkhov <atorkhov at gmail.com> - 0.8.7686-7
- Add forgotten desktop-file-utils build requires
- Fixing bad BuildRoot

* Tue Mar 17 2009 Alexey Torkhov <atorkhov at gmail.com> - 0.8.7686-6
- Fixed source url
- Properly installing desktop files

* Tue Mar 17 2009 Alexey Torkhov <atorkhov at gmail.com> - 0.8.7686-5
- Add license for libraries

* Tue Mar 17 2009 Alexey Torkhov <atorkhov at gmail.com> - 0.8.7686-4
- Split data to subpackage instead of libs

* Tue Mar 17 2009 Alexey Torkhov <atorkhov at gmail.com> - 0.8.7686-3
- Add patch backups
- Simplify scripts a bit
- Move libs to -libs subpackage to ensure better work in multilib environment
- Cleanier remove-smpeg patch

* Wed Mar 11 2009 Alexey Torkhov <atorkhov at gmail.com> - 0.8.7686-2
- Updated package to conform packaging guidelines

* Tue Oct 28 2008 Arkady L. Shane <ashejn at yandex-team.ru> - 0.8.7686-1
- update to 0.8.7686


--- NEW FILE bted.desktop ---
[Desktop Entry]
Type=Application
Name=Battle Tanks map editor
Name[ru]=Battle Tanks — редактор карт
Comment=Battle Tanks map editor
Comment[ru]=Редактор карт для Battle Tanks
Exec=bted
Icon=btanks
Categories=Game;ActionGame;


--- NEW FILE import.log ---
btanks-0_8_7686-8_fc10:HEAD:btanks-0.8.7686-8.fc10.src.rpm:1237365631


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/btanks/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	18 Mar 2009 03:26:10 -0000	1.1
+++ .cvsignore	18 Mar 2009 08:41:56 -0000	1.2
@@ -0,0 +1 @@
+btanks-0.8.7686.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/btanks/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	18 Mar 2009 03:26:10 -0000	1.1
+++ sources	18 Mar 2009 08:41:56 -0000	1.2
@@ -0,0 +1 @@
+f5e4076e8562f4ad54fefeceaa37870d  btanks-0.8.7686.tar.bz2




More information about the fedora-extras-commits mailing list