[openjk] 05/06: debian/rules: omit openjk-outcast package for non-experimental builds

Simon McVittie smcv at debian.org
Wed May 13 09:31:22 UTC 2015


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

smcv pushed a commit to branch master
in repository openjk.

commit f639ae74ca3c37a44f73844acc94eb1a4810a4e1
Author: Simon McVittie <smcv at debian.org>
Date:   Mon May 11 10:09:38 2015 +0100

    debian/rules: omit openjk-outcast package for non-experimental builds
    
    Upstream do not yet support the JK2 stuff to the same extent as JA.
    I'm building it for experimental so it can pass through the NEW queue,
    but I don't plan to upload it to unstable for a while.
---
 debian/rules | 66 +++++++++++++++++++++++++++++++++++++++++++-----------------
 1 file changed, 47 insertions(+), 19 deletions(-)

diff --git a/debian/rules b/debian/rules
index f052bba..5e2c189 100755
--- a/debian/rules
+++ b/debian/rules
@@ -28,15 +28,41 @@ endif
 
 include /usr/share/dpkg/default.mk
 
+# OpenJK upstream consider their support for Jedi Knight II: Jedi Outcast
+# to be very much experimental, so don't build it for unstable or Ubuntu
+# by default. Override with DEB_BUILD_OPTIONS=[no]outcast
+ifneq (,$(filter nooutcast,$(DEB_BUILD_OPTIONS)))
+$(info Disabling JK2 because DEB_BUILD_OPTIONS=nooutcast)
+with_jk2 = OFF
+else
+ifneq (,$(filter outcast,$(DEB_BUILD_OPTIONS)))
+$(info Enabling JK2 because DEB_BUILD_OPTIONS=outcast)
+with_jk2 = ON
+else
+ifeq (,$(filter-out experimental UNRELEASED,$(DEB_DISTRIBUTION)))
+$(info Enabling JK2 because this is an experimental or UNRELEASED build)
+with_jk2 = ON
+else
+$(info Disabling JK2 by default)
+with_jk2 = OFF
+endif
+endif
+endif
+
+dh_options =
+ifneq ($(with_jk2),ON)
+dh_options += -Nopenjk-outcast
+endif
+
 # for convenience, use a builddir that is excluded by upstream's .gitignore
 %:
-	dh $@ --builddir=obj --with=systemd --parallel
+	dh $@ --builddir=obj --with=systemd --parallel $(dh_options)
 
 override_dh_auto_configure:
 	dh_auto_configure -- \
-		-DBuildJK2SPEngine=ON \
-		-DBuildJK2SPRdVanilla=ON \
-		-DBuildJK2SPGame=ON \
+		-DBuildJK2SPEngine=$(with_jk2) \
+		-DBuildJK2SPRdVanilla=$(with_jk2) \
+		-DBuildJK2SPGame=$(with_jk2) \
 		-DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) \
 		-DCMAKE_INSTALL_PREFIX=/usr/lib/openjk \
 		-DCMAKE_VERBOSE_MAKEFILE=TRUE \
@@ -47,19 +73,12 @@ override_dh_auto_build: debian/icons
 
 override_dh_auto_install: debian/icons
 	dh_auto_install
-	cd debian/tmp/usr/lib/openjk/JediOutcast && ln -s openjo_sp.* openjo_sp
 	cd debian/tmp/usr/lib/openjk/JediAcademy && ln -s openjk_sp.* openjk_sp
 	cd debian/tmp/usr/lib/openjk/JediAcademy && ln -s openjk.* openjk
 	cd debian/tmp/usr/lib/openjk/JediAcademy && ln -s openjkded.* openjkded
 	install -d debian/tmp/usr/lib/openjk/JediAcademy/base
 	rm -fv debian/tmp/usr/lib/openjk/JediAcademy/base/*.so
 	cd debian/tmp/usr/lib/openjk/JediAcademy/base && ln -nfsv ../OpenJK/*.so .
-	install -d debian/tmp/usr/lib/openjk/JediOutcast/OpenJK
-	cd debian/tmp/usr/lib/openjk/JediOutcast/OpenJK && ln -s ../../JediAcademy/OpenJK/*.so .
-	install -d debian/tmp/usr/lib/openjk/JediOutcast/base
-	rm -fv debian/tmp/usr/lib/openjk/JediOutcast/base/*.so
-	cd debian/tmp/usr/lib/openjk/JediOutcast/base && ln -s ../OpenJK/jospgame*.so .
-	cd debian/tmp/usr/lib/openjk/JediOutcast/base && ln -s ../../JediAcademy/OpenJK/*.so .
 	sed \
 		-e 's!@IOQ3BINARY@!openjk_sp!' \
 		-e 's!@IOQ3SELF@!openjk_sp!' \
@@ -69,14 +88,6 @@ override_dh_auto_install: debian/icons
 		-e 's!@IOQ3ROLE@!single-player!' \
 		< debian/scripts/jedi.in > debian/scripts/openjk_sp
 	sed \
-		-e 's!@IOQ3BINARY@!openjo_sp!' \
-		-e 's!@IOQ3SELF@!openjo_sp!' \
-		-e 's!@LIBDIR@!openjk/JediOutcast!' \
-		-e 's!@DATA@!jedi-outcast-data!' \
-		-e 's!@IOQ3GAME@!Jedi Knight II: Jedi Outcast!' \
-		-e 's!@IOQ3ROLE@!single-player!' \
-		< debian/scripts/jedi.in > debian/scripts/openjo_sp
-	sed \
 		-e 's!@IOQ3BINARY@!openjk!' \
 		-e 's!@IOQ3SELF@!openjk!' \
 		-e 's!@LIBDIR@!openjk/JediAcademy!' \
@@ -92,6 +103,23 @@ override_dh_auto_install: debian/icons
 		-e 's!@IOQ3GAME@!Jedi Academy!' \
 		-e 's!@IOQ3ROLE@!server!' \
 		< debian/scripts/jedi.in > debian/scripts/openjkded
+ifeq ($(with_jk2),ON)
+	cd debian/tmp/usr/lib/openjk/JediOutcast && ln -s openjo_sp.* openjo_sp
+	install -d debian/tmp/usr/lib/openjk/JediOutcast/OpenJK
+	cd debian/tmp/usr/lib/openjk/JediOutcast/OpenJK && ln -s ../../JediAcademy/OpenJK/*.so .
+	install -d debian/tmp/usr/lib/openjk/JediOutcast/base
+	rm -fv debian/tmp/usr/lib/openjk/JediOutcast/base/*.so
+	cd debian/tmp/usr/lib/openjk/JediOutcast/base && ln -s ../OpenJK/jospgame*.so .
+	cd debian/tmp/usr/lib/openjk/JediOutcast/base && ln -s ../../JediAcademy/OpenJK/*.so .
+	sed \
+		-e 's!@IOQ3BINARY@!openjo_sp!' \
+		-e 's!@IOQ3SELF@!openjo_sp!' \
+		-e 's!@LIBDIR@!openjk/JediOutcast!' \
+		-e 's!@DATA@!jedi-outcast-data!' \
+		-e 's!@IOQ3GAME@!Jedi Knight II: Jedi Outcast!' \
+		-e 's!@IOQ3ROLE@!single-player!' \
+		< debian/scripts/jedi.in > debian/scripts/openjo_sp
+endif
 	chmod 0755 debian/scripts/openj*
 
 debian/icons: debian/rules

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



More information about the Pkg-games-commits mailing list