From 4ce116d4c25ac7592b462356a64f53e6fd1fa398 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Thu, 5 Mar 2009 12:52:27 +0100 Subject: [PATCH] Install the web-interfaces to /usr/share/PACKAGE/www. /var/www is for the user of the local admin only. --- debian/changelog | 6 +++++- debian/mlmmj-php-web-admin.apache.conf | 17 +++++++++++++++++ debian/mlmmj-php-web.apache.conf | 16 ++++++++++++++++ debian/patches/02_fix_mlmmj_php.dpatch | 6 +++--- debian/rules | 16 ++++++++++++---- 5 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 debian/mlmmj-php-web-admin.apache.conf create mode 100644 debian/mlmmj-php-web.apache.conf diff --git a/debian/changelog b/debian/changelog index b2ec758..9cc5b0b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,6 +29,8 @@ mlmmj (1.2.16-0.1) unstable; urgency=low they do not contribute any further information. - Include all upstream README files in the binary packages - the MTA specific files have been left out so far. + - Install the web-interfaces to /usr/share/PACKAGE/www - /var/www is for + the user of the local admin only. * debian/patches/: - Added short descriptions to all patches. - Cleaned up patches: Don't use a custom /bin/sh script to execute the @@ -42,8 +44,10 @@ mlmmj (1.2.16-0.1) unstable; urgency=low - Removed. This file is not used. * debian/docs: - Removed. This file is not needed. + * debian/mlmmj-php-web-admin.apache.conf, debian/mlmmj-php-web.apache.conf: + - Added example configurations for the Apache webserver. - -- Sebastian Harl Thu, 05 Mar 2009 12:02:58 +0100 + -- Sebastian Harl Thu, 05 Mar 2009 12:49:54 +0100 mlmmj (1.2.15-1.1) unstable; urgency=low diff --git a/debian/mlmmj-php-web-admin.apache.conf b/debian/mlmmj-php-web-admin.apache.conf new file mode 100644 index 0000000..167a25d --- /dev/null +++ b/debian/mlmmj-php-web-admin.apache.conf @@ -0,0 +1,17 @@ +Alias /mlmmj-admin /usr/share/mlmmj-php-web-admin/www + + + AllowOverride AuthConfig + Order allow,deny + Allow from all + php_value include_path "/usr/share/mlmmj-php-web-admin" + + +# some people prefer a simple URL, like http://mlmmj-admin.example.com +# +# ServerName mlmmj-admin.example.com +# DocumentRoot /usr/share/mlmmj-php-web-admin/www +# +# # add the above directive +# + diff --git a/debian/mlmmj-php-web.apache.conf b/debian/mlmmj-php-web.apache.conf new file mode 100644 index 0000000..5bd75db --- /dev/null +++ b/debian/mlmmj-php-web.apache.conf @@ -0,0 +1,16 @@ +Alias /mlmmj /usr/share/mlmmj-php-web/www + + + AllowOverride AuthConfig + Order allow,deny + Allow from all + + +# some people prefer a simple URL, like http://mlmmj.example.com +# +# ServerName mlmmj.example.com +# DocumentRoot /usr/share/mlmmj-php-web/www +# +# # add the above directive +# + diff --git a/debian/patches/02_fix_mlmmj_php.dpatch b/debian/patches/02_fix_mlmmj_php.dpatch index 5be5804..34f8bb7 100644 --- a/debian/patches/02_fix_mlmmj_php.dpatch +++ b/debian/patches/02_fix_mlmmj_php.dpatch @@ -1,7 +1,8 @@ #! /bin/sh /usr/share/dpatch/dpatch-run ## 02_fix_mlmmj_php.dpatch by Søren Boll Overgaard ## -## DP: Adapt pathes used in the web interface to match the installation paths. +## DP: Adapt pathes and settings used in the web interface to match the +## DP: installation paths. @DPATCH@ @@ -19,14 +20,13 @@ diff a/contrib/web/php-admin/conf/config.php b/contrib/web/php-admin/conf/config diff a/contrib/web/php-admin/htdocs/dot.htaccess b/contrib/web/php-admin/htdocs/dot.htaccess --- a/contrib/web/php-admin/htdocs/dot.htaccess +++ b/contrib/web/php-admin/htdocs/dot.htaccess -@@ -1,4 +1,5 @@ +@@ -1,4 +1,4 @@ Require valid-user AuthType Basic -AuthName "mlmmj web-interface" -AuthUserFile /home/mlmmj/htpasswd +AuthName "mlmmj web-interface on Debian GNU/Linux" +AuthUserFile /etc/mlmmj-php-web-admin/htpasswd -+php_value include_path "/usr/share/mlmmj-php-web-admin" diff a/contrib/web/php-admin/htdocs/edit.php b/contrib/web/php-admin/htdocs/edit.php --- a/contrib/web/php-admin/htdocs/edit.php +++ b/contrib/web/php-admin/htdocs/edit.php diff --git a/debian/rules b/debian/rules index 2ffce8a..7133dcb 100755 --- a/debian/rules +++ b/debian/rules @@ -6,6 +6,9 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +WEB_DIR = debian/mlmmj-php-web/usr/share/mlmmj-php-web/www +WEB_ADMIN_DIR = debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/www + include /usr/share/dpatch/dpatch.make # These are used for cross-compiling and for saving the configure script @@ -75,17 +78,20 @@ install-indep: # mlmmj-php-web install -m 644 -D contrib/web/php-user/mlmmj.php \ - debian/mlmmj-php-web/var/www/mlmmj-php-web/mlmmj.php + $(WEB_DIR)/mlmmj.php install -m 644 -D contrib/web/php-user/README \ debian/mlmmj-php-web/usr/share/doc/mlmmj-php-web/README install -m 644 -D contrib/web/php-user/example.html \ debian/mlmmj-php-web/usr/share/doc/mlmmj-php-web/examples/examples.html + install -m 644 -D debian/mlmmj-php-web.apache.conf \ + debian/mlmmj-php-web/etc/mlmmj-php-web/apache.conf + # mlmmj-php-web-admin - install -d debian/mlmmj-php-web-admin/var/www/mlmmj-php-web-admin + install -m 755 -d $(WEB_ADMIN_DIR) install -m 644 contrib/web/php-admin/htdocs/*.php \ - debian/mlmmj-php-web-admin/var/www/mlmmj-php-web-admin/ + $(WEB_ADMIN_DIR)/ install -m 644 contrib/web/php-admin/htdocs/dot.htaccess \ - debian/mlmmj-php-web-admin/var/www/mlmmj-php-web-admin/.htaccess + $(WEB_ADMIN_DIR)/.htaccess install -m 644 -D contrib/web/php-admin/README \ debian/mlmmj-php-web-admin/usr/share/doc/mlmmj-php-web-admin/README install -d debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/conf @@ -96,6 +102,8 @@ install-indep: debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/templates/ install -m 644 -D debian/htpasswd \ debian/mlmmj-php-web-admin/etc/mlmmj-php-web-admin/htpasswd + install -m 644 -D debian/mlmmj-php-web-admin.apache.conf \ + debian/mlmmj-php-web-admin/etc/mlmmj-php-web-admin/apache.conf binary-common: dh_testdir -- 2.30.2