Update debian package configuration

darcs-hash:20071113181137-86b55-80a8c5c5bce363657e947a7e3777a2edd4135cc6.gz
This commit is contained in:
David Rousselie
2007-11-13 19:11:37 +01:00
parent e9a3c54b4f
commit 893aac6eaa
18 changed files with 174 additions and 392 deletions

49
debian/README.Debian vendored
View File

@@ -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

2
debian/conffiles vendored
View File

@@ -1,2 +0,0 @@
/etc/default/jmc
/etc/jabber/jmc.conf

18
debian/control vendored
View File

@@ -2,12 +2,18 @@ Source: jmc
Section: python Section: python
Priority: optional Priority: optional
Maintainer: David Rousselie <dax@happycoders.org> Maintainer: David Rousselie <dax@happycoders.org>
Build-Depends: debhelper (>= 4.1.0) 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.6.2 Standards-Version: 3.7.2
XS-Python-Version: all
Package: jmc Package: python-jmc
Architecture: all Architecture: all
Depends: ${python:Depends}, python-pyxmpp (>= 0.5) Depends: ${python:Depends}, python-jcl (>= 0.1)
Recommends: python2.4-pysqlite2 (>= 2.0) Recommends:
Suggests:
XB-Python-Version: ${python:Versions}
Provides: ${python:Provides}
Description: JMC is an email gateway for Jabber 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.

2
debian/copyright vendored
View File

@@ -1,7 +1,7 @@
This package was debianized by David Rousselie <dax@happycoders.org> on This package was debianized by David Rousselie <dax@happycoders.org> on
Wed, 26 Jul 2006 22:04:38 +0200. 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> Copyright Holder: David Rousselie <dax@happycoders.org>

2
debian/dirs vendored
View File

@@ -1,7 +1,5 @@
var/run/jabber var/run/jabber
var/log/jabber var/log/jabber
var/spool/jabber var/spool/jabber
etc/default
etc/jabber etc/jabber
usr/share/jmc
usr/bin usr/bin

196
debian/init.d vendored
View File

@@ -1,147 +1,81 @@
#! /bin/bash -e #! /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
#
export PATH=/sbin:/bin:/usr/sbin:/usr/bin PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/jmc
NAME=jmc
DESC=jmc
# ----- load init-functions if they exist ----- test -x $DAEMON || exit 0
if [ -f /lib/lsb/init-functions ]; then # Include jmc defaults if available
. /etc/lsb-release if [ -f /etc/default/jmc ] ; then
. /lib/lsb/init-functions . /etc/default/jmc
fi fi
# ----- Functions for printing messages (Works for debian and looks good in ubuntu too) set -e
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
fi
# ----- do the action -----
case "$1" in case "$1" in
config) start)
echo "Configuration:" echo -n "Starting $DESC: "
echo " TRANS_NAME=$TRANS_NAME" start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
echo " TRANS_DESC=$TRANS_DESC" --exec $DAEMON -- $DAEMON_OPTS
echo " TRANS_HOME=$TRANS_HOME" echo "$NAME."
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"
;; ;;
stop)
console) echo -n "Stopping $DESC: "
$TRANS_DAEMON $TRANS_OPTIONS start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON
echo "$NAME."
;; ;;
#reload)
start) #
log_start "Starting $TRANS_DESC: " # If the daemon can reload its config files on the fly
if start-stop-daemon $TRANS_START --start --oknodo --exec $TRANS_DAEMON -- $TRANS_OPTIONS $DAEMON_OPTS >/dev/null 2>&1; then # for example by sending it SIGHUP, do it here.
log_end 0 #
else # If the daemon responds to changes in its config file
log_end 1 # directly anyway, make this a do-nothing entry.
fi #
# 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
;; ;;
stop) restart)
log_start "Stopping $TRANS_DESC: " echo -n "Restarting $DESC: "
if start-stop-daemon --stop $TRANS_STOP --retry 10 --oknodo 2>&1; then start-stop-daemon --stop --quiet --pidfile \
log_end 0 /var/run/$NAME.pid --exec $DAEMON
else sleep 1
log_end 1 start-stop-daemon --start --quiet --pidfile \
fi /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;; ;;
reload|force-reload) *)
log_start "Reloading $TRANS_DESC: " N=/etc/init.d/$NAME
if start-stop-daemon --stop $TRANS_STOP --signal HUP >/dev/null 2>&1; then # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
log_end 0 echo "Usage: $N {start|stop|restart|force-reload}" >&2
else
log_end 1
fi
;;
restart)
$0 stop
sleep 5
$0 start
;;
*)
echo "Usage: /etc/init.d/$TRANS_NAME {config|console|start|stop|restart|reload|force-reload}" >&2
exit 1 exit 1
;; ;;
esac esac
exit 0 exit 0

