make install (preparation du packaging debian)

This commit is contained in:
Thomas NOËL 2012-07-18 16:36:53 +02:00
parent 3f836506a2
commit 711b8c5a7a
2 changed files with 11 additions and 81 deletions

View File

@ -14,3 +14,14 @@ create-ldap-tunnel:
rebuild-indexes:
python manage.py sqlindexes base | sed 's/CREATE/DROP/;s/INDEX/INDEX IF EXISTS/;s/ ON.*;/;/' | psql polynum
python manage.py sqlindexes base | psql polynum
# only for package creation
INSTALL=/usr/bin/install
CP=/bin/cp
install:
$(INSTALL) -d $(DESTDIR)/opt/polynum
$(CP) -r polynum $(DESTDIR)/opt/polynum
$(CP) -r bin $(DESTDIR)/opt/polynum
$(INSTALL) -d $(DESTDIR)/etc/polynum
$(INSTALL) -m 644 local_settings.py.example $(DESTDIR)/etc/polynum

View File

@ -1,81 +0,0 @@
# Django local_settings for polynum project
# See settings.py for default values
# No debug in production
DEBUG = False
TEMPLATE_DEBUG = DEBUG
# use PostgreSQL in production
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'polynum', # Or path to database file if using sqlite3.
'USER': 'polynum', # Not used with sqlite3.
'PASSWORD': 'abcdef', # Not used with sqlite3.
'HOST': 'db.univ.fr', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}
#
# Upload directory
#
DOCUMENTS_UPLOAD_DIRECTORY = '/opt/polynum/uploads/'
#
# Authentification with CAS & LDAP
#
CAS_SERVER_URL = 'https://www.univ.fr/cas/' # CAS server URL, if empty CAS login is disabled
LDAP_URL = 'ldaps://' # LDAP server URL
LDAP_BIND_DN = '' # DN to authenticate to the LDAP server
LDAP_BIND_PASSWORD = 'abdef' # and its password
LDAP_USER_QUERY = '' # query to retrieve user, %s is the CAS username
LDAP_BASE = '' # base DN for the query
#
# Design
#
# grappelli admin -- see http://readthedocs.org/docs/django-grappelli
GRAPPELLI_ADMIN_TITLE = 'Univ - Administration de PolyNum'
# templates
TEMPLATE_DIRS = (
'/opt/polynum/local/templates',
'/opt/polynum/templates',
)
#
# OAI METADATA
#
OAI_ADMIN_EMAIL = 'admin@univ.fr'
OAI_TEXT = 'Polynum documents'
OAI_REPOSITORY_NAME = 'Polynum OAI-PMH repository'
#
# Logging configuration
# See http://docs.djangoproject.com/en/dev/topics/logging
#
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
}
},
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
}
}