Code

Install the web-interfaces to /usr/share/PACKAGE/www.
authorSebastian Harl <sh@tokkee.org>
Thu, 5 Mar 2009 11:52:27 +0000 (12:52 +0100)
committerSebastian Harl <sh@tokkee.org>
Thu, 5 Mar 2009 12:01:07 +0000 (13:01 +0100)
/var/www is for the user of the local admin only.

debian/changelog
debian/mlmmj-php-web-admin.apache.conf [new file with mode: 0644]
debian/mlmmj-php-web.apache.conf [new file with mode: 0644]
debian/patches/02_fix_mlmmj_php.dpatch
debian/rules

index b2ec758c020dd10e114ab91c94390c069a928c9b..9cc5b0b1eda3e1df9ea24311bf65f9a097385a37 100644 (file)
@@ -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.
       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
   * 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.
     - 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 <sh@tokkee.org>  Thu, 05 Mar 2009 12:02:58 +0100
+ -- Sebastian Harl <sh@tokkee.org>  Thu, 05 Mar 2009 12:49:54 +0100
 
 mlmmj (1.2.15-1.1) unstable; urgency=low
 
 
 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 (file)
index 0000000..167a25d
--- /dev/null
@@ -0,0 +1,17 @@
+Alias /mlmmj-admin /usr/share/mlmmj-php-web-admin/www
+
+<Directory /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"
+</Directory>
+
+# some people prefer a simple URL, like http://mlmmj-admin.example.com
+#<VirtualHost 1.2.3.4>
+#      ServerName mlmmj-admin.example.com
+#      DocumentRoot /usr/share/mlmmj-php-web-admin/www
+#
+#      # add the above <Directory> directive
+#</VirtualHost>
+
diff --git a/debian/mlmmj-php-web.apache.conf b/debian/mlmmj-php-web.apache.conf
new file mode 100644 (file)
index 0000000..5bd75db
--- /dev/null
@@ -0,0 +1,16 @@
+Alias /mlmmj /usr/share/mlmmj-php-web/www
+
+<Directory /usr/share/mlmmj-php-web/www>
+       AllowOverride AuthConfig
+       Order allow,deny
+       Allow from all
+</Directory>
+
+# some people prefer a simple URL, like http://mlmmj.example.com
+#<VirtualHost 1.2.3.4>
+#      ServerName mlmmj.example.com
+#      DocumentRoot /usr/share/mlmmj-php-web/www
+#
+#      # add the above <Directory> directive
+#</VirtualHost>
+
index 5be580403ca5780c5f149ac83adada6b750b951e..34f8bb759ac72b9a3c93fd1a80b89c82c86f61d5 100644 (file)
@@ -1,7 +1,8 @@
 #! /bin/sh /usr/share/dpatch/dpatch-run
 ## 02_fix_mlmmj_php.dpatch by Søren Boll Overgaard <boll@tristram.fork.dk>
 ##
 #! /bin/sh /usr/share/dpatch/dpatch-run
 ## 02_fix_mlmmj_php.dpatch by Søren Boll Overgaard <boll@tristram.fork.dk>
 ##
-## 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@
 
 
 @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
 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
  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 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
index 2ffce8a6d0c5c3c5e5ae96a9da882b1144b06114..7133dcbaf5be1e7fd2a8788eb732c7ea22bb704c 100755 (executable)
@@ -6,6 +6,9 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
 # 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
 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 \
 
        # 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 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
        # 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 \
        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 \
        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
        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
                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
 
 binary-common:
        dh_testdir