--- docvert-3.4.orig/.gitignore +++ docvert-3.4/.gitignore @@ -0,0 +1,2 @@ +/build-stamp +/configure-stamp --- docvert-3.4.orig/debian/odf2html.1 +++ docvert-3.4/debian/odf2html.1 @@ -0,0 +1,34 @@ +.TH "ODF2HTML" "1" "October 9, 2007" "odf2html (docvert)" +.SH "NAME" +odf2html \(em Converts OpenDocument files to HTML or XML +.SH "SYNOPSIS" +.PP +\fBodf2html\fR \-\-input-files=\fIfullpath\fR \-\-output-zip=\fIoutputfile\fR \-\-converter=(openoffice|abiword) \-\-pipeline=\fIpipelinename\fR +.SH "DESCRIPTION" +.PP +This manual page documents briefly the \fBodf2html\fR command (part of the +\fBdocvert\fR package). +.PP +\fBdocvert\fR is a program that takes word processor files +(typically .doc) and converts them to OpenDocument and clean HTML. +.SH "OPTIONS" +.PP +These programs follow the usual GNU command line syntax, +with long options starting with two dashes (`\-'). +.IP "\fB\-\-input-files=\fIpaths\fR\fP" 10 +All input files, separated by commas (URL encoded, aside from the comma) +.IP "\fB\-\-output-zip=\fIpathname\fR\fP" 10 +Output archive (URL encoded) +.IP "\fB\-\-pipeline=\fIname\fR\fP" 10 +Name of the pipeline to use (URL encoded) +.IP "\fB\-\-converter=\fIapplication\fR\fP" 10 +Can be either openoffice or abiword +.IP "\fB\-\-autopipeline=\fIname\fR\fP" 10 +Name of autopipeline (URL encoded) +.SH "EXAMPLE" +.PP +odt2html \-\-input-files=fullpath1,fullpath2 \-\-output-zip=/home/marco/result.zip +\-\-pipeline=s5%20slideshow \-\-converter=openofficeorg +.SH "REPORTING BUGS" +.PP +Report bugs to Matthew Cruickshank . --- docvert-3.4.orig/debian/docvert-openoffice.postrm +++ docvert-3.4/debian/docvert-openoffice.postrm @@ -0,0 +1,55 @@ +#!/bin/bash +# postrm script for docvert +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +CONFIG_FILE="/etc/docvert/docvert.conf" +function set_config { + touch $CONFIG_FILE + chmod 644 $CONFIG_FILE + chown www-data:www-data $CONFIG_FILE + + # Create default values if they don't exist + grep -q 'doNotUseConverterpyodconverter' $CONFIG_FILE || echo 'doNotUseConverterpyodconverter="true"' >> $CONFIG_FILE + grep -q 'disallowNonOpenDocumentUploads' $CONFIG_FILE || echo 'disallowNonOpenDocumentUploads="true"' >> $CONFIG_FILE + + # Change the values if they exist + perl -i -pe 's/doNotUseConverterpyodconverter="false"/doNotUseConverterpyodconverter="true"/i' $CONFIG_FILE + perl -i -pe 's/disallowNonOpenDocumentUploads="false"/disallowNonOpenDocumentUploads="true"/i' $CONFIG_FILE +} + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + if [ -e $CONFIG_FILE ] ; then set_config ; fi + deluser docvert || /bin/true + rm -rf /var/lib/docvert/home + rm -rf /var/run/docvert + ;; + + *) + echo "postrm 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 --- docvert-3.4.orig/debian/docvert-openoffice.postinst +++ docvert-3.4/debian/docvert-openoffice.postinst @@ -0,0 +1,62 @@ +#!/bin/bash +# postinst script for docvert +# +# 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 + +CONFIG_FILE="/etc/docvert/docvert.conf" +function set_config { + touch $CONFIG_FILE + chmod 644 $CONFIG_FILE + chown www-data:www-data $CONFIG_FILE + + # Create default values if they don't exist + grep -q 'disallowNonOpenDocumentUploads' $CONFIG_FILE || echo 'disallowNonOpenDocumentUploads="false"' >> $CONFIG_FILE + grep -q 'runExternalApplicationAsUser' $CONFIG_FILE || echo 'runExternalApplicationAsUser="docvert"' >> $CONFIG_FILE + grep -q 'doNotUseConverterpyodconverter' $CONFIG_FILE || echo 'doNotUseConverterpyodconverter="false"' >> $CONFIG_FILE + + # Change the values if they exist + perl -i -pe 's/doNotUseConverterpyodconverter="true"/doNotUseConverterpyodconverter="false"/i' $CONFIG_FILE + perl -i -pe 's/disallowNonOpenDocumentUploads="true"/disallowNonOpenDocumentUploads="false"/i' $CONFIG_FILE +} + +case "$1" in + configure) + set_config + adduser --system --group --home /var/lib/docvert/home --gecos 'Docvert Converter,,,' docvert || /bin/true + + mkdir -p /var/lib/docvert/home + chown docvert /var/lib/docvert/home + + mkdir -p /var/run/docvert + chown docvert /var/run/docvert + ;; + + 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 --- docvert-3.4.orig/debian/docvert.postrm +++ docvert-3.4/debian/docvert.postrm @@ -0,0 +1,24 @@ +#!/bin/sh +# postrm script for docvert +# +# see: dh_installdeb(1) + +set -e + +case "$1" in + purge) + rm -f /etc/docvert/docvert.conf + rm -f /etc/docvert/salt + rmdir --ignore-fail-on-non-empty /etc/docvert + rm -rf /var/lib/docvert/ + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- docvert-3.4.orig/debian/docvert.dirs +++ docvert-3.4/debian/docvert.dirs @@ -0,0 +1,6 @@ +etc/apache2/conf.d +etc/docvert +usr/bin +usr/share/docvert +usr/share/man/man1 +var/lib/docvert/writable --- docvert-3.4.orig/debian/docvert.postinst +++ docvert-3.4/debian/docvert.postinst @@ -0,0 +1,76 @@ +#!/bin/bash +# postinst script for docvert +# +# 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 + +SALT_FILE="/etc/docvert/salt" +function create_random_salt { + pwgen -s 64 1 > $SALT_FILE + chmod 600 $SALT_FILE + chown www-data:www-data $SALT_FILE +} + +CONFIG_FILE="/etc/docvert/docvert.conf" +function create_default_config { + touch $CONFIG_FILE + chmod 644 $CONFIG_FILE + chown www-data:www-data $CONFIG_FILE + + grep -q 'superUserPreference' $CONFIG_FILE || echo 'superUserPreference="setuid"' >> $CONFIG_FILE + grep -q 'doNotUseConverterpyodconverter' $CONFIG_FILE || echo 'doNotUseConverterpyodconverter="true"' >> $CONFIG_FILE + grep -q 'doNotUseConverterabiword' $CONFIG_FILE || echo 'doNotUseConverterabiword="true"' >> $CONFIG_FILE + grep -q 'doNotUseConverteropenofficeorg' $CONFIG_FILE || echo 'doNotUseConverteropenofficeorg="true"' >> $CONFIG_FILE + grep -q 'disallowNonOpenDocumentUploads' $CONFIG_FILE || echo 'disallowNonOpenDocumentUploads="true"' >> $CONFIG_FILE + grep -q 'disallowXVFB' $CONFIG_FILE || echo 'disallowXVFB="true"' >> $CONFIG_FILE + grep -q 'hideAdminOptionopenofficeorg' $CONFIG_FILE || echo 'hideAdminOptionopenofficeorg="true"' >> $CONFIG_FILE + grep -q 'hideAdminOptionabiword' $CONFIG_FILE || echo 'hideAdminOptionabiword="true"' >> $CONFIG_FILE + grep -q 'hideAdminOptionjodconverter' $CONFIG_FILE || echo 'hideAdminOptionjodconverter="true"' >> $CONFIG_FILE + grep -q 'hideAdminOptionpyodconverter' $CONFIG_FILE || echo 'hideAdminOptionpyodconverter="true"' >> $CONFIG_FILE + grep -q 'hideAdminSuperUserMethodUserInterface' $CONFIG_FILE || echo 'hideAdminSuperUserMethodUserInterface="true"' >> $CONFIG_FILE + grep -q 'hideAdminOptionOpenOfficeOrg' $CONFIG_FILE || echo 'hideAdminOptionOpenOfficeOrg="true"' >> $CONFIG_FILE + grep -q 'hideAdminRunAsUser' $CONFIG_FILE || echo 'hideAdminRunAsUser="true"' >> $CONFIG_FILE + grep -q 'hideAdminNonOpenDocumentUploads' $CONFIG_FILE || echo 'hideAdminNonOpenDocumentUploads="true"' >> $CONFIG_FILE + grep -q 'hideAdminOptionOpenOfficeOrgServer' $CONFIG_FILE || echo 'hideAdminOptionOpenOfficeOrgServer="true"' >> $CONFIG_FILE +} + +case "$1" in + configure) + chown -R www-data:www-data /etc/docvert + chown -R www-data:www-data /var/lib/docvert/writable + + create_default_config + [ -e $SALT_FILE ] || create_random_salt + + rm -f /usr/share/docvert/core/lib/fckeditor + ln -s /usr/share/fckeditor /usr/share/docvert/core/lib/fckeditor + ;; + + 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 --- docvert-3.4.orig/debian/rules +++ docvert-3.4/debian/rules @@ -0,0 +1,90 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Copy main application files + cp $(CURDIR)/bin/odf2html $(CURDIR)/debian/docvert/usr/bin/ + cp $(CURDIR)/*.php $(CURDIR)/debian/docvert/usr/share/docvert/ + cp -r $(CURDIR)/doc $(CURDIR)/debian/docvert/usr/share/docvert/ + cp -r $(CURDIR)/generator-pipeline $(CURDIR)/debian/docvert/usr/share/docvert/ + cp -r $(CURDIR)/pipeline $(CURDIR)/debian/docvert/usr/share/docvert/ + cp -r $(CURDIR)/core $(CURDIR)/debian/docvert/usr/share/docvert/ + rm -rf $(CURDIR)/debian/docvert/usr/share/docvert/core/lib/fckeditor + rm -rf $(CURDIR)/debian/docvert/usr/share/docvert/core/lib/pclzip-2.6 + rm -rf $(CURDIR)/debian/docvert/usr/share/docvert/core/lib/jodconverter/ + rm -rf $(CURDIR)/debian/docvert/usr/share/docvert/core/lib/svgrlib/ + rm -rf $(CURDIR)/debian/docvert/usr/share/docvert/core/config/ + + # Copy external application scripts + cp $(CURDIR)/core/config/unix-specific/convert-using-wmf2* $(CURDIR)/debian/docvert-openoffice/usr/share/docvert/core/config/unix-specific/ + cp $(CURDIR)/core/config/unix-specific/convert-using-openoffice.org.sh $(CURDIR)/debian/docvert-openoffice/usr/share/docvert/core/config/unix-specific/ + cp $(CURDIR)/core/config/unix-specific/openoffice.org-server.sh $(CURDIR)/debian/docvert-openoffice/usr/share/docvert/core/config/unix-specific/ + + # Fix permissions + chmod -x $(CURDIR)/debian/docvert/usr/share/docvert/frameset.php + + # Writable directory + cp $(CURDIR)/writable/index.html $(CURDIR)/debian/docvert/var/lib/docvert/writable/ + ln -s /var/lib/docvert/writable $(CURDIR)/debian/docvert/usr/share/docvert/writable + + cp $(CURDIR)/debian/apache.conf $(CURDIR)/debian/docvert/etc/apache2/conf.d/docvert + +# Build architecture-dependent files here. +binary-arch: build install +# We have nothing to do by default. + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples doc/sample/ + dh_installcron + dh_installman debian/odf2html.1 + dh_installinit + dh_link + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb -- -Z bzip2 + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- docvert-3.4.orig/debian/apache.conf +++ docvert-3.4/debian/apache.conf @@ -0,0 +1,49 @@ +# Uncomment this to add an alias. +# This does not work properly with virtual hosts.. +#Alias /docvert /usr/share/docvert + + + Options +FollowSymLinks + AllowOverride All + order allow,deny + allow from all + + +# Prohibit internal directories + + deny from all + + + deny from all + + + deny from all + + + deny from all + + + deny from all + + + deny from all + + + deny from all + + +# Restrict the writable directory as much as possible + + Options -Indexes -FollowSymLinks + AllowOverride None + order allow,deny + allow from all + + # Only allow files generated by docvert to be served + + deny from all + + + allow from all + + --- docvert-3.4.orig/debian/docvert.prerm +++ docvert-3.4/debian/docvert.prerm @@ -0,0 +1,41 @@ +#!/bin/sh +# prerm script for docvert +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + rm -f /usr/share/docvert/core/lib/fckeditor + ;; + + failed-upgrade) + ;; + + *) + echo "prerm 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 + + --- docvert-3.4.orig/debian/README.Debian +++ docvert-3.4/debian/README.Debian @@ -0,0 +1,18 @@ +docvert for Debian +------------------ + +To quickly enable docvert: + +1- Uncomment the following line in /etc/apache2/conf.d/docvert: + Alias /docvert /usr/share/docvert + +2- Restart Apache + apache2ctl configtest && apache2ctl graceful + +3- Visit http://localhost/docvert/ and browse to the admin page + (the tab on the top-right). + +Note that if you want your users to be able to convert Word documents, you +need to install the docvert-openoffice package. + + -- Francois Marier Tue, 09 Oct 2007 15:25:30 +1300 --- docvert-3.4.orig/debian/docvert.cron.daily +++ docvert-3.4/debian/docvert.cron.daily @@ -0,0 +1,4 @@ +#!/bin/sh + +find /var/lib/docvert/ -name "preview*" -type f -mtime 1 | xargs -n 100 rm -f +find /var/lib/docvert/ -name "preview*" -type d -mtime 1 | xargs --no-run-if-empty -n 100 rmdir --ignore-fail-on-non-empty --- docvert-3.4.orig/debian/.gitignore +++ docvert-3.4/debian/.gitignore @@ -0,0 +1,9 @@ +/docvert*.debhelper.log +/docvert*.postinst.debhelper +/docvert*.prerm.debhelper +/docvert*.postrm.debhelper +/docvert/ +/docvert-abiword/ +/docvert-converter/ +/docvert-openoffice/ +/files --- docvert-3.4.orig/debian/changelog +++ docvert-3.4/debian/changelog @@ -0,0 +1,17 @@ +docvert (3.4-3) unstable; urgency=low + + * Compress the package with bzip2 + + -- Francois Marier Mon, 23 Jun 2008 15:13:28 +1200 + +docvert (3.4-2) unstable; urgency=low + + * Remove the fckeditor symlink on package removal + + -- Francois Marier Sun, 22 Jun 2008 12:23:09 +1200 + +docvert (3.4-1) unstable; urgency=low + + * Initial release (Closes: #445912) + + -- Francois Marier Tue, 17 Jun 2008 11:59:33 +1200 --- docvert-3.4.orig/debian/watch +++ docvert-3.4/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts=dversionmangle=s/\+svn\d+// \ + http://holloway.co.nz/docvert/download.html docvert-(.*)\.tar\.gz --- docvert-3.4.orig/debian/docvert.docs +++ docvert-3.4/debian/docvert.docs @@ -0,0 +1,4 @@ +doc/command-line-usage.txt +doc/curl.txt +doc/how-to-write-themes.txt +doc/troubleshooting.txt --- docvert-3.4.orig/debian/compat +++ docvert-3.4/debian/compat @@ -0,0 +1 @@ +6 --- docvert-3.4.orig/debian/copyright +++ docvert-3.4/debian/copyright @@ -0,0 +1,74 @@ +This package was debianized by Francois Marier on +Tue, 09 Oct 2007 15:25:30 +1300. + +It was downloaded from http://www.docvert.org + +Upstream Authors: + + Matthew Holloway + Mark Rickerby + Cyrille Bonnet + +Copyright: + + Copyright (C) 2005-2008 Matthew Holloway + +License: + + 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 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, see . + +On Debian systems, the complete text of the GNU General Public License +can be found in `/usr/share/common-licenses/GPL-3'. + +The Debian packaging is (C) 2008, Francois Marier and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + +This package also includes the following code: + + core/lib/sun-xsl/: + Copyright (C) 2000 by Sun Microsystems + Released under the GNU Lesser General Public License 2.1 + + core/lib/fckeditor/: + Copyright (C) 2003-2006 Frederico Caldeira Knabben + Released under the GNU Lesser General Public License 2.1 + + core/lib/pclzip-2.6/: + Copyright (C) 2006 Vincent Blavet + Released under the GNU Lesser General Public License 2.1 + + core/lib/pyodconverter/: + Copyright (C) 2007 Mirko Nasato + Released under the GNU Lesser General Public License 2.1 + + pipeline/s5 slideshow: + Released into the public domain by Eric Meyer + + core/schemas/docbook.rng: + Copyright 1992-2005 HaL Computer Systems, Inc., + O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software + Corporation, Norman Walsh, Sun Microsystems, Inc., and the + Organization for the Advancement of Structured Information + Standards (OASIS). + + Permission to use, copy, modify and distribute the DocBook schema + and its accompanying documentation for any purpose and without fee + is hereby granted in perpetuity, provided that the above copyright + notice and this paragraph appear in all copies. The copyright + holders make no representation about the suitability of the schema + for any purpose. It is provided "as is" without expressed or implied + warranty. + +On Debian systems, the complete text of the GNU Lesser General +Public License can be found in `/usr/share/common-licenses/LGPL-2.1'. --- docvert-3.4.orig/debian/docvert-openoffice.init.d +++ docvert-3.4/debian/docvert-openoffice.init.d @@ -0,0 +1,129 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: docvert-openoffice +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Required-Start: $local_fs $network $syslog +# Required-Stop: $local_fs $network $syslog +# Short-Description: Open Office service for Docvert +# Description: This init.d script is used to start Open Office as a +# service. +### END INIT INFO + +# Author: Martyn Smith + +# Do NOT "set -e" + +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="Open Office service for Docvert" +NAME=docvert-openoffice +USER=docvert +GROUP=docvert +DAEMON=/usr/share/docvert/core/config/unix-specific/openoffice.org-server.sh +DAEMON_ARGS="" +PIDFILE=/var/run/docvert/openoffice.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +. /lib/init/vars.sh + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon -c $USER -g $GROUP --start --pidfile $PIDFILE --exec $DAEMON --test > /dev/null || return 1 + start-stop-daemon -c $USER -g $GROUP --start --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS || return 2 + sleep 2 + pgrep "soffice" > "$PIDFILE" + [ -s "$PIDFILE" ] || return 2 + return 0 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. + # TODO: +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon -c $USER -g $GROUP --quiet --stop --pidfile $PIDFILE + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + #start-stop-daemon -c $USER -g $GROUP --stop --oknodo --retry=0/30/KILL/5 --exec $DAEMON + #[ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac + +# Do NOT remove this, it sets the return value! +: --- docvert-3.4.orig/debian/docvert-openoffice.dirs +++ docvert-3.4/debian/docvert-openoffice.dirs @@ -0,0 +1 @@ +usr/share/docvert/core/config/unix-specific/ --- docvert-3.4.orig/debian/control +++ docvert-3.4/debian/control @@ -0,0 +1,41 @@ +Source: docvert +Section: web +Priority: extra +Maintainer: Francois Marier +Build-Depends: debhelper (>= 6) +Standards-Version: 3.8.0 +Homepage: http://www.docvert.org +Vcs-Git: git://git.debian.org/git/collab-maint/docvert.git +Vcs-Browser: http://git.debian.org/?p=collab-maint/docvert.git;a=summary + +Package: docvert +Architecture: all +Pre-Depends: pwgen +Depends: python, php5-xsl, php5-cli, php5-gd, php5-tidy, librsvg2-bin, apache2, libapache2-mod-php5, libphp-pclzip, fckeditor +Recommends: docvert-openoffice, optipng, jpegoptim +Description: Converts word processor files to HTML + Docvert is a web application which takes word processor files + (typically .doc) and converts them to OpenDocument and clean HTML. + . + The resulting OpenDocument is then optionally converted to HTML or + any XML. This is done with XML Pipelines, an approach that supports + XSLT, breaking up content over headings or sections, and saving those + results to multiple files (e.g., chapter1.html, chapter2.html, etc.). + The result is returned in a .zip file. + . + A command-line program which uses the web application is also included. + . + This package only supports OpenDocument. To convert other formats, + install one of the recommended packages: docvert-abiword or + docvert-openoffice + +Package: docvert-openoffice +Architecture: all +Pre-Depends: procps +Depends: openoffice.org-writer, openoffice.org-headless, python-uno, lsb-base (>= 3.0-6), python, libwmf-bin, adduser +Description: Converts word processor files to HTML using OpenOffice + Docvert is a web application which takes word processor files + (typically .doc) and converts them to OpenDocument and clean HTML. + . + This package adds the ability to convert Word documents using Open + Office. --- docvert-3.4.orig/bin/odf2html +++ docvert-3.4/bin/odf2html @@ -2,7 +2,7 @@ previewDirectory) webServiceError('&error-webpage-no-preview-directory-given;'); if(!file_exists($this->previewDirectory)) { - webServiceError('&error-webpage-no-preview-directory;'); + webServiceError('&error-webpage-no-preview-directory;]]', 500, Array('path'=>$this->previewDirectory)); } $convertedDocumentPaths = glob($this->previewDirectory.DIRECTORY_SEPARATOR.'*'); --- docvert-3.4.orig/core/config/unix-specific/convert-using-openoffice.org.sh +++ docvert-3.4/core/config/unix-specific/convert-using-openoffice.org.sh @@ -3,8 +3,7 @@ docvertMacrosDocumentPath="$2" inputDocumentUrl="$3" outputDocumentUrl="$4" -HOME=/tmp/ - +HOME=/var/lib/docvert/home if [ $mockConversion = "true" ] then --- docvert-3.4.orig/core/themes/docvert/fckeditor-config.js +++ docvert-3.4/core/themes/docvert/fckeditor-config.js @@ -0,0 +1,5 @@ +// dynamically included by the FCKEditor + +FCKConfig.ToolbarSets["DocvertToolbar"] = [ + ['Style','-','Bold','Italic','-','Link','Unlink','OrderedList','UnorderedList','-','Table', '-','Source'] +] ; --- docvert-3.4.orig/core/themes/docvert/fckeditor-template.html +++ docvert-3.4/core/themes/docvert/fckeditor-template.html @@ -28,10 +28,9 @@ } } - - +
@@ -51,9 +50,9 @@ - -{{config}} - + + +