This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian/master
in repository openarena.

commit 2bcf5e1e24c0d83a3dbced4ca3a2da1d479b4893
Author: Simon McVittie <s...@debian.org>
Date:   Wed Sep 21 11:17:48 2016 +0100

    debian/rules: align with ioquake3's
    
      - enable full compiler handling, but disable -fPIE -pie because this
        source package only compiles PIC shared objects
---
 debian/changelog |  3 ++
 debian/rules     | 92 +++++++++++++++++++++++++++++++++-----------------------
 2 files changed, 57 insertions(+), 38 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index fd0c34d..5384c99 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,9 @@ openarena (0.8.8-17) UNRELEASED; urgency=medium
   * Move to debhelper compat level 10
     - don't build in parallel explicitly, it is now the default
   * Remove openarena-dbg, rely on automatic dbgsym packages instead
+  * debian/rules: align with ioquake3's
+    - enable full compiler handling, but disable -fPIE -pie because this
+      source package only compiles PIC shared objects
 
  -- Simon McVittie <s...@debian.org>  Wed, 21 Sep 2016 11:01:51 +0100
 
diff --git a/debian/rules b/debian/rules
index 4e89794..01de1bc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,13 +1,24 @@
 #!/usr/bin/make -f
 #export DH_VERBOSE=1
 
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 export LC_ALL=C.UTF-8
 export TZ=UTC
 
+DEB_CFLAGS_MAINT_APPEND := \
+       -fsigned-char \
+       $(NULL)
+
 include /usr/share/dpkg/default.mk
 
-# the Q3 engine's build system doesn't respect CPPFLAGS, so put them in CFLAGS
-CFLAGS += $(CPPFLAGS) -fsigned-char
+%:
+       dh $@
+
+ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
+TARGET = release
+else
+TARGET = debug
+endif
 
 common_options = \
        V=1 \
@@ -28,15 +39,10 @@ common_options = \
        BUILD_GAME_SO=1 \
        CROSS_COMPILING=1 \
        VERSION=$(DEB_VERSION)/$(DEB_VENDOR) \
+       CFLAGS='$(filter-out -fPIE -pie,$(CFLAGS)) $(CPPFLAGS)' \
+       LDFLAGS='$(filter-out -fPIE -pie,$(LDFLAGS))' \
        $(NULL)
 
-TARGET = release
-
-ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
-# near enough
-TARGET = debug
-endif
-
 GAME_OPTIONS = \
        BR=build/normal \
        BD='$$(BR)' \
@@ -48,9 +54,6 @@ GAME_081_OPTIONS = \
        OPENARENA_081_COMPATIBLE=1 \
        $(NULL)
 
-%:
-       dh $@
-
 override_dh_auto_build:
        dh_auto_build -- $(common_options) $(GAME_OPTIONS) $(TARGET)
        dh_auto_build -- $(common_options) $(GAME_081_OPTIONS) $(TARGET)
@@ -78,57 +81,70 @@ override_dh_auto_clean:
        rm -f debian/scripts/openarena
        rm -f debian/scripts/openarena-server
 
+override_dh_auto_install: DESTDIR = debian/tmp
 override_dh_auto_install:
