* 'install.sh'
- Also install docs
* 'VirtualMailManager/Account.py'
* 'VirtualMailManager/Alias.py'
* 'VirtualMailManager/Config.py'
* 'VirtualMailManager/Domain.py'
* 'VirtualMailManager/Exceptions.py'
* 'VirtualMailManager/VirtualMailManager.py'
* 'setup.py'
* 'vmm'
- Included global version number.
* 'VirtualMailManager/constants/VERSION.py'
- Added to repository.
--- a/ChangeLog Wed Jan 09 14:47:30 2008 +0000
+++ b/ChangeLog Wed Jan 09 20:34:31 2008 +0000
@@ -1,6 +1,21 @@
=== 0.0.0 ===
2008-01-09 Pascal Volk <neverseen@users.sourceforge.net>
+ * install.sh: Also install docs
+
+ * VirtualMailManager/Account.py:
+ * VirtualMailManager/Alias.py:
+ * VirtualMailManager/Config.py:
+ * VirtualMailManager/Domain.py:
+ * VirtualMailManager/Exceptions.py:
+ * VirtualMailManager/VirtualMailManager.py:
+ * setup.py:
+ * vmm: Included global version number.
+
+ * VirtualMailManager/constants/VERSION.py: Added to repository.
+
+2008-01-09 Pascal Volk <neverseen@users.sourceforge.net>
+
* VirtualMailManager/Account.py:
* VirtualMailManager/Alias.py:
* VirtualMailManager/Domain.py:
--- a/VirtualMailManager/Account.py Wed Jan 09 14:47:30 2008 +0000
+++ b/VirtualMailManager/Account.py Wed Jan 09 20:34:31 2008 +0000
@@ -6,8 +6,11 @@
"""Virtual Mail Manager's Account class to manage e-mail accounts."""
+from constants.VERSION import VERSION
+
__author__ = 'Pascal Volk <p.volk@veb-it.de>'
-__version__ = 'rev '+'$Rev$'.split()[1]
+__version__ = VERSION
+__revision__ = 'rev '+'$Rev$'.split()[1]
__date__ = '$Date$'.split()[1]
from Exceptions import VMMAccountException
--- a/VirtualMailManager/Alias.py Wed Jan 09 14:47:30 2008 +0000
+++ b/VirtualMailManager/Alias.py Wed Jan 09 20:34:31 2008 +0000
@@ -6,8 +6,11 @@
"""Virtual Mail Manager's Alias class to manage e-mail aliases."""
+from constants.VERSION import VERSION
+
__author__ = 'Pascal Volk <p.volk@veb-it.de>'
-__version__ = 'rev '+'$Rev$'.split()[1]
+__version__ = VERSION
+__revision__ = 'rev '+'$Rev$'.split()[1]
__date__ = '$Date$'.split()[1]
from Exceptions import VMMAliasException
--- a/VirtualMailManager/Config.py Wed Jan 09 14:47:30 2008 +0000
+++ b/VirtualMailManager/Config.py Wed Jan 09 20:34:31 2008 +0000
@@ -9,8 +9,11 @@
"""
+from constants.VERSION import VERSION
+
__author__ = 'Pascal Volk <p.volk@veb-it.de>'
-__version__ = 'rev '+'$Rev$'.split()[1]
+__version__ = VERSION
+__revision__ = 'rev '+'$Rev$'.split()[1]
__date__ = '$Date$'.split()[1]
import sys
--- a/VirtualMailManager/Domain.py Wed Jan 09 14:47:30 2008 +0000
+++ b/VirtualMailManager/Domain.py Wed Jan 09 20:34:31 2008 +0000
@@ -6,8 +6,11 @@
"""Virtual Mail Manager's Domain class to manage e-mail domains."""
+from constants.VERSION import VERSION
+
__author__ = 'Pascal Volk <p.volk@veb-it.de>'
-__version__ = 'rev '+'$Rev$'.split()[1]
+__version__ = VERSION
+__revision__ = 'rev '+'$Rev$'.split()[1]
__date__ = '$Date$'.split()[1]
from random import choice
--- a/VirtualMailManager/Exceptions.py Wed Jan 09 14:47:30 2008 +0000
+++ b/VirtualMailManager/Exceptions.py Wed Jan 09 20:34:31 2008 +0000
@@ -6,8 +6,11 @@
"""Exception classes for Virtual Mail Manager"""
+from constants.VERSION import VERSION
+
__author__ = 'Pascal Volk <p.volk@veb-it.de>'
-__version__ = 'rev '+'$Rev$'.split()[1]
+__version__ = VERSION
+__revision__ = 'rev '+'$Rev$'.split()[1]
__date__ = '$Date$'.split()[1]
class VMMException(Exception):
--- a/VirtualMailManager/VirtualMailManager.py Wed Jan 09 14:47:30 2008 +0000
+++ b/VirtualMailManager/VirtualMailManager.py Wed Jan 09 20:34:31 2008 +0000
@@ -6,8 +6,11 @@
"""The main class for vmm."""
+from constants.VERSION import VERSION
+
__author__ = 'Pascal Volk <p.volk@veb-it.de>'
-__version__ = 'rev '+'$Rev$'.split()[1]
+__version__ = VERSION
+__revision__ = 'rev '+'$Rev$'.split()[1]
__date__ = '$Date$'.split()[1]
import os
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/VirtualMailManager/constants/VERSION.py Wed Jan 09 20:34:31 2008 +0000
@@ -0,0 +1,7 @@
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+# opyright 2007-2008 VEB IT
+# See COPYING for distribution information.
+# $Id$
+
+VERSION = '0.3.1'
--- a/install.sh Wed Jan 09 14:47:30 2008 +0000
+++ b/install.sh Wed Jan 09 20:34:31 2008 +0000
@@ -1,15 +1,17 @@
#!/bin/bash
# $Id$
#
-# Installation script for the vmm
+# Installation script for the Virtual Mail Manager
# run: ./install.sh
LANG=C
-PATH=/usr/sbin:/usr/bin
+PATH=/bin:/usr/sbin:/usr/bin
INSTALL_OPTS="-g 0 -o 0 -p -v"
PREFIX=/usr/local
PF_CONFDIR=$(postconf -h config_directory)
PF_GID=$(id -g postfix)
+DOC_DIR=${PREFIX}/share/doc/vmm
+DOCS="ChangeLog COPYING INSTALL README"
if [ $(id -u) -ne 0 ]; then
echo "Run this script as root."
@@ -21,7 +23,16 @@
install -b -m 0600 ${INSTALL_OPTS} vmm.cfg ${PREFIX}/etc/
install -b -m 0640 -g ${PF_GID} -o 0 -p -v pgsql-*.cf ${PF_CONFDIR}/
-install -m 0700 ${INSTALL_OPTS} vmm ${PREFIX}/sbin/
+install -m 0700 ${INSTALL_OPTS} vmm ${PREFIX}/sbin
+
+[ -d ${DOC_DIR} ] || mkdir -m 0755 -p ${DOC_DIR}
+for DOC in ${DOCS}; do
+ install -m 0644 ${INSTALL_OPTS} ${DOC} ${DOC_DIR}
+done
+
+[ -d ${DOC_DIR}/examples ] || mkdir -m 0755 -p ${DOC_DIR}/examples
+install -m 0644 ${INSTALL_OPTS} pgsql-*.cf ${DOC_DIR}/examples
+install -m 0644 ${INSTALL_OPTS} vmm.cfg ${DOC_DIR}/examples
echo
echo "Don't forget to edit ${PREFIX}/etc/vmm.cfg"
--- a/setup.py Wed Jan 09 14:47:30 2008 +0000
+++ b/setup.py Wed Jan 09 20:34:31 2008 +0000
@@ -7,7 +7,7 @@
import os
from distutils.core import setup
-VERSION = '0.3.1'
+from VirtualMailManager.constants.VERSION import VERSION
long_description = """
Virtual Mail Manager is a command line tool for administrators/postmasters to
@@ -15,8 +15,6 @@
with a PostgreSQL backend.
"""
-libdir = '/usr/local/lib'
-
# remove existing MANIFEST
if os.path.exists('MANIFEST'):
os.remove('MANIFEST')
--- a/vmm Wed Jan 09 14:47:30 2008 +0000
+++ b/vmm Wed Jan 09 20:34:31 2008 +0000
@@ -6,8 +6,11 @@
"""This is the vmm main script."""
+from VirtualMailManager.constants.VERSION import VERSION
+
__author__ = 'Pascal Volk <p.volk@veb-it.de>'
-__version__ = 'rev '+'$Rev$'.split()[1]
+__version__ = VERSION
+__revision__ = 'rev '+'$Rev$'.split()[1]
__date__ = '$Date$'.split()[1]
import os
@@ -19,9 +22,11 @@
import VirtualMailManager.Exceptions as VMME
import VirtualMailManager.constants.EXIT as EXIT
+__prog__ = os.path.basename(sys.argv[0])
+
def usage(excode=0, errMsg=None):
sys.stderr.write("""\
-Usage: vmm OPTION OBJECT ARGS*
+Usage: %s OPTION OBJECT ARGS*
short long
option object args (* = optional)
@@ -43,7 +48,7 @@
h help
v version
-""")
+""") % __prog__
if not errMsg is None:
sys.stderr.write('Error: %s\n' % errMsg)
sys.exit(excode)
@@ -285,8 +290,8 @@
elif sys.argv[1] in ['h', 'help']:
usage()
elif sys.argv[1] in ['v', 'version']:
- print "%s: %s (Date: %s)\n" % (os.path.basename(sys.argv[0]),
- __version__, __date__)
+ print "%s, version %s (%s from %s)\n" % (__prog__, __version__,
+ __revision__, __date__)
else:
usage(EXIT.UNKNOWN_OPTION, 'Unknown option: »%s«' % sys.argv[1])
showWarnings()