packaging for wcs extension

This commit is contained in:
Frédéric Péters 2009-01-12 14:35:52 +00:00
parent 4a723576a8
commit 76808547d8
7 changed files with 230 additions and 0 deletions

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
wcs-au-quotidien (1.0.0-1) stable; urgency=low
* Initial package.
-- Damien Laniel <dlaniel@entrouvert.com> Wed, 03 Sep 2008 15:48:49 +0200

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
5

15
debian/control vendored Normal file
View File

@ -0,0 +1,15 @@
Source: wcs-au-quotidien
Section: web
Priority: optional
Maintainer: Frederic Peters <fpeters@entrouvert.com>
Build-Depends: debhelper (>= 5.0.37.2), python
Build-Depends-Indep: python-support (>= 0.4), gettext, python-quixote
Standards-Version: 3.8.0.1
XS-Python-Version: current
Package: wcs-au-quotidien
Architecture: all
Depends: ${python:Depends}, wcs
Description: w.c.s. Form Server (Au Quotidien Extension)
.
XB-Python-Version: ${python:Versions}

26
debian/copyright vendored Normal file
View File

@ -0,0 +1,26 @@
This package was debianized by Frederic Peters <fpeters@entrouvert.com> on
Wed, 03 Sep 2008 15:48:49 +0200.
Upstream Author: Frederic Peters <fpeters@entrouvert.com>
Copyright (c) 2005 Entr'ouvert;
Copyright (c) 2003-2005 dotclear for the graphics.
License is GNU GPL v2 or later plus OpenSSL exception clause.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
St, Fifth Floor, Boston, MA 02110-1301, USA.
On Debian GNU/Linux systems, the complete text of the GNU General Public
License can be found in `/usr/share/common-licenses/GPL'.

58
debian/rules vendored Executable file
View File

@ -0,0 +1,58 @@
#!/usr/bin/make -f
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
PYTHON=/usr/bin/python
build: build-stamp
build-stamp:
dh_testdir
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
cd po && rm -f *.mo
python setup.py clean
rm -rf build
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(PYTHON) setup.py install --prefix=$(CURDIR)/debian/wcs-au-quotidien/usr --no-compile
mv $(CURDIR)/debian/wcs-au-quotidien/usr/lib/python2.5/site-packages/extra \
$(CURDIR)/debian/wcs-au-quotidien/usr/lib/python2.5/site-packages/extra-wcs-au-quotidien
cd po && make install prefix=$(CURDIR)/debian/wcs-au-quotidien/
# Build architecture-independent files here.
binary-indep: build install
dh_testdir
dh_testroot
dh_installdocs
dh_installchangelogs
dh_installinit
dh_link
dh_strip
dh_compress
dh_fixperms
dh_pysupport
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
binary-arch: build install
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install

95
debian/wcs-au-quotidien.init vendored Executable file
View File

@ -0,0 +1,95 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: authentic
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Authentic IdP (Adeline)
# Description: Authentic Identity Provider (with Adeline extension)
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="Authentic (+Adeline)"
NAME=authentic-adeline
DAEMON=/usr/sbin/authenticctl
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
OPTIONS="--extra /usr/share/python-support/authentic-adeline/extra"
# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0
# Read config file if it is present.
if [ -r /etc/default/$NAME ]
then
. /etc/default/$NAME
fi
#
# Function that starts the daemon/service.
#
d_start() {
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--chuid www-data:www-data --make-pidfile --background --exec $DAEMON -- start $OPTIONS
}
#
# Function that stops the daemon/service.
#
d_stop() {
start-stop-daemon --stop --quiet --pidfile $PIDFILE
}
#
# Function that sends a SIGHUP to the daemon/service.
#
d_reload() {
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
--make-pidfile --background --signal 1
}
case "$1" in
start)
echo -n "Starting $DESC: $NAME"
d_start
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
d_stop
echo "."
;;
#reload)
#
# If the daemon can reload its configuration without
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
# If the daemon responds to changes in its config file
# directly anyway, make this an "exit 0".
#
# echo -n "Reloading $DESC configuration..."
# d_reload
# echo "done."
#;;
restart|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".
#
echo -n "Restarting $DESC: $NAME"
d_stop
sleep 1
d_start
echo "."
;;
*)
# echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0

30
setup.py Normal file
View File

@ -0,0 +1,30 @@
#! /usr/bin/env python
import os
import distutils.core
from quixote.ptl.qx_distutils import qx_build_py
def data_tree(destdir, sourcedir):
extensions = ['.css', '.png', '.jpeg', '.jpg', '.xml', '.html', '.js', '.ezt', '.gif']
r = []
for root, dirs, files in os.walk(sourcedir):
l = [os.path.join(root, x) for x in files if os.path.splitext(x)[1] in extensions]
r.append( (root.replace(sourcedir, destdir, 1), l) )
if 'CVS' in dirs:
dirs.remove('CVS')
if '.svn' in dirs:
dirs.remove('.svn')
return r
distutils.core.setup(
name = 'wcs-au-quotidien',
version = '1.0.0',
maintainer = 'Frederic Peters',
maintainer_email = 'fpeters@entrouvert.com',
package_dir = { 'extra': 'extra' },
packages = ['extra', 'extra.modules', 'extra.modules.pyatom'],
cmdclass = {'build_py': qx_build_py},
data_files = data_tree('share/wcs/texts', 'texts') +\
data_tree('share/wcs/themes/auquotidien', 'theme') +\
data_tree('share/auquotidien/apache-errors', 'apache-errors'),
)