-       install -d debian/tmp/usr/games
-       install -d debian/tmp/usr/lib/openarena/baseoa/pak0/
-       install -d debian/tmp/usr/lib/openarena/baseoa/pak6-patch085/
-       install -d debian/tmp/usr/lib/openarena/baseoa/pak6-patch088/
-       install -d debian/tmp/usr/lib/openarena/missionpack/
-       install -d debian/tmp/usr/lib/openarena-server/baseoa/
-       install -d debian/tmp/usr/lib/openarena-server/missionpack/
+       install -d $(DESTDIR)/usr/games
+       install -d $(DESTDIR)/usr/lib/openarena/baseoa/pak0/
+       install -d $(DESTDIR)/usr/lib/openarena/baseoa/pak6-patch085/
+       install -d $(DESTDIR)/usr/lib/openarena/baseoa/pak6-patch088/
+       install -d $(DESTDIR)/usr/lib/openarena/missionpack/
+       install -d $(DESTDIR)/usr/lib/openarena-server/baseoa/
+       install -d $(DESTDIR)/usr/lib/openarena-server/missionpack/
        # The client currently needs two builds:
        # * one compatible with OA 0.8.1 pure servers
        # * one compatible with OA 0.8.5 and 0.8.8 pure servers
        # On impure servers, we default to the latest.
        install -m644 build/0.8.1-compat/baseq3/*.so \
-               debian/tmp/usr/lib/openarena/baseoa/pak0/
+               $(DESTDIR)/usr/lib/openarena/baseoa/pak0/
        install -m644 build/normal/baseq3/*.so \
-               debian/tmp/usr/lib/openarena/baseoa/pak6-patch088
-       ( cd debian/tmp/usr/lib/openarena/baseoa/pak6-patch085 && \
+               $(DESTDIR)/usr/lib/openarena/baseoa/pak6-patch088
+       ( cd $(DESTDIR)/usr/lib/openarena/baseoa/pak6-patch085 && \
                ln -s ../pak6-patch088/*.so . )
-       ( cd debian/tmp/usr/lib/openarena/baseoa && \
+       ( cd $(DESTDIR)/usr/lib/openarena/baseoa && \
                ln -s pak6-patch088/*.so . )
        # The "mission pack" doesn't currently have incompatible versions so
        # just use the latest
        install -m644 build/normal/missionpack/*.so\
-               debian/tmp/usr/lib/openarena/missionpack/
+               $(DESTDIR)/usr/lib/openarena/missionpack/
        # The server only needs the latest version, since it's the server
        # that determines which version clients are expected to be
        # compatible with
        install -m644 build/normal/baseq3/qagame*.so \
-               debian/tmp/usr/lib/openarena-server/baseoa/
+               $(DESTDIR)/usr/lib/openarena-server/baseoa/
        install -m644 build/normal/missionpack/qagame*.so\
-               debian/tmp/usr/lib/openarena-server/missionpack/
+               $(DESTDIR)/usr/lib/openarena-server/missionpack/
 
 override_dh_strip:
        dh_strip --ddeb-migration='openarena-dbg (<< 0.8.8-17~)'
 
+# ---------------------------------------------------------------------------
+
+ORIG_SOURCE = openarena
+ORIG_REL = 0.8.8
+
 .PHONY: get-orig-source
 get-orig-source:
        test ! -e get-orig-source
        mkdir get-orig-source
-       if test -e ../oa-0.8.8.tar.bz2; then \
-               cp ../oa-0.8.8.tar.bz2 get-orig-source/; \
+       if test -e ../oa-${ORIG_REL}.tar.bz2; then \
+               cp ../oa-${ORIG_REL}.tar.bz2 get-orig-source/; \
        else \
-               wget -O get-orig-source/oa-0.8.8.tar.bz2 \
-               
http://files.poulsander.com/~poul19/public_files/oa/dev088/oa-0.8.8.tar.bz2; \
+               wget -O get-orig-source/oa-${ORIG_REL}.tar.bz2 \
+               
http://files.poulsander.com/~poul19/public_files/oa/dev088/oa-${ORIG_REL}.tar.bz2;
 \
        fi
-       test "`sha256sum -b get-orig-source/oa-0.8.8.tar.bz2`" = \
-       "47fed4ea740278aa970538fc15819a4f6b8631eda380431ba09eb1b31ecbe5ad 
*get-orig-source/oa-0.8.8.tar.bz2"
-       tar -xvj -C get-orig-source -f get-orig-source/oa-0.8.8.tar.bz2
-       rm -rf get-orig-source/oa-0.8.8/tools/lcc
-       rm -rf get-orig-source/oa-0.8.8/windows_scripts/*.exe
-       mv get-orig-source/oa-0.8.8 get-orig-source/openarena_0.8.8.orig
-       tar -zcvf openarena_0.8.8.orig.tar.gz \
-               -C get-orig-source openarena_0.8.8.orig
+       test "`sha256sum -b get-orig-source/oa-${ORIG_REL}.tar.bz2`" = \
+       "47fed4ea740278aa970538fc15819a4f6b8631eda380431ba09eb1b31ecbe5ad 
*get-orig-source/oa-${ORIG_REL}.tar.bz2"
+       tar -xvj -C get-orig-source -f get-orig-source/oa-${ORIG_REL}.tar.bz2
+       rm -rf get-orig-source/oa-${ORIG_REL}/tools/lcc
+       rm -rf get-orig-source/oa-${ORIG_REL}/windows_scripts/*.exe
+       mv get-orig-source/oa-${ORIG_REL} 
get-orig-source/${ORIG_SOURCE}_${ORIG_REL}.orig
+       tar -zcvf ${ORIG_SOURCE}_${ORIG_REL}.orig.tar.gz \
+               -C get-orig-source ${ORIG_SOURCE}_${ORIG_REL}.orig
        rm -rf get-orig-source
+
+# to be invoked from a git checkout, tarball ends up in ../build-area
+maintainer-get-orig-source:
+       $(MAKE) -f debian/rules get-orig-source
+       mv -i -v ${ORIG_SOURCE}_${ORIG_VER}.orig.tar.gz ../build-area/
+       @echo "try using:"
+       @echo "gbp import-orig 
../build-area/${ORIG_SOURCE}_${ORIG_VER}.orig.tar.gz"

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/openarena.git

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to