From afcf976f279cda819420dc8e10e922cf9a492062 Mon Sep 17 00:00:00 2001 From: LV-426 Date: Tue, 21 Apr 2015 23:30:02 +0300 Subject: wip: debian packaging --- build.ant | 36 +++++++++++++++++++++++++----------- res/debian/README | 6 ++++++ res/debian/README.Debian | 6 ++++++ res/debian/changelog | 5 +++++ res/debian/compat | 1 + res/debian/control | 28 ++++++++++++++++++++++++++++ res/debian/copyright | 29 +++++++++++++++++++++++++++++ res/debian/install | 8 ++++++++ res/debian/postinst | 40 ++++++++++++++++++++++++++++++++++++++++ res/debian/rhizi.cron.hourly | 1 + res/debian/rhizi.init | 2 +- res/debian/rules | 25 +++++++++++++++++++++++++ 12 files changed, 175 insertions(+), 12 deletions(-) create mode 100644 res/debian/README create mode 100644 res/debian/README.Debian create mode 100644 res/debian/changelog create mode 100644 res/debian/compat create mode 100644 res/debian/control create mode 100644 res/debian/copyright create mode 100644 res/debian/install create mode 100644 res/debian/postinst create mode 100644 res/debian/rhizi.cron.hourly create mode 100755 res/debian/rules diff --git a/build.ant b/build.ant index 4321d4fc..8c68caf1 100644 --- a/build.ant +++ b/build.ant @@ -32,9 +32,12 @@ - + - + + + + @@ -47,7 +50,7 @@ - + @@ -168,23 +171,34 @@ - - + - + - - + + - + + + + @@ -192,8 +206,8 @@ - - + + diff --git a/res/debian/README b/res/debian/README new file mode 100644 index 00000000..9df269f5 --- /dev/null +++ b/res/debian/README @@ -0,0 +1,6 @@ +The Debian Package rhizi +---------------------------- + +Comments regarding the Package + + -- Amir Sagie Sun, 23 Nov 2014 19:09:39 +0200 diff --git a/res/debian/README.Debian b/res/debian/README.Debian new file mode 100644 index 00000000..91c91086 --- /dev/null +++ b/res/debian/README.Debian @@ -0,0 +1,6 @@ +rhizi for Debian +----------------------- + +No current notes. + + -- Amir Sagie Sun, 23 Nov 2014 19:09:39 +0200 diff --git a/res/debian/changelog b/res/debian/changelog new file mode 100644 index 00000000..a11dd580 --- /dev/null +++ b/res/debian/changelog @@ -0,0 +1,5 @@ +rhizi (0.1.0) unstable; urgency=low + + * Initial Release. + + -- Amir Sagie Sun, 23 Nov 2014 19:09:39 +0200 diff --git a/res/debian/compat b/res/debian/compat new file mode 100644 index 00000000..ec635144 --- /dev/null +++ b/res/debian/compat @@ -0,0 +1 @@ +9 diff --git a/res/debian/control b/res/debian/control new file mode 100644 index 00000000..88a3b56a --- /dev/null +++ b/res/debian/control @@ -0,0 +1,28 @@ +Source: rhizi +Section: web +Priority: optional +Maintainer: Amir Sagie +Build-Depends: debhelper (>= 9), + dh-python +Standards-Version: 3.9.5 +Homepage: http://rhizi.net + +Package: rhizi +Architecture: any +Depends: ${python:Depends}, + ${shlibs:Depends}, + ${misc:Depends}, + apache2 (>= 2.4), + neo4j-advanced (>= 2.2), + python2.7, + python-enum, + python-flask, + python-futures, + python-gevent, + python-gevent-websocket, + python-six, + python-socketio +Description: Rhizi document server + Rhizi collaborative web editor + . + This package includes the Rhizi server diff --git a/res/debian/copyright b/res/debian/copyright new file mode 100644 index 00000000..b54b990f --- /dev/null +++ b/res/debian/copyright @@ -0,0 +1,29 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: rhizi +Source: http://rhizi.org + +Files: * +Copyright: 2014 Amir Sagie +License: GPL-3.0+ + +Files: debian/* +Copyright: 2014 Amir Sagie +License: GPL-3.0+ + +License: GPL-3.0+ + 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 3 of the License, or + (at your option) any later version. + . + This package 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, see . + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + diff --git a/res/debian/install b/res/debian/install new file mode 100644 index 00000000..764b6def --- /dev/null +++ b/res/debian/install @@ -0,0 +1,8 @@ +res/client/* usr/share/rhizi/webapp/static/ +res/etc/* etc/rhizi/ +res/templates/* usr/share/rhizi/webapp/templates/ + +res/apache/sites-availalbe etc/apache2/sites-available/ + +src/server/* usr/lib/rhizi/rhizi-server/ +src/local/server-tools/* usr/lib/rhizi/server-tools/ \ No newline at end of file diff --git a/res/debian/postinst b/res/debian/postinst new file mode 100644 index 00000000..860dbf91 --- /dev/null +++ b/res/debian/postinst @@ -0,0 +1,40 @@ +#!/bin/sh +# postinst script for rhizi +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + # call chmod, chown, etc. + ;; + + 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 diff --git a/res/debian/rhizi.cron.hourly b/res/debian/rhizi.cron.hourly new file mode 100644 index 00000000..274cdd7a --- /dev/null +++ b/res/debian/rhizi.cron.hourly @@ -0,0 +1 @@ +/usr/lib/rhizi/server-tools/rz_backup.py \ No newline at end of file diff --git a/res/debian/rhizi.init b/res/debian/rhizi.init index 1da09ac4..61d9e916 100644 --- a/res/debian/rhizi.init +++ b/res/debian/rhizi.init @@ -1,7 +1,7 @@ #!/bin/sh ### BEGIN INIT INFO -# Provides: rhizi-server +# Provides: rhizi # Required-Start: $local_fs $network $syslog # Required-Stop: $local_fs $network $syslog # Default-Start: 2 3 4 5 diff --git a/res/debian/rules b/res/debian/rules new file mode 100755 index 00000000..e2a59841 --- /dev/null +++ b/res/debian/rules @@ -0,0 +1,25 @@ +#!/usr/bin/make -f + +export DH_VERBOSE=1 + +DEB_CONFIGURE_EXTRA_FLAGS := \ + --prefix=/usr \ + --libdir=/usr/lib \ + --enable-python + +%: + dh $@ --with python2 + +override_dh_auto_configure: + dh_auto_configure -- $(DEB_CONFIGURE_EXTRA_FLAGS) + +override_dh_auto_install: + dh_auto_install + + # TODO: support python setup.py install: + # python setup.py install --root=$(CURDIR)/debian/supybot --prefix=/usr $(py_setup_install_args) + +override_dh_python2: + dh_python2 \ + -p rhizi \ + --exclude=rhizi-server.py -- cgit v1.3.1