Commit 4c121a55 authored by Ricardo Mones's avatar Ricardo Mones

Repackage to remove embedded tinyxml and unsafe symlinks

Also: switch to sequencer and enable hardening
parent 75386db2
README for epiphany
-------------------
Original source package contains an embedded copy of an old tinyxml
library, and also symlinks to automake-10 tools. All of this cruft has
been removed by repackaging. This of course means that supplied orig
tarball cannot be built standalone.
To make it buildable again:
a) (as intended by upstream) the tinyxml files can be copied back
to the removed src/tinyxml subdirectory. Checked to work with
Debian version 2.6.2-2 (but older ones may also work).
b) (the Debian way) just apply the patch “use-shared-tinyxml.diff”
to build it against the tinyxml shared library. This needs
libtinyxml-dev installed and also to run “autoreconf -i” before
configure to recover the removed autotools scripts.
Happy hacking!
--
Ricardo Mones <mones@debian.org>
epiphany (0.7.0+0-1) unstable; urgency=medium
* Repackaged upstream version 0.7.0 to remove embedded library
and unsafe symlinks, see README.source (thanks lintian!)
* debian/control, debian/patches/use-shared-tinyxml.diff
- Add patch to be able to build against shared tinyxml library
* debian/rules, debian/compat, debian/control
- Switch to debhelper sequencer, set compat level to 9 and
enable all hardening options except PIE
* debian/copyright
- Update year range
* debian/control
- Updated Standards-Version to 3.9.6 (no other changes)
- Remove Conflicts/Replaces with version beneath oldstable
- Moved from private svn to git at collab-maint, set Vcs-* URLs
* debian/epiphany-game.desktop
- Add some relevant Keywords
-- Ricardo Mones <mones@debian.org> Thu, 09 Oct 2014 01:35:54 +0200
epiphany (0.7.0-6) unstable; urgency=low
* debian/epiphany-game.6
......
......@@ -3,10 +3,12 @@ Section: games
Priority: optional
Maintainer: Joerg Jaspert <joerg@debian.org>
Uploaders: Ricardo Mones <mones@debian.org>
Build-Depends: debhelper (>> 5), automake, libsdl1.2-dev (>= 1.2.13-4),
libsdl-mixer1.2-dev
Standards-Version: 3.9.3
Build-Depends: debhelper (>= 9), automake, libsdl1.2-dev (>= 1.2.13-4),
libsdl-mixer1.2-dev, libtinyxml-dev, dh-autoreconf
Standards-Version: 3.9.6
Homepage: http://epiphany.sourceforge.net/site/
Vcs-Git: git://anonscm.debian.org/collab-maint/epiphany.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/epiphany.git
Package: epiphany
Architecture: any
......@@ -24,8 +26,6 @@ Description: clone of Boulder Dash game
Package: epiphany-data
Architecture: all
Depends: ${misc:Depends}
Conflicts: epiphany (<< 0.5.1-2)
Replaces: epiphany (<< 0.5.1-2)
Recommends: epiphany (>= ${binary:Version})
Description: required data files for epiphany game
This package provides all architecture-independent data files
......
......@@ -12,8 +12,8 @@ Copyright: 2002-2003 by Giuseppe "denever" Martino <rdmartin@infinito.it>
License: GPL-2+
Files: debian/*
Copyright: 2002-2012 by Joerg Jaspert <joerg@debian.org>
2006-2012 by Ricardo Mones <mones@debian.org>
Copyright: 2002-2014 by Joerg Jaspert <joerg@debian.org>
2006-2014 by Ricardo Mones <mones@debian.org>
License: GPL-2+
License: GPL-2
......
......@@ -7,6 +7,7 @@ GenericName[de]=Spiel
Comment=Collect valuable minerals, while avoiding being hit by a falling boulder or a bomb
Comment[es]=Recolecta valiosos minerales mientras evitas que te alcancen los bloques de roca que caen o las bombas
Comment[de]=Wertvolle Mineralien sammeln und vermeiden, von einem fallenden Stein oder einer Bombe getroffen zu werden
Keywords=collect;mineral;gravity;puzzle;mining;
Type=Application
Exec=epiphany-game
Icon=epiphany-game
......
use-shared-tinyxml.diff
Subject: build epiphany against shared tinyxml library
From: Ricardo Mones <mones@debian.org>
Forwarded: no
Last-Update: 2014-10-09
diff --git a/configure.in b/configure.in
index bec2e67..8387087 100644
--- a/configure.in
+++ b/configure.in
@@ -6,8 +6,8 @@ AC_PROG_CXX
AC_PROG_INSTALL
AC_CHECK_HEADER(SDL/SDL.h,, [echo "Please install SDL from http://www.libsdl.org";exit])
AC_CHECK_HEADER(SDL/SDL_mixer.h,, [echo "Please install SDL_mixer from http://www.libsdl.org/projects/SDL_mixer/";exit])
-
-
+AC_LANG_PUSH(C++)
+AC_CHECK_HEADER(tinyxml.h,, [echo "Please install tinyxml library from http://www.grinninglizard.com/tinyxml/";exit])
AC_CHECK_LIB( SDL, main,, [
@@ -24,6 +24,13 @@ AC_CHECK_LIB( SDL, main,, [
exit
])
+AC_CHECK_LIB( tinyxml, main,, [
+ echo "tinyxml installed, but -ltinyxml not found, run 'ldconfig' and try again,"
+ echo "if that doesn't help have a look at the file config.log and look into"
+ echo "the FAQ."
+ exit
+ ])
+
AH_TEMPLATE(DEBUG_MODE)
[CXXFLAGS=""]
diff --git a/src/Makefile.am b/src/Makefile.am
index cfc2687..9ee1bc1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -14,11 +14,10 @@ epiphany_game_SOURCES = sfx.cpp main.cpp level.cpp sample.cpp entity.cpp \
screen.cpp sprite.cpp menu.cpp game.cpp surface_manager.cpp input.cpp fonts/font.cpp \
fonts/font_factory.cpp fonts/font_manager.cpp surface.cpp resource_factory.cpp \
menu_entry_ranged.cpp menu_list_epiphany.cpp menu_list_options.cpp \
- tinyxml/tinystr.cpp tinyxml/tinyxmlerror.cpp tinyxml/tinyxmlparser.cpp \
- tinyxml/tinyxml.cpp menu_entry_bool.cpp music_manager.cpp xml_configuration.cpp \
+ menu_entry_bool.cpp music_manager.cpp xml_configuration.cpp \
commandline_configuration.cpp
-epiphany_game_LDADD = -lSDL -lSDL_mixer
+epiphany_game_LDADD = -lSDL -lSDL_mixer -ltinyxml
noinst_HEADERS = entity_type.h emdlparser.h levelmap.h \
@@ -35,6 +34,6 @@ noinst_HEADERS = entity_type.h emdlparser.h levelmap.h \
entities/entity_gem.h entities/entity_emerald.h entities/entity_tomato.h \
resource_factory.h sprite.h epimap.h entity.h \
menu_entry.h menu_entry_simple.h menu_entry_ranged.h menu_list.h \
- menu_list_epiphany.h menu_list_options.h tinyxml/tinystr.h \
- tinyxml/tinyxml.h menu_entry_bool.h music_manager.h abstract_configuration.h \
- xml_configuration.h commandline_configuration.h
\ No newline at end of file
+ menu_list_epiphany.h menu_list_options.h \
+ menu_entry_bool.h music_manager.h abstract_configuration.h \
+ xml_configuration.h commandline_configuration.h
diff --git a/src/epiconfig.cpp b/src/epiconfig.cpp
index aa62bed..db3e60d 100644
--- a/src/epiconfig.cpp
+++ b/src/epiconfig.cpp
@@ -15,7 +15,7 @@
***************************************************************************/
#include "epiconfig.h"
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
#include <cstdlib>
#include "sprite.h"
diff --git a/src/xml_configuration.cpp b/src/xml_configuration.cpp
index 7e36af5..03d5a17 100644
--- a/src/xml_configuration.cpp
+++ b/src/xml_configuration.cpp
@@ -3,7 +3,7 @@
#include <string>
#include <cstring>
#include <cassert>
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
#!/usr/bin/make -f
#export DH_VERBOSE=1
PACKAGE := epiphany
pwd=$(shell pwd)
TOPDIR := $(shell pwd)
t = ${TOPDIR}/debian/epiphany
d = ${TOPDIR}/debian/epiphany-data
UPSTREAM_VERSION = $(shell /bin/bash ${TOPDIR}/debian/get-ups-ver.sh ${TOPDIR})
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
configure-stamp: configure
for a in depcomp missing install-sh ; \
do ln -sf /usr/share/automake-*/$$a ; \
done
dh_testdir
CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr
touch configure-stamp
build: build-arch build-indep
build-arch: build-stamp
export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie
build-indep: build-stamp
%:
dh $@ --with autoreconf
build-stamp: configure-stamp
dh_testdir
$(MAKE) # DEBUGFLAGS="" OPTFLAGS='$(CFLAGS)'
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
[ ! -f Makefile ] || $(MAKE) clean
dh_clean
install:
override_dh_install:
dh_testdir
dh_testroot
dh_clean -k
dh_prep
dh_installdirs
cp src/epiphany-game $(t)/usr/games/epiphany-game
rm -f data/maps/.cvsignore data/gfx/.cvsignore data/sfx/.cvsignore
......@@ -62,24 +23,6 @@ install:
cp debian/epiphany-game.xpm $(t)/usr/share/pixmaps
cp debian/epiphany-game.desktop $(t)/usr/share/applications
binary-indep:
binary-arch: build install
dh_testdir
dh_testroot
dh_installdocs
dh_installmenu
dh_installman
dh_installchangelogs ChangeLog
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
override_dh_gencontrol:
dh_gencontrol -- -VUpstream-Version=$(UPSTREAM_VERSION)
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment