debian/0000755000000000000000000000000012150503734007166 5ustar debian/watch0000644000000000000000000000045011244111110010200 0ustar version=3 opts=uversionmangle=s/^/0+svn/,downloadurlmangle=s/\?view.*$/\/trunk\/xsl\/epub.tar.gz\?view=tar/,filenamemangle=s/^.*revision=(\d+)$/epub-0+svn$1.tar.gz/ \ http://docbook.svn.sourceforge.net/viewvc/docbook/trunk/xsl/epub/ .*revision=(\d+)$ \ debian /bin/sh debian/get-orig-source.sh debian/dbtoepub.manpages0000644000000000000000000000002211425371152012502 0ustar debian/dbtoepub.1 debian/get-orig-source.sh0000755000000000000000000000113011201560157012531 0ustar #!/bin/sh set -ex UPSTREAM_VERSION=$2 ORIG_TARBALL=$3 REAL_TARBALL=`readlink -f ${ORIG_TARBALL}` WORKING_DIR=`dirname ${ORIG_TARBALL}` ORIG_TARBALL_DIR=`echo ${ORIG_TARBALL} | sed -e "s/_\(${UPSTREAM_VERSION}\)/-\1/g" -e "s/\.tar\.gz//g"` ORIG_TARBALL_DIR_STRIP=`basename ${ORIG_TARBALL_DIR}` mkdir -p ${ORIG_TARBALL_DIR} tar --directory=${ORIG_TARBALL_DIR} --strip 1 -xzf ${REAL_TARBALL} || exit 1 rm -f ${ORIG_TARBALL} ${REAL_TARBALL} rm -rf ${ORIG_TARBALL_DIR}/bin/spec/ GZIP=-9 tar --remove-files --directory ${WORKING_DIR} -czf ${ORIG_TARBALL} ${ORIG_TARBALL_DIR_STRIP} || exit 1 exit 0 debian/rules0000755000000000000000000000031312026666723010255 0ustar #!/usr/bin/make -f # # export DH_VERBOSE=1 PACKAGE = dbtoepub %: dh $@ --parallel override_dh_install: dh_install chmod 644 $(CURDIR)/debian/$(PACKAGE)/usr/lib/ruby/vendor_ruby/dbtoepub/docbook.rb debian/copyright0000644000000000000000000000466512150503661011133 0ustar This package was put together by Daniel Leidert in May 2009. It was downloaded from the Sourceforge.net SVN web service: http://docbook.svn.sf.net/viewvc/docbook/trunk/xsl/epub.tar.gz?view=tar Copyright: Copyright (C) 1999-2007 Norman Walsh Copyright (C) 2003 Jiří Kosek Copyright (C) 2004-2007 Steve Ball Copyright (C) 2005-2013 The DocBook Project Upstream Author: Norman Walsh and other docbook developers at the Sourceforge DocBook Open Repository. License and warranty: MIT/X Consortium License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Except as contained in this notice, the names of individuals credited with contribution to this software shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the individuals in question. Any stylesheet derived from this Software that is publicly distributed will be identified with a different name and the version strings in any derived Software will be changed so that no possibility of confusion between the derived package and this Software will exist. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ============================================================================== The Debian packaging is Copyright (C) 2009-2013 by Daniel Leidert and is licensed under the GPL version 2 or later, see `/usr/share/common-licenses/GPL-2'. debian/source/0000755000000000000000000000000012150503734010466 5ustar debian/source/format0000644000000000000000000000001411754543043011702 0ustar 3.0 (quilt) debian/compat0000644000000000000000000000000211425371152010365 0ustar 7 debian/dbtoepub.docs0000644000000000000000000000000711425371152011642 0ustar README debian/control0000644000000000000000000000176212150503661010576 0ustar Source: dbtoepub Section: text Priority: extra Maintainer: Debian XML/SGML Group Uploaders: Daniel Leidert Build-Depends: debhelper (>> 7.0.50~) Standards-Version: 3.9.4 Homepage: http://docbook.sourceforge.net/release/xsl/current/epub/README Vcs-Browser: http://svn.debian.org/wsvn/debian-xml-sgml/packages/dbtoepub/ Vcs-Svn: svn://svn.debian.org/svn/debian-xml-sgml/packages/dbtoepub/trunk/ Package: dbtoepub Architecture: all Depends: docbook-xsl | docbook-xsl-ns, libxml2-utils, ruby, xsltproc, zip, ${misc:Depends} Replaces: docbook-xsl (<< 1.75.2+dfsg-2) Breaks: docbook-xsl (<< 1.75.2+dfsg-2) Description: DocBook XML to .epub converter dbtoepub is an alpha-quality reference implementation to convert DocBook documents into the .epub format, an open standard for reflowable digital books and publications (e-books). . The .epub format is defined by the IDPF at http://www.idpf.org. debian/patches/0000755000000000000000000000000012150503734010615 5ustar debian/patches/series0000644000000000000000000000004011754543043012032 0ustar 514030_debianize_dbtoepub.patch debian/patches/514030_debianize_dbtoepub.patch0000644000000000000000000000544712026666723016314 0ustar Author: Daniel Leidert Description: The dbtoepub script and its modules need to be debianized. - epub/bin/dbtoepub: The modules are installed into /usr/lib/ruby/vendor_ruby/dbtoepub. - epub/bin/lib/docbook.rb: Create temporary directory with Dir::tmpdir. Use local stylesheet path. Delete output directory. - epub/docbook.xsl: Use local stylesheet paths Bug-Debian: http://bugs.debian.org/514030 Forwarded: no --- a/bin/dbtoepub +++ b/bin/dbtoepub @@ -17,14 +17,11 @@ # layer (imports epub/docbook.xsl). # -v, --verbose Make output verbose. -lib = File.expand_path(File.join(File.dirname(__FILE__), 'lib')) -$LOAD_PATH.unshift(lib) if File.exist?(lib) - require 'fileutils' require 'optparse' require 'tmpdir' -require 'docbook' +require 'dbtoepub/docbook' verbose = false debug = false --- a/bin/lib/docbook.rb +++ b/bin/lib/docbook.rb @@ -1,17 +1,27 @@ require 'fileutils' require 'rexml/parsers/pullparser' +require 'tmpdir' module DocBook class Epub CHECKER = "epubcheck" - STYLESHEET = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', "docbook.xsl")) + STYLESHEET_PATH = File.join('usr/share/xml/docbook/stylesheet', 'docbook-xsl') + STYLESHEET_NS_PATH = File.join('usr/share/xml/docbook/stylesheet', 'docbook-xsl-ns') + if File.directory?(File.expand_path(File.join(File::Separator, STYLESHEET_PATH))) + STYLESHEET = File.expand_path(File.join(File::Separator, STYLESHEET_PATH, 'epub', "docbook.xsl")) + elsif File.directory?(File.expand_path(File.join(File::Separator, STYLESHEET_NS_PATH))) + STYLESHEET = File.expand_path(File.join(File::Separator, STYLESHEET_NS_PATH, 'epub', "docbook.xsl")) + else + fail "Stylesheet path not found. Use the -s switch." + end + fail "Stylesheet #{STYLESHEET} not found. Use the -s switch." unless File.exist?(STYLESHEET) CALLOUT_PATH = File.join('images', 'callouts') - CALLOUT_FULL_PATH = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', CALLOUT_PATH)) + CALLOUT_FULL_PATH = File.expand_path(File.join(File::Separator, STYLESHEET_PATH, CALLOUT_PATH)) CALLOUT_LIMIT = 15 CALLOUT_EXT = ".png" XSLT_PROCESSOR = "xsltproc" - OUTPUT_DIR = ".epubtmp#{Time.now.to_f.to_s}" + OUTPUT_DIR = File.expand_path(File.join(Dir::tmpdir, ".epubtmp#{Time.now.to_f.to_s}")) MIMETYPE = "application/epub+zip" META_DIR = "META-INF" OEBPS_DIR = "OEBPS" @@ -26,7 +36,7 @@ @oebps_dir = File.join(@output_dir, OEBPS_DIR) @css_file = css_file ? File.expand_path(css_file) : css_file @embedded_fonts = embedded_fonts - @to_delete = [] + @to_delete = [OUTPUT_DIR] if customization_layer @stylesheet = File.expand_path(customization_layer) debian/dbtoepub.10000644000000000000000000000221611505472127011061 0ustar .TH "DBTOEPUB" "1" "03/02/2009" .SH NAME dbtoepub \- convert DocBook XML to \.epub .SH SYNOPSIS .B dbtoepub .RI [ OPTIONS ] .RI [ "DocBook Files" ] .SH DESCRIPTION .B dbtoepub converts DocBook and
s into \.epub files. .PP The \.epub format is defined by the IDPF at \fI\%http://www.idpf.org\fR and is made up of 3 standards: .IP \(bu 4 Open Publication Structure (OPS) .IP \(bu 4 Open Packaging Format (OPF) .IP \(bu 4 Open Container Format (OCF) .SH OPTIONS .TP .B \-c, \-\-css \fIFILE\fP Use \fIFILE\fP for CSS on generated XHTML. .TP .B \-d, \-\-debug Show debugging output (enables verbose output too). .TP .B \-f, \-\-font \fIFILE\fP Embed OTF \fIFILE\fP in \.epub. .TP .B \-h, \-\-help Display usage info. .TP .B \-o, \-\-output \fIFILE\fP Output ePub file as \fIFILE\fP. .TP .B \-s, \-\-stylesheet \fIFILE\fP Use the XSL \fIFILE\fP as a customization layer (default \fI\%/usr/share/xml/docbook/stylesheet/docbook-xsl/epub/docbook\.xsl\fP). .TP .B \-v, \-\-verbose Make output verbose. .SH AUTHORS This manual page was written for the Debian GNU/Linux system by \fBDaniel Leidert\fP <\&daniel.leidert@wgdd.de\&> but may be used by others. debian/examples/0000755000000000000000000000000012150503734011004 5ustar debian/examples/test.xml0000644000000000000000000000032211201560157012500 0ustar
Title Test
debian/dbtoepub.install0000644000000000000000000000010312026666063012363 0ustar bin/dbtoepub usr/bin/ bin/lib/* usr/lib/ruby/vendor_ruby/dbtoepub/ debian/changelog0000644000000000000000000000553312150503727011050 0ustar dbtoepub (0+svn9759-1) unstable; urgency=low * New upstream release. * debian/control: Dropped DM-Upload-Allowed field. (Uploaders): Fixed my address. (Standards-Version): Bumped to 3.9.4. * debian/copyright: Updated. -- Daniel Leidert Mon, 27 May 2013 00:08:13 +0200 dbtoepub (0+svn9150-2) unstable; urgency=low * debian/dbtoepub.install: Change installation location to version independent place according to policy (closes: #687366). * debian/rules (override_dh_install): Ditto. -- Daniel Leidert (dale) Thu, 20 Sep 2012 21:26:54 +0200 dbtoepub (0+svn9150-1) unstable; urgency=low * New snapshot based on SVN revision 9150. * debian/control (Standards-Version): Bumped to 3.9.3. (Build-Depends): Dropped dpatch. * debian/copyright: Minor update. * debian/rules: Removed dpatch stuff. * debian/README.source: Dropped useless file. * debian/patches/514030_debianize_dbtoepub.dpatch: Renamed to debian/patches/514030_debianize_dbtoepub.patch. * debian/patches/00list: Renamed to debian/patches/series and adjusted. * debian/source/format: Added for source format 3.0. -- Daniel Leidert (dale) Thu, 17 May 2012 18:31:35 +0200 dbtoepub (0+svn8910-1) unstable; urgency=low * New snapshot based on SVN revision 8910. * debian/dbtoepub.1: Fixed typo (closes: #607566). -- Daniel Leidert (dale) Tue, 08 Feb 2011 17:31:54 +0100 dbtoepub (0+svn8723-1) unstable; urgency=low * New snapshot based on revision 8723. * debian/compat: Bumped to dh compat level 7. * debian/control (Standards-Version): Bumped to 3.9.1. (Build-Depends): Increased dh version. (Conflicts): Fixed conflicts-with-version by moving to Breaks. * debian/dbtoepub.docs: Added. Moved stuff out of debian/rules. * debian/dbtoepub.manpages: Ditto. * debian/rules: Rewritten file for dh 7. -- Daniel Leidert (dale) Mon, 02 Aug 2010 00:15:56 +0200 dbtoepub (0+svn8532-1) unstable; urgency=low * New snapshot based on revision 8532. -- Daniel Leidert (dale) Mon, 21 Dec 2009 02:01:05 +0100 dbtoepub (0+svn8528-1) unstable; urgency=low * New snapshot based on revision 8528. * debian/patches/514030_debianize_dbtoepub.dpatch: Adjusted. -- Daniel Leidert (dale) Sun, 01 Nov 2009 23:28:08 +0100 dbtoepub (0+svn8519-2) unstable; urgency=low * debian/control (Replaces, Conflicts): Fixed docbook-xsl version to conflict with. * debian/README.source: Added for policy compliance. -- Daniel Leidert (dale) Mon, 31 Aug 2009 23:56:04 +0200 dbtoepub (0+svn8519-1) unstable; urgency=low * Initial release. Split this from docbook-xsl (closes: #525808). -- Daniel Leidert (dale) Mon, 24 Aug 2009 19:34:40 +0200