From e6baec4a4b4cb1aa61868160832d371231cceeaa Mon Sep 17 00:00:00 2001
From: godog <godog@autistici.org>
Date: Sat, 18 May 2019 16:15:36 +0200
Subject: [PATCH] Ship php-noblogs, a wrapper for php that does the right thing

---
 Makefile.in     | 3 ++-
 bin/php-noblogs | 5 +++++
 debian/rules    | 6 +-----
 3 files changed, 8 insertions(+), 6 deletions(-)
 create mode 100755 bin/php-noblogs

diff --git a/Makefile.in b/Makefile.in
index 9d38500..910f8f0 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -5,7 +5,8 @@ BIN_PROGRAMS = \
 	noblogs \
 	noblogsmr \
 	on-all-blogs \
-	on-local-blogs
+	on-local-blogs \
+	php-noblogs
 
 LIB_FILES = \
 	$(wildcard lib/*.php)
diff --git a/bin/php-noblogs b/bin/php-noblogs
new file mode 100755
index 0000000..be6400a
--- /dev/null
+++ b/bin/php-noblogs
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+exec env \
+  HTTP_HOST=noblogs.org \
+  php "$@"
diff --git a/debian/rules b/debian/rules
index 374f58b..cc81dde 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,9 +12,5 @@ include /usr/share/dpkg/default.mk
 
 override_dh_auto_configure:
 	dh_auto_configure -- \
-	--with-php=/opt/noblogs/bin/php-noblogs \
+	--with-php=/usr/bin/php-noblogs \
 	--with-wp-root=/opt/noblogs/www
-
-
-
-
-- 
GitLab