22
debian/jmc.conf vendored
View File

@@ -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>

3
debian/jmc.sh vendored
View File

@@ -1,3 +0,0 @@
#!/bin/sh
python /usr/share/jmc/jmc.py $* &

3
debian/postinst vendored
View File

@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# postinst script for jabber-pyaim # postinst script for jmc
# #
# see: dh_installdeb(1) # see: dh_installdeb(1)
@@ -25,7 +25,6 @@ case "$1" in
# the sanit(ar)y checks otherwise we can safely create it. # the sanit(ar)y checks otherwise we can safely create it.
if [ "$uid" ]; then if [ "$uid" ]; then
# guess??? the checks!!!
if [ $uid -ge 100 ] && [ $uid -le 999 ]; then if [ $uid -ge 100 ] && [ $uid -le 999 ]; then
echo "jabber uid check: ok" echo "jabber uid check: ok"
else else

38
debian/postrm vendored
View File

@@ -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

38
debian/preinst vendored
View File

@@ -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

38
debian/prerm vendored
View File

@@ -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

120
debian/rules vendored
View File

@@ -1,76 +1,76 @@
#!/usr/bin/make -f #!/usr/bin/make -f
# jmc debian/rules file
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
configure: configure-stamp # This file was automatically generated by stdeb 0.2.a1 at
configure-stamp: # Tue, 13 Nov 2007 19:00:04 +0100
dh_testdir
touch configure-stamp PACKAGE_NAME=python-jmc
MODULE_NAME=jmc
DEB_UPSTREAM_VERSION=0.3
PYVERS=$(shell pyversions -vr)
build: build-stamp build: build-stamp
build-stamp: $(PYVERS:%=build-python%)
build-stamp: configure-stamp touch $@
dh_testdir build-python%:
touch build-stamp # 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: clean:
dh_testdir dh_testdir
dh_testroot 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 install: build install-prereq $(PYVERS:%=install-python%)
rm -f -R $(CURDIR)/debian/jmc install-prereq:
dh_clean
install: build
dh_testdir dh_testdir
dh_testroot dh_testroot
dh_clean -k dh_clean -k
dh_installdirs
# Create directory tree for package 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
binary-arch:
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
# Build architecture-independent files here.
binary-indep: build install binary-indep: build install
dh_testdir dh_testdir -i
dh_testroot dh_testroot -i
dh_installchangelogs dh_pycentral -i
dh_installdocs dh_installdocs -i
# dh_installexamples dh_installdirs -i
dh_install dh_installexamples -i
# dh_installmenu dh_strip -i
# dh_installdebconf dh_compress -i -X.py
dh_installlogrotate dh_fixperms -i
# dh_installemacsen : # Replace all '#!' calls to python with $(PYTHON)
# dh_installpam : # and make them executable
# dh_installmime for i in \
dh_installinit `find debian/python-jmc/usr/bin -type f` \
# dh_installcron `find debian/python-jmc/usr/lib -type f`; \
# dh_installinfo do \
# dh_installman case "$$i" in *-[0-9].[0-9]) continue; esac; \
dh_link sed '1s,#!.*python[^ ]*\(.*\),#! /usr/bin/python\1,' \
# dh_strip $$i > $$i.temp; \
# dh_compress if cmp --quiet $$i $$i.temp; then \
dh_fixperms rm -f $$i.temp; \
# dh_perl else \
dh_python /usr/share/jmc mv -f $$i.temp $$i; \
# dh_makeshlibs chmod 755 $$i; \
dh_installdeb echo "fixed interpreter: $$i"; \
# dh_shlibdeps fi; \
dh_gencontrol done
dh_md5sums dh_installdeb -i
dh_builddeb dh_gencontrol -i
dh_md5sums -i
# Build architecture-dependent files here. dh_builddeb -i
binary-arch: build install
# We have nothing to do by default.
binary: binary-indep binary-arch binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure .PHONY: build clean binary-indep binary-arch binary install configure

11
src/jmc.egg-info/PKG-INFO Normal file
View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,3 @@
[console_scripts]
jmc = jmc.runner:main

View File

@@ -0,0 +1 @@
jmc