diff options
author | David Rousselie <dax@happycoders.org> | 2007-11-13 21:11:37 +0300 |
---|---|---|
committer | David Rousselie <dax@happycoders.org> | 2007-11-13 21:11:37 +0300 |
commit | 893aac6eaa93d9c2a3bf3ba56f802378273543d1 (patch) | |
tree | 73f01a9fb383aa5f406c06c25f6e76ac647f2cae | |
parent | e9a3c54b4fe5491056667aaa4f7aaeb2b238864a (diff) |
Update debian package configuration
darcs-hash:20071113181137-86b55-80a8c5c5bce363657e947a7e3777a2edd4135cc6.gz
-rw-r--r-- | debian/README.Debian | 49 | ||||
-rw-r--r-- | debian/conffiles | 2 | ||||
-rw-r--r-- | debian/control | 18 | ||||
-rw-r--r-- | debian/copyright | 2 | ||||
-rw-r--r-- | debian/dirs | 2 | ||||
-rwxr-xr-x | debian/init.d | 202 | ||||
-rw-r--r-- | debian/jmc.conf | 22 | ||||
-rwxr-xr-x | debian/jmc.sh | 3 | ||||
-rwxr-xr-x | debian/postinst | 3 | ||||
-rwxr-xr-x | debian/postrm | 38 | ||||
-rwxr-xr-x | debian/preinst | 38 | ||||
-rwxr-xr-x | debian/prerm | 38 | ||||
-rwxr-xr-x | debian/rules | 118 | ||||
-rw-r--r-- | src/jmc.egg-info/PKG-INFO | 11 | ||||
-rw-r--r-- | src/jmc.egg-info/SOURCES.txt | 19 | ||||
-rw-r--r-- | src/jmc.egg-info/dependency_links.txt | 1 | ||||
-rw-r--r-- | src/jmc.egg-info/entry_points.txt | 3 | ||||
-rw-r--r-- | src/jmc.egg-info/top_level.txt | 1 |
18 files changed, 176 insertions, 394 deletions
diff --git a/debian/README.Debian b/debian/README.Debian deleted file mode 100644 index c4ec33d..0000000 --- a/debian/README.Debian +++ /dev/null @@ -1,49 +0,0 @@ -jmc for Debian --------------- -- edit /etc/jabber/jmc.xml to match jabber server configuration : - - for jabberd2, port must match router.xml port - - for ejabberd, add new listening port : - {5347, ejabberd_service, [{access, all}, - {host, "jmc.localhost", - [{password, "secret"}]}]} - -- then run: -# /etc/init.d/jmc start - -Usage: - -- Now you can register new mail server connection with your favorite -jabber client. -- all connection are then listed under your service browser and you -can edit mail server parameters by registering on listed connection. - -Feedback: - -Send me feedback and comments to dax at happycoders dot org - -Utils: -- jmc_converter convert from one storage type to another. - -$ jmc_converter - --> give you the list of supported types. - -Example of usage : - -$ jmc_converter \ - DBM \ - registered.db \ - SQLite \ - registered.sqlite - --> converts a DBM file (registered.db) to a SQLite file -(registered.sqlite). Once converted, the new file copied in -${spool_dir}/${service}/registered.db where ${spool_dir} and -${service} are defined in jmc.xml configuration file. - -- jmc_dump dump a db file. example : - -$ jmc_dump DBM registered.db - - - -- David Rousselie <dax@happycoders.org>, Wed, 26 Jul 2006 22:04:38 +0200 diff --git a/debian/conffiles b/debian/conffiles deleted file mode 100644 index e046b6b..0000000 --- a/debian/conffiles +++ /dev/null @@ -1,2 +0,0 @@ -/etc/default/jmc -/etc/jabber/jmc.conf diff --git a/debian/control b/debian/control index 3af3750..51573f0 100644 --- a/debian/control +++ b/debian/control @@ -2,12 +2,18 @@ Source: jmc Section: python Priority: optional Maintainer: David Rousselie <dax@happycoders.org> -Build-Depends: debhelper (>= 4.1.0) -Standards-Version: 3.6.2 +Build-Depends: python-setuptools (>= 0.6b3-1), python-all-dev (>= 2.3.5-11), debhelper (>= 5.0.38), python-central (>= 0.5.6) +Standards-Version: 3.7.2 +XS-Python-Version: all -Package: jmc +Package: python-jmc Architecture: all -Depends: ${python:Depends}, python-pyxmpp (>= 0.5) -Recommends: python2.4-pysqlite2 (>= 2.0) +Depends: ${python:Depends}, python-jcl (>= 0.1) +Recommends: +Suggests: +XB-Python-Version: ${python:Versions} +Provides: ${python:Provides} Description: JMC is an email gateway for Jabber - JMC is a jabber service to check email from POP3 and IMAP4 server and retrieve them or just a notification of new emails. Jabber users can register multiple email accounts. + JMC is a jabber service to check email from POP3 and IMAP4 server and + retrieve them or just a notification of new emails. Jabber users can + register multiple email accounts. diff --git a/debian/copyright b/debian/copyright index 91ba0ce..cf9ab62 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,7 +1,7 @@ This package was debianized by David Rousselie <dax@happycoders.org> on Wed, 26 Jul 2006 22:04:38 +0200. -It was downloaded from http://people.happycoders.org/dax/jabber/jmc.html +It was downloaded from http://people.happycoders.org/dax/projects/jmc Copyright Holder: David Rousselie <dax@happycoders.org> diff --git a/debian/dirs b/debian/dirs index 872d7bc..be1f71d 100644 --- a/debian/dirs +++ b/debian/dirs @@ -1,7 +1,5 @@ var/run/jabber var/log/jabber var/spool/jabber -etc/default etc/jabber -usr/share/jmc usr/bin diff --git a/debian/init.d b/debian/init.d index e25fdb3..ad2a352 100755 --- a/debian/init.d +++ b/debian/init.d @@ -1,147 +1,81 @@ -#! /bin/bash -e - -export PATH=/sbin:/bin:/usr/sbin:/usr/bin - -# ----- load init-functions if they exist ----- - -if [ -f /lib/lsb/init-functions ]; then - . /etc/lsb-release - . /lib/lsb/init-functions -fi - -# ----- Functions for printing messages (Works for debian and looks good in ubuntu too) - -log_start() -{ - case $DISTRIB_ID.$DISTRIB_RELEASE in - Ubuntu.[0-4].*|Ubuntu.5.[0-9]|Ubuntu.5.10) - log_begin_msg $1 - ;; - Ubuntu.*.*) - log_daemon_msg $1 - ;; - *) - echo -n $1 - ;; - esac -} - -log_end() -{ - case $DISTRIB_ID.$DISTRIB_RELEASE in - Ubuntu.*.*) - log_end_msg $1 - ;; - *) - if [ "$1" = "0" ]; then - echo "Started" - else - echo "Error starting daemon, check the logs." - fi - ;; - esac -} - -log_failure() -{ - case $DISTRIB_ID.$DISTRIB_RELEASE in - Ubuntu.*.*) - log_failure_msg $1 - ;; - *) - echo $1 - ;; - esac -} - -# ----- set required environment ----- - -TRANS_NAME=jmc -TRANS_DESC="Jabber Mail Component" -TRANS_HOME=/usr/share/$TRANS_NAME -TRANS_CONFIG=/etc/jabber/$TRANS_NAME.conf -TRANS_USER=jabber -TRANS_GROUP=daemon -TRANS_PID=`grep "<pidfile>.*</pidfile>" $TRANS_CONFIG | sed 's:.*<pidfile>\(.*\)</pidfile>.*:\1:'` -TRANS_DAEMON=/usr/bin/jmc -TRANS_START="--chuid $TRANS_USER:$TRANS_GROUP --chdir $TRANS_HOME --pidfile $TRANS_PID" -TRANS_STOP="--pidfile $TRANS_PID" -TRANS_OPTIONS="-c $TRANS_CONFIG" -TRANSPORT_DEFAULTS_FILE=/etc/default/$TRANS_NAME - -# ----- Check if transport is enabled ----- - -if [ -s $TRANSPORT_DEFAULTS_FILE ]; then - . $TRANSPORT_DEFAULTS_FILE - case "x$ENABLE" in - xtrue) ;; - xfalse) - exit 0 - ;; - *) - log_failure "Value of ENABLE in $TRANSPORT_DEFAULTS_FILE must be either 'true' or 'false';" - log_failure "not starting $TRANS_NAME daemon." - exit 0 - ;; - esac -else - log_failure "$TRANSPORT_DEFAULTS_FILE not found. Not starting $TRANS_NAME daemon." - exit 1 +#! /bin/sh +# +# skeleton example file to build /etc/init.d/ scripts. +# This file should be used to construct scripts for /etc/init.d. +# +# Written by Miquel van Smoorenburg <miquels@cistron.nl>. +# Modified for Debian +# by Ian Murdock <imurdock@gnu.ai.mit.edu>. +# +# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl +# + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/jmc +NAME=jmc +DESC=jmc + +test -x $DAEMON || exit 0 + +# Include jmc defaults if available +if [ -f /etc/default/jmc ] ; then + . /etc/default/jmc fi -# ----- do the action ----- +set -e case "$1" in -config) - echo "Configuration:" - echo " TRANS_NAME=$TRANS_NAME" - echo " TRANS_DESC=$TRANS_DESC" - echo " TRANS_HOME=$TRANS_HOME" - echo " TRANS_CONFIG=$TRANS_CONFIG" - echo " TRANS_USER=$TRANS_USER" - echo " TRANS_PID=$TRANS_PID" - echo " TRANS_DAEMON=$TRANS_DAEMON" - echo " TRANS_OPTIONS=$TRANS_OPTIONS" + start) + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." ;; - -console) - $TRANS_DAEMON $TRANS_OPTIONS + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON + echo "$NAME." ;; - -start) - log_start "Starting $TRANS_DESC: " - if start-stop-daemon $TRANS_START --start --oknodo --exec $TRANS_DAEMON -- $TRANS_OPTIONS $DAEMON_OPTS >/dev/null 2>&1; then - log_end 0 - else - log_end 1 - fi - ;; -stop) - log_start "Stopping $TRANS_DESC: " - if start-stop-daemon --stop $TRANS_STOP --retry 10 --oknodo 2>&1; then - log_end 0 - else - log_end 1 - fi + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # echo "Reloading $DESC configuration files." + # start-stop-daemon --stop --signal 1 --quiet --pidfile \ + # /var/run/$NAME.pid --exec $DAEMON + #;; + force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart" except that it does nothing if the + # daemon isn't already running. + # check wether $DAEMON is running. If so, restart + start-stop-daemon --stop --test --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON \ + && $0 restart \ + || exit 0 ;; -reload|force-reload) - log_start "Reloading $TRANS_DESC: " - if start-stop-daemon --stop $TRANS_STOP --signal HUP >/dev/null 2>&1; then - log_end 0 - else - log_end 1 - fi + restart) + echo -n "Restarting $DESC: " + start-stop-daemon --stop --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON + sleep 1 + start-stop-daemon --start --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." ;; -restart) - $0 stop - sleep 5 - $0 start - ;; -*) - echo "Usage: /etc/init.d/$TRANS_NAME {config|console|start|stop|restart|reload|force-reload}" >&2 + *) + N=/etc/init.d/$NAME + # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0 - diff --git a/debian/jmc.conf b/debian/jmc.conf deleted file mode 100644 index 696adce..0000000 --- a/debian/jmc.conf +++ /dev/null @@ -1,22 +0,0 @@ -<config> - <jabber> - <server>127.0.0.1</server> - <port>5347</port> - <secret>secret</secret> - <service>jmc.localhost</service> - <connectsleep>5</connectsleep> - <!-- check jmc/utils/lang.py for available languages --> - <language>en</language> - <vCard> - <FN>Jabber Mail Component</FN> - <DESC>A Jabber mail server component</DESC> - <URL>http://people.happycoders.org/dax/jabber/jmc/</URL> - </vCard> - </jabber> - <storage>DBM</storage> - <spooldir>/var/spool/jabber</spooldir> - <pidfile>/var/run/jabber/jmc.pid</pidfile> - <!-- default check interval in minutes --> - <check_interval>5</check_interval> - <mail_default_encoding>iso-8859-1</mail_default_encoding> -</config> diff --git a/debian/jmc.sh b/debian/jmc.sh deleted file mode 100755 index d2b64a0..0000000 --- a/debian/jmc.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -python /usr/share/jmc/jmc.py $* & - diff --git a/debian/postinst b/debian/postinst index 10c4f62..5730b65 100755 --- a/debian/postinst +++ b/debian/postinst @@ -1,5 +1,5 @@ #! /bin/sh -# postinst script for jabber-pyaim +# postinst script for jmc # # see: dh_installdeb(1) @@ -25,7 +25,6 @@ case "$1" in # the sanit(ar)y checks otherwise we can safely create it. if [ "$uid" ]; then - # guess??? the checks!!! if [ $uid -ge 100 ] && [ $uid -le 999 ]; then echo "jabber uid check: ok" else diff --git a/debian/postrm b/debian/postrm deleted file mode 100755 index 010466a..0000000 --- a/debian/postrm +++ /dev/null @@ -1,38 +0,0 @@ -#! /bin/sh -# postrm script for jabber-pyaim -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * <postrm> `remove' -# * <postrm> `purge' -# * <old-postrm> `upgrade' <new-version> -# * <new-postrm> `failed-upgrade' <old-version> -# * <new-postrm> `abort-install' -# * <new-postrm> `abort-install' <old-version> -# * <new-postrm> `abort-upgrade' <old-version> -# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version> -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - - - ;; - - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 1 - -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/preinst b/debian/preinst deleted file mode 100755 index 6b18bff..0000000 --- a/debian/preinst +++ /dev/null @@ -1,38 +0,0 @@ -#! /bin/sh -# preinst script for jabber-pyaim -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * <new-preinst> `install' -# * <new-preinst> `install' <old-version> -# * <new-preinst> `upgrade' <old-version> -# * <old-preinst> `abort-upgrade' <new-version> -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - install|upgrade) - ;; - - abort-upgrade) - ;; - - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/debian/prerm b/debian/prerm deleted file mode 100755 index 405058d..0000000 --- a/debian/prerm +++ /dev/null @@ -1,38 +0,0 @@ -#! /bin/sh -# prerm script for jabber-pyaim -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * <prerm> `remove' -# * <old-prerm> `upgrade' <new-version> -# * <new-prerm> `failed-upgrade' <old-version> -# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version> -# * <deconfigured's-prerm> `deconfigure' `in-favour' -# <package-being-installed> <version> `removing' -# <conflicting-package> <version> -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - remove|upgrade|deconfigure) - ;; - failed-upgrade) - ;; - *) - echo "prerm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/debian/rules b/debian/rules index 8a0d1fe..622722b 100755 --- a/debian/rules +++ b/debian/rules @@ -1,76 +1,76 @@ #!/usr/bin/make -f -# jmc debian/rules file -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 -configure: configure-stamp -configure-stamp: - dh_testdir - touch configure-stamp +# This file was automatically generated by stdeb 0.2.a1 at +# Tue, 13 Nov 2007 19:00:04 +0100 -build: build-stamp +PACKAGE_NAME=python-jmc +MODULE_NAME=jmc +DEB_UPSTREAM_VERSION=0.3 -build-stamp: configure-stamp - dh_testdir - touch build-stamp +PYVERS=$(shell pyversions -vr) +build: build-stamp +build-stamp: $(PYVERS:%=build-python%) + touch $@ +build-python%: +# Force setuptools, but reset sys.argv[0] to 'setup.py' because setup.py files expect that. + python$* -c "import setuptools,sys;f='setup.py';sys.argv[0]=f;execfile(f,{'__file__':f,'__name__':'__main__'})" build + touch $@ clean: dh_testdir dh_testroot - rm -f build-stamp configure-stamp + rm -f *-stamp + rm -rf dist build + -find -name '*.py[co]' | xargs rm -f +# find . -name *.pyc -exec rm {} \; + dh_clean - # Clean up package tree - rm -f -R $(CURDIR)/debian/jmc - - dh_clean - -install: build +install: build install-prereq $(PYVERS:%=install-python%) +install-prereq: dh_testdir dh_testroot - dh_clean -k - dh_installdirs + dh_clean -k - # Create directory tree for package - - cp -R $(CURDIR)/debian/jmc.conf $(CURDIR)/debian/jmc/etc/jabber/jmc.conf - cp -R $(CURDIR)/debian/jmc-default $(CURDIR)/debian/jmc/etc/default/jmc - cp -R $(CURDIR)/debian/jmc.sh $(CURDIR)/debian/jmc/usr/bin/jmc - cp -R $(CURDIR)/src/* $(CURDIR)/debian/jmc/usr/share/jmc +install-python%: +# Force setuptools, but reset sys.argv[0] to 'setup.py' because setup.py files expect that. + python$* -c "import setuptools,sys;f='setup.py';sys.argv[0]=f;execfile(f,{'__file__':f,'__name__':'__main__'})" install --no-compile --single-version-externally-managed --root $(CURDIR)/debian/${PACKAGE_NAME} + mv debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages/${MODULE_NAME}-${DEB_UPSTREAM_VERSION}-py$*.egg-info debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages/${MODULE_NAME}.egg-info -# Build architecture-independent files here. +binary-arch: + binary-indep: build install - dh_testdir - dh_testroot - dh_installchangelogs - dh_installdocs -# dh_installexamples - dh_install -# dh_installmenu -# dh_installdebconf - dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime - dh_installinit -# dh_installcron -# dh_installinfo -# dh_installman - dh_link -# dh_strip -# dh_compress - dh_fixperms -# dh_perl - dh_python /usr/share/jmc -# dh_makeshlibs - dh_installdeb -# dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -# Build architecture-dependent files here. -binary-arch: build install -# We have nothing to do by default. + dh_testdir -i + dh_testroot -i + dh_pycentral -i + dh_installdocs -i + dh_installdirs -i + dh_installexamples -i + dh_strip -i + dh_compress -i -X.py + dh_fixperms -i + : # Replace all '#!' calls to python with $(PYTHON) + : # and make them executable + for i in \ + `find debian/python-jmc/usr/bin -type f` \ + `find debian/python-jmc/usr/lib -type f`; \ + do \ + case "$$i" in *-[0-9].[0-9]) continue; esac; \ + sed '1s,#!.*python[^ ]*\(.*\),#! /usr/bin/python\1,' \ + $$i > $$i.temp; \ + if cmp --quiet $$i $$i.temp; then \ + rm -f $$i.temp; \ + else \ + mv -f $$i.temp $$i; \ + chmod 755 $$i; \ + echo "fixed interpreter: $$i"; \ + fi; \ + done + dh_installdeb -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i binary: binary-indep binary-arch + + .PHONY: build clean binary-indep binary-arch binary install configure diff --git a/src/jmc.egg-info/PKG-INFO b/src/jmc.egg-info/PKG-INFO new file mode 100644 index 0000000..470823f --- /dev/null +++ b/src/jmc.egg-info/PKG-INFO @@ -0,0 +1,11 @@ +Metadata-Version: 1.0 +Name: jmc +Version: 0.3 +Summary: Jabber Mail Component +Home-page: http://people.happycoders.org/dax/projects/jmc +Author: David Rousselie +Author-email: dax@happycoders.org +License: GPL +Description: UNKNOWN +Keywords: jabber component email IMAP POP3 SMTP +Platform: UNKNOWN diff --git a/src/jmc.egg-info/SOURCES.txt b/src/jmc.egg-info/SOURCES.txt new file mode 100644 index 0000000..cdecaef --- /dev/null +++ b/src/jmc.egg-info/SOURCES.txt @@ -0,0 +1,19 @@ +README +setup.py +src/jmc/__init__.py +src/jmc/config.py +src/jmc/lang.py +src/jmc/runner.py +src/jmc.egg-info/PKG-INFO +src/jmc.egg-info/SOURCES.txt +src/jmc.egg-info/dependency_links.txt +src/jmc.egg-info/entry_points.txt +src/jmc.egg-info/top_level.txt +src/jmc/jabber/__init__.py +src/jmc/jabber/command.py +src/jmc/jabber/component.py +src/jmc/jabber/disco.py +src/jmc/jabber/message.py +src/jmc/jabber/presence.py +src/jmc/model/__init__.py +src/jmc/model/account.py diff --git a/src/jmc.egg-info/dependency_links.txt b/src/jmc.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/jmc.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/src/jmc.egg-info/entry_points.txt b/src/jmc.egg-info/entry_points.txt new file mode 100644 index 0000000..ae1211e --- /dev/null +++ b/src/jmc.egg-info/entry_points.txt @@ -0,0 +1,3 @@ +[console_scripts] +jmc = jmc.runner:main + diff --git a/src/jmc.egg-info/top_level.txt b/src/jmc.egg-info/top_level.txt new file mode 100644 index 0000000..422fd41 --- /dev/null +++ b/src/jmc.egg-info/top_level.txt @@ -0,0 +1 @@ +jmc |