diff --git a/debian/cc-server.manpages b/debian/cc-server.manpages new file mode 100644 index 0000000000000000000000000000000000000000..b73fc8cfa13f6bbd0db928202108493fe12717c8 --- /dev/null +++ b/debian/cc-server.manpages @@ -0,0 +1,2 @@ +cc-server.1 +cc-addaccount.1 diff --git a/doc/cc-addaccount.rst b/doc/cc-addaccount.rst new file mode 100644 index 0000000000000000000000000000000000000000..915701dfc922accbd36d2337714d3870e9ed6a4e --- /dev/null +++ b/doc/cc-addaccount.rst @@ -0,0 +1,42 @@ +=============== + cc-addaccount +=============== + +---------------------------------------------------- +A tool to create account on your cc-server directory +---------------------------------------------------- + +:Author: Antoine Millet +:Manual section: 1 + +SYNOPSIS +======== + +cc-addaccount [options] + +DESCRIPTION +=========== + +CloudControl is a tool designed to facilitate administration of a wide set of +virtualised or not machines. This binary allow to create account on cc-server +account directory, even if cc-server is not started. + +By default, the cc-server account directory is defined as +``/var/lib/cc-server`` (it's also the default for cc-server), but if you +changed it, you can use the ``--directory`` option. + +OPTIONS +======= + +-h, --help show this help message and exit +-d DIRECTORY, --directory=DIRECTORY + account directory +-p, --password ask for the password +-g, --god add a rule to allow all actions +-c COPY, --copy=COPY copy this already existing account +-r ROLE, --role=ROLE specify the role (default cli) + +SEE ALSO +======== + +* Manual of cc-server ``man 1 cc-server`` diff --git a/doc/cc-server.rst b/doc/cc-server.rst new file mode 100644 index 0000000000000000000000000000000000000000..888575e59f22cafc1ccac8a63ae842b2517a0f3d --- /dev/null +++ b/doc/cc-server.rst @@ -0,0 +1,36 @@ +=========== + cc-server +=========== + +------------------------------------------------ +Launch the CloudControl server on your computer. +------------------------------------------------ + +:Author: Antoine Millet +:Manual section: 1 + +SYNOPSIS +======== + +cc-server [options] + +DESCRIPTION +=========== + +CloudControl is a tool designed to facilitate administration of a wide set of +virtualised or not machines. This binary allow to launch the central server of +this system. + +OPTIONS +======= + +--version show program's version number and exit +-h, --help show this help message and exit +-c CONFIG, --config=CONFIG configuration file (default: /etc/cc-server.conf) +-d, --daemonize run as daemon and write pid file +-p PID_FILE, --pid-file=PID_FILE pid file (default: /var/run/cc-server.pid) + +SEE ALSO +======== + +* Manual of cc-addaccount: ``man 1 cc-addaccount`` diff --git a/setup.py b/setup.py index e7d26a9f6740ed34082852bac6580e1f3d385929..dac44b4ce59dff5c095bb83318bd2b38a9bb1a31 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ from setuptools import setup +from distutils.command.build import build import os import sys @@ -7,6 +8,29 @@ from ccserver import __version__ ldesc = open(os.path.join(os.path.dirname(__file__), 'README')).read() +class BuildMan(build): + + ''' + Build command class used by distutil to generate manpages from RST sources + while packaging. + ''' + + MANPAGES = ('cc-server', 'cc-addaccount') + description = 'Build manual from RSt source' + + def run(self): + from docutils.core import publish_file + from docutils.writers import manpage + + for man in self.MANPAGES: + publish_file(source_path='doc/%s.rst' % man, + destination_path='%s.1' % man, + writer=manpage.Writer()) + +build.sub_commands.insert(0, ('build_man', None)) + +cmdclass = {'build_man': BuildMan} + setup( name='cc-server', version=__version__, @@ -24,4 +48,5 @@ setup( 'Operating System :: Unix', 'Programming Language :: Python', ], + cmdclass=cmdclass )