Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian (.deb) package #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ https://github.com/aeroo/aeroo_docs/wiki/Installation-example-for-Ubuntu-14.04-L

for help:
./aeroo-docs --help

Debian users can build .deb package with:
dpkg-buildpackage

62 changes: 62 additions & 0 deletions debian/aeroo-docs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/bin/bash -e
# /etc/init.d script for aeroo-docs
#

### BEGIN INIT INFO
# Provides: office
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO


. /lib/lsb/init-functions

EXECUTABLE=/usr/bin/aeroo-docs
PIDFILE=/var/run/aeroo-docs.pid

. /etc/aeroo-docs.conf

function start {
echo "Starting Aeroo_docs server"
$EXECUTABLE start
}

function stop {
echo "Stopping Aeroo_docs server."
$EXECUTABLE stop
}

function stop9 {
echo "Stopping Aeroo_docs server."
kill -9 $(cat $PIDFILE)
rm -f $PIDFILE
}

case "$1" in
start)
if [ -f $PIDFILE ]; then
echo "Aeroo_docs server has already started."
exit
fi
start
;;
stop)
stop
;;
restart)
stop
start
;;
force-reload)
stop9
start
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload}"
exit 1
esac
exit 0
12 changes: 12 additions & 0 deletions debian/aeroo-docs.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[start]
interface = localhost
port = 8989
oo-server = localhost
oo-port = 8100
spool-directory = /var/spool/aeroo-docs
spool-expire = 1800
log-file = /var/log/aeroo-docs/aeroo_docs.log
pid-file = /var/run/aeroo-docs.pid
[simple-auth]
username = anonymous
password = anonymous
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
aeroodocs-server (1.0) unstable; urgency=low

* Initial release

-- Luca Vercelli <[email protected]> Thu, 17 Sep 2015 22:06:00 +0200
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
35 changes: 35 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Source: aeroodocs-server
Section: net
Priority: optional
Maintainer: Luca Vercelli <[email protected]>
Uploaders:
Build-Depends: debhelper (>= 9.0), python, rsync
X-Python-Version: 2.7
Standards-Version: 3.9.5.0
Homepage: http://www.alistek.com/
Vcs-Git: https://github.com/aeroo/aeroo_docs

Package: aeroodocs-server
Architecture: all
Depends:
${misc:Depends},
python-aeroo,
python3,
python3-pip,
libreoffice-script-provider-python,
libreoffice-base|openoffice.org-base,
Recommends:
aeroo-docs
Description: Python library for Aeroo Reports
Aeroo Library is a templating library which provides a way to easily
output several kinds of files (odt, ods). Support for more filetypes
can be easily added by creating plugins for them.
.
Aeroo Library also provides a report repository allowing you to link
python objects and report together, find reports by mimetype/name/python
object.
.
This package include the server that takes HTTP request from Odoo
and wrap them to Openoffice/Libreoffice Headless server, and an init script
for the latter.

19 changes: 19 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Contact:

Files: *
Copyright: (C) 2010 Alistek Ltd. (http://www.alistek.com)
License: AGPL-3+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 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 Affero General Public License for more details.
.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

6 changes: 6 additions & 0 deletions debian/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
debian/office /etc/init.d
debian/aeroo-docs /etc/init.d
debian/aeroo-docs.conf /etc
aeroo-docs /usr/lib/aeroo_docs
aeroo_docs_fncs.py /usr/lib/aeroo_docs
DocumentConverter.py /usr/lib/aeroo_docs
2 changes: 2 additions & 0 deletions debian/links
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/usr/lib/aeroo_docs/aeroo-docs /usr/bin/aeroo-docs

72 changes: 72 additions & 0 deletions debian/office
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/bin/bash -e
# openoffice.org headless server script
#
# chkconfig: 2345 80 30
# description: headless openoffice server script
# processname: openoffice
#
# Author: Vic Vijayakumar
# Modified by Federico Ch. Tomasczik
# Modified by Luca Vercelli
#

### BEGIN INIT INFO
# Provides: office
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO


. /lib/lsb/init-functions

OOo_HOME=/usr/bin
SOFFICE_PATH=$OOo_HOME/soffice
PIDFILE=/var/run/openoffice-server.pid


function start {
echo "Starting OpenOffice headless server"
$SOFFICE_PATH --headless --nologo --nofirststartwizard --accept="socket,host=127.0.0.1,port=8100;urp" & > /dev/null 2>&1
echo $! > $PIDFILE
}

function stop {
echo "Stopping OpenOffice headless server."
killall soffice && killall soffice.bin
rm -f $PIDFILE
}

function stop9 {
echo "Stopping OpenOffice headless server."
killall -9 soffice && killall -9 soffice.bin
rm -f $PIDFILE
}

case "$1" in
start)
if [ -f $PIDFILE ]; then
echo "OpenOffice headless server has already started."
exit
fi
start
;;
stop)
stop
;;
restart)
stop
start
;;
force-reload)
stop9
start
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload}"
exit 1
esac
exit 0
10 changes: 10 additions & 0 deletions debian/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash -e

update-rc.d office defaults
update-rc.d aeroo-docs defaults

#As far as I can see, these eggs are not packaged in Debian:
pip3 install jsonrpc2 daemonize

#DEBHELPER#

5 changes: 5 additions & 0 deletions debian/postrm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -e
update-rc.d office defaults
update-rc.d aeroo-docs defaults

#DEBHELPER#
5 changes: 5 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/make -f
# vim:noet:

%:
dh ${@}