debian: first release
This commit is contained in:
parent
b7ed4c754a
commit
330fb9d86f
1
control
1
control
|
@ -4,6 +4,7 @@ Section: python
|
|||
Priority: optional
|
||||
Build-Depends: python-setuptools (>= 0.6b3), python-all (>= 2.6.6-3), debhelper (>= 7.4.3)
|
||||
Standards-Version: 3.9.1
|
||||
X-Python-Version: current
|
||||
|
||||
Package: mandaye-cam
|
||||
Architecture: all
|
||||
|
|
|
@ -12,8 +12,7 @@
|
|||
# Author: Jérôme Schneider <jschneider@entrouvert.com>
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC=compte-meyzieu
|
||||
NAME=compte-meyzieu
|
||||
NAME=mandaye-cam
|
||||
DAEMON=/usr/bin/gunicorn
|
||||
PIDFILE=/var/run/mandaye-cam/$NAME.pid
|
||||
LOG_DIR=/var/log/mandaye-cam
|
||||
|
|
|
@ -1,22 +1,6 @@
|
|||
import os
|
||||
import logging
|
||||
|
||||
_PROJECT_PATH = os.path.join(os.path.dirname(__file__), '..')
|
||||
|
||||
db_url = 'sqlite:///' + os.path.join(_PROJECT_PATH, 'data/test.db')
|
||||
|
||||
debug = False
|
||||
log_file = os.path.join('/var/log/mandaye-cam/mandaye.log')
|
||||
log_level = logging.INFO
|
||||
|
||||
# Encrypt service provider passwords with a secret
|
||||
# You should install pycypto to use this feature
|
||||
encrypt_sp_password = True
|
||||
# Must be a 16, 24, or 32 bytes long
|
||||
encrypt_secret = 'CHANGE_ME'
|
||||
|
||||
static_root = os.path.join(_PROJECT_PATH, 'cam/static')
|
||||
|
||||
## Virtual hosts configuration
|
||||
hosts = {
|
||||
'archimed.montpellier.entrouvert.org': [
|
||||
{'path': r'/',
|
||||
|
@ -28,3 +12,39 @@ hosts = {
|
|||
}
|
||||
],
|
||||
}
|
||||
|
||||
## Database configuration
|
||||
db_url = 'sqlite:///var/lib/mandaye-cam/cam.db'
|
||||
|
||||
## Logging configuration
|
||||
debug = False
|
||||
log_file = '/var/log/mandaye-cam/mandaye.log'
|
||||
log_level = logging.INFO
|
||||
|
||||
## PATH
|
||||
# Data directory
|
||||
data_dir = '/var/lib/mandaye-cam/data'
|
||||
|
||||
## Email notification configuration
|
||||
email_notification = True
|
||||
smtp_host = 'localhost'
|
||||
smtp_port = 25
|
||||
email_from = 'traceback+mandaye-cam@entrouvert.com'
|
||||
email_to = ['admin+mandaye-cam@entrouvert.com']
|
||||
|
||||
|
||||
## Session configuration
|
||||
# http://beaker.readthedocs.org/en/latest/configuration.html#options-for-sessions-and-caching
|
||||
session_opts = {
|
||||
'session.type': 'file',
|
||||
'session.cookie_expires': True,
|
||||
'session.timeout': 3600,
|
||||
'session.data_dir': '/var/lib/mandaye-cam/sessions'
|
||||
}
|
||||
|
||||
## Encrypt service provider passwords with a secret
|
||||
# You should install pycypto to use this feature
|
||||
encrypt_sp_password = True
|
||||
# Must be a 16, 24, or 32 bytes long
|
||||
encrypt_secret = 'CHANGEME'
|
||||
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Postinst script for mandaye-cam
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
USER=mandaye-cam
|
||||
G0ROUP=mandaye-cam
|
||||
NAME=mandaye-cam
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
if ! getent group $GROUP > /dev/null 2>&1; then
|
||||
echo -n "Adding group $GROUP.."
|
||||
addgroup --quiet --system $GROUP
|
||||
echo "..done"
|
||||
fi
|
||||
if ! getent passwd $USER > /dev/null 2>&1; then
|
||||
echo -n "Adding user $USER.."
|
||||
adduser --quiet --system --gecos "Mandaye CAM daemon" \
|
||||
--ingroup $GROUP \
|
||||
--no-create-home --home $HOME \
|
||||
$USER
|
||||
echo "..done"
|
||||
fi
|
||||
|
||||
chown -R $USER:$GROUP /var/lib/$NAME /var/run/$NAME /var/log/$NAME
|
||||
|
||||
if [ -z "$2" ]; then
|
||||
echo -n "Creating database.."
|
||||
su $USER -p -c "/usr/bin/cam_mandaye_manager --createdb"
|
||||
echo "..done"
|
||||
fi
|
||||
;;
|
||||
|
||||
reconfigure)
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst 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
|
5
rules
5
rules
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
BUILD_DIR := 'debian/mandaye-cam'
|
||||
|
||||
%:
|
||||
dh $@ --with python2
|
||||
|
||||
|
@ -8,3 +10,6 @@ override_dh_install:
|
|||
for ver in $(shell pyversions -vr); do \
|
||||
ln -s /etc/mandaye-cam/local_config.py $(BUILD_DIR)/usr/lib/python$$ver/dist-packages/cam/; \
|
||||
done
|
||||
install -d -m 0755 $(BUILD_DIR)/var/lib/mandaye-cam
|
||||
install -d -m 0755 $(BUILD_DIR)/var/run/mandaye-cam
|
||||
install -d -m 0755 $(BUILD_DIR)/var/log/mandaye-cam
|
||||
|
|
Reference in New Issue