[SCM] Packaging for Liero branch, master, updated. upstream/1.35_b2+20100124.1-25-gb2f4a7b
Martin Erik Werner
martinerikwerner at gmail.com
Mon Apr 23 16:15:18 UTC 2012
The following commit has been merged in the master branch:
commit e24803f7407873bc95e2be3df48f4a11dd1d36d6
Author: Martin Erik Werner <martinerikwerner at gmail.com>
Date: Mon Apr 23 12:00:31 2012 +0200
debian/: Adapt to lierolibre
diff --git a/debian/README.source b/debian/README.source
deleted file mode 100644
index 213a4d8..0000000
--- a/debian/README.source
+++ /dev/null
@@ -1,13 +0,0 @@
-liero for Debian
-----------------
-
-1. QUILT
-This package uses quilt to manage all modifications to the upstream
-source. Changes are stored in the source package as diffs in
-debian/patches and applied during the build.
-
-On Debian systems with quilt installed, further documentation is available in
-`/usr/share/doc/quilt/README.source'
-
- -- Martin Erik Werner <martinerikwerner at gmail.com> Fri, 16 Dec 2011 21:30:28 +0100
-
diff --git a/debian/changelog b/debian/changelog
index dd9a9da..07f88bb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,5 @@
-liero (1.35~b2+20100124.1-1) unstable; urgency=low
+lierolibre (0.1-1) unstable; urgency=low
* Initial release (Closes: #648681)
- * Based on mercurial snapshot 31:ad3651241688 from
- <http://code.google.com/p/liero>
- * Added DataPath object for multi-user support from
- <http://code.google.com/r/martinerikwerner-liero>
- mercurial snapshot 94:49c0256f04f4
- * Added icon from game screenshot
- -- Martin Erik Werner <martinerikwerner at gmail.com> Sat, 17 Dec 2011 20:22:44 +0100
+ -- Martin Erik Werner <martinerikwerner at gmail.com> Mon, 23 Apr 2012 11:39:31 +0200
diff --git a/debian/control b/debian/control
index 9fe5ee3..96bb2b7 100644
--- a/debian/control
+++ b/debian/control
@@ -1,29 +1,36 @@
-Source: liero
-Section: contrib/games
+Source: lierolibre
+Section: games
Priority: extra
Maintainer: Martin Erik Werner <martinerikwerner at gmail.com>
Build-Depends: debhelper (>= 8),
- ftjam,
+ libtool,
imagemagick,
- libgvl0-dev,
+ sox,
libsdl-mixer1.2-dev,
zlib1g-dev
-Standards-Version: 3.9.2
-Homepage: http://www.liero.be
+Standards-Version: 3.9.3
+Homepage: https://launchpad.net/lierolibre
Vcs-Git: git://git.debian.org/pkg-games/liero.git
Vcs-Browser: http://git.debian.org/?p=pkg-games/liero.git;a=summary
-Package: liero
+Package: lierolibre
Architecture: any
Pre-Depends: dpkg (>= 1.15.6~)
-Depends: liero-data, ${misc:Depends}, ${shlibs:Depends}
-Description: earthworm simulation game based on a real physical model
- Liero is a wormgame with weapons for 2 players. The object of the game is
- definitely what you think it is. Liero is excellent for taking out aggression
- and kicking buddies' butts without any real physical violence or just for
- having fun.
+Depends: lierolibre-data, ${misc:Depends}, ${shlibs:Depends}
+Description: earthworm action game
+ lierolibre is an Earthworm simulation game based on a real physical model.
+ It is a direct fork of Liero (OpenLiero).
.
- In 2009, the classic Liero 1.33 was merged with the revival project called
- OpenLiero which became the currently official Liero. While keeping Liero 1.33
- intact, it has been given a semi-hidden extra menu (accessible with F1), which
- allows players to among other things record replays of their games.
+ Features:
+ * 2 worms, 40 weapons, great playability, two game modes: Kill'em All and Game
+ of Tag, plus AI-players without true intelligence!
+ * Dat nostalgia
+ * Extensions via a hidden F1 menu
+ + Replays
+ + Game controller support
+ + Powerlevel palettes
+ * Ability to write game variables to plain text files
+ * Ability to load game variables from both EXE and plain text files
+ * New freely licensed audio
+ * Scripts to extract and repack graphics, sounds and levels
+
diff --git a/debian/copyright b/debian/copyright
index bf97068..1929f95 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,21 +1,104 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: Liero
-Source: http://code.google.com/p/liero
+Source: https://gitorious.org/lierolibre
+Upstream-Contact: Martin Erik Werner <martinerikwerner at gmail.com>
Files: *
-Copyright: 2009, 2010 Erik Lindroos ("Gliptic") <gliptic at gmail.com>
- 2010, "basro"
-License: BSD-2-clause
+Copyright: 2007-2010, Erik Lindroos <gliptic at gmail.com>
+ 2010, Mario Carbajal "basro"
+License: BSD-2-Clause
+
+Files: console.* exactObjectList.hpp fastObjectList.hpp lfs.hpp rand.*
+ rect.hpp sdlmain.cpp sfx.* sobject.* sys.* text.* _build/*
+Copyright: 2007-2010, Erik Lindroos <gliptic at gmail.com>
+License: BSD-2-Clause
+
+Files: binReader.* constants.* main.cpp math.* reader.*
+Copyright: 2007-2010, Erik Lindroos <gliptic at gmail.com>
+ 2012, Martin Erik Werner <martinerikwerner at gmail.com>
+License: BSD-2-Clause
+
+Files: common.* controller/localController.cpp gfx.* gfx/font.* Jamfile
+ level.* menu/menu.* settings.* worm.*
+Copyright: 2007-2010, Erik Lindroos <gliptic at gmail.com>
+ 2010, Mario Carbajal "basro"
+ 2012, Martin Erik Werner <martinerikwerner at gmail.com>
+License: BSD-2-Clause
-Files: debian/*
-Copyright: 2011, Martin Erik Werner <martinerikwerner at gmail.com>
+Files: boostTesting.cpp configHelper.* configInit.* dataPath.* to_string.*
+ AUTHORS autogen.sh ChangeLog configure.ac COPYING Makefile.am NEWS
+ README
+Copyright: 2012, Martin Erik Werner <martinerikwerner at gmail.com>
License: BSD-2-Clause
+Comment: The full license texts in this document are separate entities with
+ separate licenses, and not covered under the BSD-2-Clause license
+
+Files: aclocal.m4 config.h.in configure Makefile.in build-aux/* m4/*
+Copyright: 1992-2011, Free Software Foundation, Inc.
+License: GPL-2+ or BSD-2-Clause
+Comment: Autotools content is distributed under the lierolibre license, if they
+ are used outside of lierolibre the GPL-2+ license applies instead
-Files: debian/liero.xpm
-Copyright: 1998, 1999 MetsnElimet (Joosa Riekkinen)
+Files: m4/sdl.m4
+Copyright: 1997-2012 Sam Lantinga
+License: LGPL-2.1+
+
+Files: data/*
+Copyright: 1998-1999 Joosa Reikkinen "MetsnElimet"
+License: WTFPL
+
+Files: data/sounds/*.wav
+Copyright: 2012, "sea"
License: WTFPL
-Comment:
- Extracted from game screenshot.
+
+Files: data/liero.cfg
+Copyright: 1998-1999 Joosa Reikkinen "MetsnElimet"
+ 2012 Martin Erik Werner <martinerikwerner at gmail.com>
+License: WTFPL
+
+Files: scripts/lierolibre-extractsounds scripts/lierolibre-packsounds
+ scripts/lierolibre-extractgfx scripts/lierolibre-packgfx
+ scripts/lierolibre-extractlev scripts/lierolibre-packlev
+Copyright: 2012, Martin Erik Werner <martinerikwerner at gmail.com>
+License: BSD-2-Clause
+
+Files: gvl/*
+Copyright: 2007-2010, Erik Lindroos <gliptic at gmail.com>
+License: BSD-2-Clause
+
+Files: gvl/zlib/*
+Copyright: 1995-2005 Jean-loup Gailly
+ 1995-2005 Mark Adler
+License: Zlib
+
+Files: gvl/uthread/uthread_config.hpp
+Copyright: 2003 Davide Libenzi
+License: GPL-2+
+Comment: This file is not used in the the gvl library
+
+Files: gvl/support/type_info.hpp
+Copyright: 2002 David Abrahams
+License: BSL-1.0
+
+License: BSD-2-Clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
License: WTFPL
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@@ -32,25 +115,63 @@ License: WTFPL
.
0. You just DO WHAT THE FUCK YOU WANT TO.
-License: BSD-2-clause
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
+License: Zlib
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
.
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
.
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ .
+ 3. This notice may not be removed or altered from any source
+ distribution.
+
+License: GPL-2+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+
+License: BSL-1.0
+ Boost Software License - Version 1.0 - August 17th, 2003
+ .
+ Permission is hereby granted, free of charge, to any person or organization
+ obtaining a copy of the software and accompanying documentation covered by
+ this license (the "Software") to use, reproduce, display, distribute,
+ execute, and transmit the Software, and to prepare derivative works of the
+ Software, and to permit third-parties to whom the Software is furnished to
+ do so, all subject to the following:
+ .
+ The copyright notices in the Software and this entire statement, including
+ the above license grant, this restriction and the following disclaimer,
+ must be included in all copies of the Software, in whole or in part, and
+ all derivative works of the Software, unless such copies or derivative
+ works are solely in the form of machine-executable object code generated by
+ a source language processor.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+ SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+ FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
diff --git a/debian/install b/debian/install
deleted file mode 100644
index 4f098d1..0000000
--- a/debian/install
+++ /dev/null
@@ -1,3 +0,0 @@
-_bin/openliero usr/lib/games/liero
-debian/liero.desktop usr/share/applications
-debian/scripts/liero usr/games
diff --git a/debian/liero.6 b/debian/liero.6
deleted file mode 100644
index edf0729..0000000
--- a/debian/liero.6
+++ /dev/null
@@ -1,35 +0,0 @@
-.TH LIERO 6 "Nov 14, 2011" "1.35b2" "Liero manual"
-.SH NAME
-liero \- An earthworm simulation game based on a real physical model
-.SH SYNOPSIS
-.B liero
-[
-.I lieroexepath
-]
-[
-.B \-h | \-help | \--help
-]
-.SH DESCRIPTION
-.B liero
-is a hack that reads data from the original Liero binaries, and recreates Liero in all it's glory, it has a semi-hidden extra menu (accessible with F1), which allows players to among other things record replays of their games).
-.SH OPTIONS
-.TP
-.I lieroexepath
-Specify a custom path to LIERO.EXE, the directory of the specified LIERO.EXE needs to also contain the necessary original Liero binaries for the game to work, defaults to
-.B /usr/share/games/liero/LIERO.EXE
-.TP
-.BI -v sdlvideodriver
-deprecated.
-.TP
-.B \-h | \-help | \--help
-Show this manpage.
-.SH AUTHOR
-The original Liero was created by Joosa Riekkinen ("MetsnElimet")
-.PP
-This Liero remake was written by Erik Lindroos ("Gliptic") and "basro"
-.PP
-This manual page was written by Martin Erik Werner
-.br
-<martinerikwerner at gmail.com>
-.br
-for the Debian project (and may be used by others).
diff --git a/debian/liero.desktop b/debian/liero.desktop
deleted file mode 100644
index 7508153..0000000
--- a/debian/liero.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=Liero
-GenericName=Earthworm simulation game based on a real physical model
-Exec=liero
-Icon=liero
-Terminal=false
-Categories=Game;ArcadeGame
diff --git a/debian/liero.xpm b/debian/liero.xpm
deleted file mode 100644
index f797c1f..0000000
--- a/debian/liero.xpm
+++ /dev/null
@@ -1,20 +0,0 @@
-/* XPM */
-static char * liero_xpm[] = {
-"9 9 8 1",
-" c None",
-". c #3CAC3C",
-"+ c #68BC68",
-"@ c #2C842C",
-"# c #D8D8D8",
-"$ c #B4B4B4",
-"% c #909090",
-"& c #206420",
-" ",
-" .. ",
-" .++. ",
-" +..@ ",
-" +###$%",
-" .++.@ ",
-" @. at +. ",
-"&.++.@ ",
-"@. .@ "};
diff --git a/debian/manpages b/debian/manpages
deleted file mode 100644
index 6928003..0000000
--- a/debian/manpages
+++ /dev/null
@@ -1 +0,0 @@
-debian/liero.6
diff --git a/debian/menu b/debian/menu
deleted file mode 100644
index b8d43d4..0000000
--- a/debian/menu
+++ /dev/null
@@ -1,6 +0,0 @@
-?package(liero):needs="X11" \
- section="Games/Action" \
- icon="/usr/share/pixmaps/liero.xpm" \
- title="Liero" \
- longtitle="Earthworm simulation game based on a real physical model" \
- command="/usr/games/liero"
diff --git a/debian/patches/custom-settings-load-write-handling.patch b/debian/patches/custom-settings-load-write-handling.patch
deleted file mode 100644
index be2cc7f..0000000
--- a/debian/patches/custom-settings-load-write-handling.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From: Martin Erik Werner <martinerikwerner at gmail.com>
-Date: Mon, 21 Nov 2011 23:50:40 +0100
-Subject: [PATCH] main.cpp: fix custom settings load/write handling
- * Make Liero write settings to the currently active settings file
- on exit, rather that always writing to LIERO.DAT
- (Closes: http://code.google.com/p/liero/issues/detail?id=4)
- * Re-enable using LIERO.OPT to get the name of the settings file
- that should be loaded on start
-Forwarded: http://code.google.com/p/liero/issues/detail?id=4
----
- main.cpp | 17 +++++++----------
- 1 files changed, 7 insertions(+), 10 deletions(-)
-
---- a/main.cpp
-+++ b/main.cpp
-@@ -148,25 +148,21 @@
-
- gfx.settingsFile = "LIERO";
-
--#if 0 // This is just stupid, no need to emulate it
-- if(!fileExists(lieroOPT)) // NOTE: Liero doesn't seem to use the contents of LIERO.OPT for anything useful
-+ if(!fileExists(lieroOPT)) // NOTE: Liero uses LIERO.OPT to store the name of the currently active settings file
- {
- gfx.settings.reset(new Settings);
- gfx.saveSettings();
- }
- else
--#endif
- {
-- /*
- FILE* f = fopen(lieroOPT.c_str(), "rb");
- std::size_t len = fileLength(f);
- if(len > 255) len = 255;
- char buf[256];
- fread(buf, 1, len, f);
-- game.settingsFile.assign(buf, len);
-+ gfx.settingsFile.assign(buf, len);
-
-- rtrim(game.settingsFile);
-- */
-+ rtrim(gfx.settingsFile);
- if(!gfx.loadSettings())
- {
- gfx.settingsFile = "LIERO";
-@@ -174,7 +170,7 @@
- gfx.saveSettings();
- }
-
-- //fclose(f);
-+ fclose(f);
- }
-
- gfx.setVideoMode();
-@@ -183,8 +179,7 @@
- //game.initGame();
- gfx.mainLoop();
-
-- gfx.settingsFile = "LIERO";
-- gfx.settings->save(joinPath(lieroEXERoot, "LIERO.DAT"));
-+ gfx.saveSettings();
-
- FILE* f = fopen(lieroOPT.c_str(), "wb");
- fwrite(gfx.settingsFile.data(), 1, gfx.settingsFile.size(), f);
diff --git a/debian/patches/datapath.patch b/debian/patches/datapath.patch
deleted file mode 100644
index 61f1990..0000000
--- a/debian/patches/datapath.patch
+++ /dev/null
@@ -1,192 +0,0 @@
-Description: DataPath module for multi-user support
- Add dataPath.cpp and dataPath.hpp files to be included in Liero, enabling
- separation of data/configuration files into (e.g.) /usr/lib/liero-data
- and $HOME/.liero
-Forwarded: http://code.google.com/r/martinerikwerner-liero/
-Author: Martin Erik Werner <martinerikwerner at gmail.com>
-Last-Update: 2011-11-15
-
---- /dev/null
-+++ b/dataPath.cpp
-@@ -0,0 +1,106 @@
-+// Compile via ~$ g++ -c dataPath.cpp
-+#include "dataPath.hpp"
-+#include <fstream>
-+#include <cstdlib>
-+#include <sys/stat.h>
-+#include <sys/types.h>
-+#include <stdexcept>
-+#include <cerrno>
-+using namespace std;
-+
-+string create_configdir(string directory)
-+{
-+ if (mkdir(directory.c_str(), 0777) == 0) {
-+ return directory;
-+ } else if (errno == EEXIST) {
-+ return directory;
-+ } else {
-+ throw runtime_error("Unable to create configdir '"
-+ + directory + "'");
-+ }
-+}
-+
-+DataPath::DataPath(string a_readonly_path)
-+{
-+ readonly_path = a_readonly_path;
-+ configdotdir = string(getenv("HOME")) + '/' + ".liero";
-+
-+ // Map of files we may want to return path to
-+ // should probably be read from plaintext file
-+ // true means writable, false read-only
-+ file_access_map.insert(pair<string, bool>("LIERO.EXE", false));
-+ file_access_map.insert(pair<string, bool>("LIERO.CHR", false));
-+ file_access_map.insert(pair<string, bool>("LIERO.SND", false));
-+ file_access_map.insert(pair<string, bool>("NAMES.DAT", false));
-+ file_access_map.insert(pair<string, bool>("LIERO.OPT", true));
-+ file_access_map.insert(pair<string, bool>("LIERO.DAT", true));
-+}
-+
-+string DataPath::file(string filename)
-+{
-+ fstream file_writable;
-+ ifstream file_readonly;
-+
-+ string filepath_readonly = readonly_path + '/' + filename;
-+ string filepath_writable = configdotdir + '/' + filename;
-+ if (file_access_map.count(filename) == 0) {
-+ if (filename.substr(filename.find_last_of(".") + 1)
-+ == "DAT") {
-+ // file ends with .DAT
-+ return filepath_writable;
-+ } else {
-+ throw runtime_error("Unknown file '" + filename + "'");
-+ }
-+ }
-+ bool file_shouldbe_writable = file_access_map.find(filename)->second;
-+
-+ if (file_shouldbe_writable) {
-+ file_writable.open(filepath_writable.c_str(),
-+ ios::binary | ios::in);
-+ if (file_writable.is_open()) {
-+ // File exists in configdir
-+ return filepath_writable;
-+ } else {
-+ // file does not exist in configdir
-+ file_readonly.open(filepath_readonly.c_str(),
-+ ios::binary);
-+ if (file_readonly.is_open()) {
-+ // file exists in readonly
-+ create_configdir(configdotdir);
-+ file_writable.open( filepath_writable.c_str(),
-+ ios::binary | ios::out);
-+ if (file_writable.is_open()) {
-+ file_writable
-+ << file_readonly.rdbuf();
-+ // error handling
-+ return filepath_writable;
-+ } else {
-+ // couldn't open writable file
-+ throw runtime_error("Could not open file '"
-+ + filepath_writable
-+ + "' for writing");
-+ }
-+ } else {
-+ // file does not exist anywhere
-+ throw runtime_error("Could not open file '"
-+ + filepath_writable + "'");
-+ }
-+ }
-+ } else {
-+ // file should not be writable
-+ file_readonly.open(filepath_readonly.c_str());
-+ if (file_readonly.is_open()) {
-+ // file exists in readonly
-+ return filepath_readonly;
-+ } else {
-+ // file does not exist anywhere
-+ throw runtime_error("Could not open file '"
-+ + filepath_readonly + "'");
-+ }
-+ }
-+}
-+
-+string DataPath::configdir(void)
-+{
-+ return create_configdir(configdotdir);
-+}
---- /dev/null
-+++ b/dataPath.hpp
-@@ -0,0 +1,72 @@
-+/*
-+ dataPath.hpp & dataPath.cpp
-+
-+ This object is intended to simplify integration into a GNU/Linux multi-user
-+ system.
-+ It contains two methods, file() and configdir().
-+ The constructor requires a path to a directory containing the (readonly)
-+ Liero data files.
-+
-+ file() is used for getting the path to a file that Liero might want to read
-+ or write to, it accepts a filename, e.g. "LIERO.DAT". When it is invoked it
-+ goes through the following steps:
-+ * Checks if the file should be writable or readonly, using an internally
-+ defined map
-+ * If file should be readonly, checks if file exists, then returns its path
-+ * If file should be writable, it makes sure the file exits in the
-+ $HOME/.liero directory (by copying if need be), then returns its path
-+ * Throws runtime_error()s if it is unable to provide the path.
-+
-+ configdir() is used simply for getting the path to the $HOME/.liero
-+ directory, creating it if need be.
-+ configdir() throws a runtime_error() if it is unable to provide the path.
-+
-+ Unit tests for this object are avaialble in boostTesting.cpp
-+
-+ Copyright (c) 2011, Martin Erik Werner <martinerikwerner at gmail.com>
-+ This software is released under the The BSD-2-Clause License:
-+
-+ Redistribution and use in source and binary forms, with or without
-+ modification, are permitted provided that the following conditions are met:
-+ * Redistributions of source code must retain the above copyright notice,
-+ this list of conditions and the following disclaimer.
-+ * Redistributions in binary form must reproduce the above copyright notice,
-+ this list of conditions and the following disclaimer in the documentation
-+ and/or other materials provided with the distribution.
-+
-+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-+ POSSIBILITY OF SUCH DAMAGE.
-+*/
-+
-+#ifndef DATA_PATH_HPP
-+#define DATA_PATH_HPP
-+
-+#include <string>
-+#include <map>
-+
-+class DataPath
-+{
-+public:
-+ DataPath(std::string a_readonly_path);
-+
-+ std::string file(std::string filename);
-+
-+ std::string configdir(void);
-+
-+private:
-+ std::string readonly_path;
-+ std::string configdotdir;
-+ // map: <filename, writable?>
-+ std::map<std::string, bool> file_access_map;
-+};
-+
-+#endif //DATA_PATH_HPP
diff --git a/debian/patches/datapath_integration.patch b/debian/patches/datapath_integration.patch
deleted file mode 100644
index 50aee12..0000000
--- a/debian/patches/datapath_integration.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-Description: DataPath integration into Liero
- DataPath is an added module to improve Liero's support for multiuser systems,
- this patch modifies the Liero code to call this module when it needs paths.
-Forwarded: http://code.google.com/r/martinerikwerner-liero/
-Author: Martin Erik Werner <martinerikwerner at gmail.com>
-Last-Update: 2011-11-15
-
---- a/controller/localController.cpp
-+++ b/controller/localController.cpp
-@@ -220,7 +220,7 @@
-
-
- }
-- std::string path = joinPath(lieroEXERoot, prefix + buf);
-+ std::string path = joinPath(data_path->configdir(), prefix + buf);
- replay.reset(new ReplayWriter(gvl::stream_ptr(new gvl::fstream(path.c_str(), "wb"))));
- replay->beginRecord(game);
- }
---- a/gfx.cpp
-+++ b/gfx.cpp
-@@ -953,7 +953,7 @@
-
- void onUpdate(Menu& menu, int item)
- {
-- std::string levelPath = joinPath(lieroEXERoot, gfx.settings->levelFile + ".lev");
-+ std::string levelPath = joinPath(data_path->configdir(), gfx.settings->levelFile + ".lev");
- if(!gfx.settings->randomLevel && fileExists(levelPath))
- {
- menu.items[Settings::SiLevel].value = '"' + gfx.settings->levelFile + '"';
-@@ -1109,7 +1109,7 @@
-
- bool altName = settings->extensions ? false : true;
-
-- DirectoryIterator di(joinPath(lieroEXERoot, ".")); // TODO: Fix lieroEXERoot to be "." instead of ""
-+ DirectoryIterator di(joinPath(data_path->configdir(), ".")); // TODO: Fix lieroEXERoot to be "." instead of ""
-
- std::vector<std::pair<std::string, std::string> > levels;
-
-@@ -1226,7 +1226,7 @@
-
- profileMenu.setHeight(14);
-
-- DirectoryIterator di(joinPath(lieroEXERoot, ".")); // TODO: Fix lieroEXERoot to be "." instead of ""
-+ DirectoryIterator di(joinPath(data_path->configdir(), ".")); // TODO: Fix lieroEXERoot to be "." instead of ""
-
- std::vector<std::string> profiles;
-
-@@ -1315,7 +1315,7 @@
-
- replayMenu.setHeight(14);
-
-- DirectoryIterator di(joinPath(lieroEXERoot, ".")); // TODO: Fix lieroEXERoot to be "." instead of ""
-+ DirectoryIterator di(joinPath(data_path->configdir(), ".")); // TODO: Fix lieroEXERoot to be "." instead of ""
-
- std::vector<std::string> replays;
-
-@@ -1367,7 +1367,7 @@
- if(replayMenu.isSelectionValid())
- {
- std::string replayName = replayMenu.items[replayMenu.selection()].string + ".lrp";
-- std::string fullPath = joinPath(lieroEXERoot, replayName);
-+ std::string fullPath = joinPath(data_path->configdir(), replayName);
-
- // Reset controller before opening the replay, since we may be recording it
- controller.reset();
-@@ -1798,13 +1798,13 @@
-
- void Gfx::saveSettings()
- {
-- settings->save(joinPath(lieroEXERoot, settingsFile + ".DAT"));
-+ settings->save(data_path->file(settingsFile + ".DAT"));
- }
-
- bool Gfx::loadSettings()
- {
- settings.reset(new Settings);
-- return settings->load(joinPath(lieroEXERoot, settingsFile + ".DAT"));
-+ return settings->load(data_path->file(settingsFile + ".DAT"));
- }
-
- void Gfx::drawBasicMenu(/*int curSel*/)
---- a/level.cpp
-+++ b/level.cpp
-@@ -269,7 +269,7 @@
- else
- {
- // TODO: Check .LEV as well as .lev
-- if(!load(common, settings, joinPath(lieroEXERoot, settings.levelFile + ".lev")))
-+ if(!load(common, settings, joinPath(data_path->configdir(), settings.levelFile + ".lev")))
- generateRandom(common, settings, rand);
-
- }
---- a/reader.cpp
-+++ b/reader.cpp
-@@ -5,7 +5,9 @@
- #include <stdexcept>
-
- std::string lieroOPT;
--std::string lieroEXERoot;
-+
-+DataPath* data_path = NULL;
-+// DATAPATH std::string lieroEXERoot;
-
- namespace
- {
-@@ -94,11 +96,13 @@
- void setLieroEXE(std::string const& path)
- {
- //TODO: Close cached files
--
-- lieroEXE = path;
-- lieroCHR = changeLeaf(path, "LIERO.CHR");
-- lieroSND = changeLeaf(path, "LIERO.SND");
-- lieroOPT = changeLeaf(path, "LIERO.OPT");
--
-- lieroEXERoot = getRoot(lieroEXE);
-+
-+ data_path = new DataPath(getRoot(path));
-+
-+ lieroEXE = data_path->file("LIERO.EXE");
-+ lieroCHR = data_path->file("LIERO.CHR");
-+ lieroSND = data_path->file("LIERO.SND");
-+ lieroOPT = data_path->file("LIERO.OPT");
-+
-+// DATAPATH lieroEXERoot = getRoot(lieroEXE);
- }
---- a/reader.hpp
-+++ b/reader.hpp
-@@ -1,11 +1,14 @@
- #ifndef LIERO_READER_HPP
- #define LIERO_READER_HPP
-
-+#include "dataPath.hpp"
- #include <cstdio>
- #include <string>
- #include <stdexcept>
- #include <SDL/SDL.h>
-
-+extern DataPath* data_path;
-+
- extern std::string lieroEXERoot;
- extern std::string lieroOPT;
-
---- a/settings.cpp
-+++ b/settings.cpp
-@@ -127,7 +127,7 @@
-
- void Settings::generateName(WormSettings& ws)
- {
-- FILE* f = fopen(joinPath(lieroEXERoot, "NAMES.DAT").c_str(), "rb");
-+ FILE* f = fopen(data_path->file("NAMES.DAT").c_str(), "rb");
-
- if(!f)
- return;
---- a/worm.cpp
-+++ b/worm.cpp
-@@ -40,7 +40,7 @@
- {
- try
- {
-- std::string path(joinPath(lieroEXERoot, newProfileName) + ".lpf");
-+ std::string path(joinPath(data_path->configdir(), newProfileName) + ".lpf");
- gvl::stream_ptr str(new gvl::fstream(path.c_str(), "wb"));
-
- gvl::octet_stream_writer writer(str);
-@@ -60,7 +60,7 @@
- int oldColor = color;
- try
- {
-- std::string path(joinPath(lieroEXERoot, newProfileName) + ".lpf");
-+ std::string path(joinPath(data_path->configdir(), newProfileName) + ".lpf");
- gvl::stream_ptr str(new gvl::fstream(path.c_str(), "rb"));
-
- gvl::octet_stream_reader reader(str);
diff --git a/debian/patches/jamfile.patch b/debian/patches/jamfile.patch
deleted file mode 100644
index c3487f4..0000000
--- a/debian/patches/jamfile.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Description: Jamfile changes for Debian
- * Usage of "SubDir" in Jamfile enforces the top directory name to "gvl" it has
- been disabled for Debian packaging to act predictably.
- * Include /usr/include to find system header files for gvl and Zlib
- * Add DataPath module to be compiled into Liero
- * Disable building of gvl and link to it as /usr/lib/libgvl.a
-Forwarded: no
-Author: Martin Erik Werner <martinerikwerner at gmail.com>
-Last-Update: 2011-11-15
-
---- a/Jamfile
-+++ b/Jamfile
-@@ -1,10 +1,10 @@
--SubDir TOP liero ;
-+#SubDir TOP liero ;
-
--C++FLAGS = -Wall -I$(TOP) -DNDEBUG ;
--CFLAGS = -Wall -I$(TOP) -DNDEBUG ;
-+C++FLAGS = -Wall -I$(TOP) -I/usr/include -DNDEBUG ;
-+CFLAGS = -Wall -I$(TOP) -I/usr/include -DNDEBUG ;
- OPTIM = -O3 ;
- LINK = "g++" ;
--LINKLIBS on openliero$(SUFEXE) = -lSDL -lSDL_mixer -lrt ;
-+LINKLIBS on openliero$(SUFEXE) = -lz -lSDL -lSDL_mixer ;
-
- Main openliero : bobject.cpp bonus.cpp common.cpp console.cpp
- constants.cpp filesystem.cpp game.cpp
-@@ -12,7 +12,7 @@
- ninjarope.cpp nobject.cpp rand.cpp
- reader.cpp sdlmain.cpp replay.cpp settings.cpp sfx.cpp
- sobject.cpp sys.cpp text.cpp viewport.cpp weapon.cpp
-- weapsel.cpp worm.cpp
-+ weapsel.cpp worm.cpp dataPath.cpp
-
- controller/commonController.cpp
- controller/localController.cpp
-@@ -33,8 +33,6 @@
- menu/timeBehavior.cpp
- ;
-
--MakeLocate openliero$(SUFEXE) : $(TOP)/liero/_bin ;
-+MakeLocate openliero$(SUFEXE) : _bin ;
-
--LinkLibraries openliero : libgvl ;
--
--SubInclude TOP gvl ;
-+LinkLibraries openliero : /usr/lib/libgvl.a ;
diff --git a/debian/patches/no-press-any-key.patch b/debian/patches/no-press-any-key.patch
deleted file mode 100644
index b5bbedb..0000000
--- a/debian/patches/no-press-any-key.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Description: Disable "Press Any Key..."
- Liero outputs "Press Any Key..." by default, which is quite unnecessary on
- GNU/Linux, plus it breaks the terminal prompt on exit.
-Forwarded: no
-Author: Martin Erik Werner <martinerikwerner at gmail.com>
-Last-Update: 2011-11-15
-
---- a/main.cpp
-+++ b/main.cpp
-@@ -140,7 +140,7 @@
- Console::writeLine(common->S[OK2]);
-
- Console::writeLine("");
-- Console::write(common->S[PressAnyKey]);
-+ //Console::write(common->S[PressAnyKey]);
- Console::waitForAnyKey();
- Console::clear();
-
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 472c39c..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,5 +0,0 @@
-custom-settings-load-write-handling.patch
-no-press-any-key.patch
-datapath.patch
-datapath_integration.patch
-jamfile.patch
diff --git a/debian/rules b/debian/rules
index ec7eba2..3e46a11 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,50 +3,6 @@
%:
dh $@
-override_dh_auto_clean:
- jam clean
-
-override_dh_auto_build:
- jam
-
-override_dh_install:
- dh_install
- mv debian/liero/usr/lib/games/liero/openliero \
- debian/liero/usr/lib/games/liero/liero
- install -d debian/liero/usr/share/pixmaps
- install -d debian/liero/usr/share/icons/hicolor/32x32/apps
- install -d debian/liero/usr/share/icons/hicolor/48x48/apps
- install -d debian/liero/usr/share/icons/hicolor/64x64/apps
- install -d debian/liero/usr/share/icons/hicolor/128x128/apps
- convert debian/liero.xpm -filter Point -resize x32 \
- debian/liero/usr/share/pixmaps/liero.xpm
- convert debian/liero.xpm -filter Point -resize x32 \
- debian/liero/usr/share/icons/hicolor/32x32/apps/liero.png
- convert debian/liero.xpm -filter Point -resize x48 \
- debian/liero/usr/share/icons/hicolor/48x48/apps/liero.png
- convert debian/liero.xpm -filter Point -resize x64 \
- debian/liero/usr/share/icons/hicolor/64x64/apps/liero.png
- convert debian/liero.xpm -filter Point -resize x128 \
- debian/liero/usr/share/icons/hicolor/128x128/apps/liero.png
-
override_dh_builddeb:
dh_builddeb -- -Zxz
-URL="https://code.google.com/p/liero/"
-VER=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-+]+).*,\1,p')
-# Can't get date of last hg commit easily, use current date as fallback
-DATE=$(shell date +%Y%m%d)
-#DATE=20100124
-DIR=liero-$(VER)+$(DATE).1.orig
-TAR=liero_$(VER)+$(DATE).1.orig.tar.bz2
-get-orig-source:
- rm -rf $(DIR)
- hg clone $(URL) $(DIR)
- #hg clone $(URL) $(DIR) -r ad3651241688
- find $(DIR) -name ".hgignore" -print -delete
- find $(DIR) -name ".hgsigs" -print -delete
- find $(DIR) -name ".hgtags" -print -delete
- rm -rf $(DIR)/.hg/
- BZIP2="-9" tar -cj --owner root --group root --mode a+rX \
- -f $(TAR) $(DIR)
- rm -rf $(DIR)
diff --git a/debian/scripts/liero b/debian/scripts/liero
deleted file mode 100644
index ad915a7..0000000
--- a/debian/scripts/liero
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-defaultpath="/usr/share/games/liero/LIERO.EXE"
-
-for arg in "$@"; do
- case "$arg" in
- -h|-help|--help) exec man liero ;;
- -*) ;;
- *) manualpath="true" ;;
- esac
-done
-
-if [ "$manualpath" = "true" ]; then
- exec /usr/lib/games/liero/liero ${1+"$@"}
-else
- exec /usr/lib/games/liero/liero ${1+"$@"} "$defaultpath"
-fi
-
diff --git a/debian/watch b/debian/watch
index eca80ab..b7ee7fc 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,2 +1,2 @@
-# liero is kept in mercurial VCS and does not do point releases of source for
-# GNU/Linux, please use the get-orig-source for grabbing new snapshots.
+version=3
+https://launchpad.net/lierolibre/+download/ http://launchpad.net/lierolibre/.+/lierolibre-(.+)\.tar\.gz
--
Packaging for Liero
More information about the Pkg-games-commits
mailing list