~ubuntu-branches/ubuntu/saucy/dblatex/saucy

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Andreas Hoenen
  • Date: 2012-06-07 15:25:28 UTC
  • mfrom: (0.13.1) (0.11.2) (8.1.10 sid)
  • Revision ID: package-import@ubuntu.com-20120607152528-1giqohxs5qmysb7e
Tags: 0.3.4-1
* New upstream release
  Closes: #675741
* 20_regression_simple_style.patch:
  Fix a regression that breaks simple style.
* 20_regression_zh-cn.patch:
  Fix a regression that breaks some documents with language zh-cn.
* 20_texlive_version_2009.patch:
  Keep the value 2009 for parameter texlive.version, as bigger values result
  in problems.
* Drop patches that have been integrated upstream:
  + 20_dblatex_sys_path.patch
  + 20_debian_errorhandler.patch
  + 20_glossary.patch
  + 20_missed_chars.patch
* debian/rules:
  Use new upstream install layout "deb", which enables us to simplify the
  rules file considerably.
* Remove python-4suite-xml dependency (alternative to xlstproc) as package has
  been removed from unstable (#637334) and as using it as XSLT processor has
  started to run into "out of memory" recently.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
endif
20
20
 
21
21
debiandir := $(realpath $(dir $(strip $(MAKEFILE_LIST))))
22
 
prefix    := $(debiandir)/dblatex
23
 
 
24
 
BIN_DIR     := $(prefix)/usr/bin
25
 
DBLATEX_DIR := $(prefix)/usr/share/dblatex
26
 
PYTHON_DIR  := $(prefix)/usr/lib/$(shell pyversions --default)/dist-packages
27
 
TEX_DIR     := $(prefix)/usr/share/texmf/tex/latex/dblatex
28
 
XSL_DIR     := $(prefix)/usr/share/xml/docbook/stylesheet/dblatex
29
22
 
30
23
PKG_VERS     := $(shell dpkg-parsechangelog -l$(debiandir)/changelog \
31
24
                | grep ^Version: | cut -d' ' -f2 | cut -d- -f1)
38
31
override_dh_clean:
39
32
        rm --force --recursive docs/examples/
40
33
        if [ -d docs/html ]; then mv docs/html docs/xhtml; fi
 
34
        rm --force --recursive dblatex.egg-info/
41
35
        dh_clean
42
36
 
43
37
override_dh_auto_build:
44
38
        # Nothing to be compiled
45
39
 
46
40
override_dh_auto_install:
47
 
        # Call upstream setup.py, but omit dependency checking as it only
48
 
        # applies to the install host, but not to the build host.
49
 
        dh_auto_install -- --nodeps
50
 
 
51
 
        # As upstream installation doesn't match Debian packaging requirements,
52
 
        # its results needs to be tweaked:
53
 
 
54
 
        # Remove documentation installed by upstream as dh_installdocs will do
55
 
        # a better job.
56
 
        rm --force --recursive $(prefix)/usr/share/doc/dblatex/
57
 
 
58
 
        # Add Debian specific main script as it doesn't get installed by
59
 
        # upstream.
60
 
        mkdir --parents $(BIN_DIR)
61
 
        cp --archive lib/contrib/debian/dblatex $(BIN_DIR)/
62
 
 
63
 
        # Add Debian error handler as it doesn't get installed by upstream.
64
 
        mkdir --parents $(PYTHON_DIR)/dbtexmf/contrib/debian
65
 
        cp --archive lib/contrib/debian/errorhandler.py \
66
 
                     $(PYTHON_DIR)/dbtexmf/contrib/debian/
67
 
        touch $(PYTHON_DIR)/dbtexmf/contrib/__init__.py \
68
 
              $(PYTHON_DIR)/dbtexmf/contrib/debian/__init__.py
69
 
 
70
 
        # Move XSLT files from upstream to Debian specific location.
71
 
        mkdir --parents $(XSL_DIR)
72
 
        mv $(DBLATEX_DIR)/xsl $(XSL_DIR)/
73
 
        ln --symbolic ../xml/docbook/stylesheet/dblatex/xsl $(DBLATEX_DIR)/xsl
74
 
 
75
 
        # Move TeX files from upstream to Debian specific location.
76
 
        mkdir --parents $(TEX_DIR)
77
 
        mv $(DBLATEX_DIR)/latex/contrib $(TEX_DIR)/
78
 
        mv $(DBLATEX_DIR)/latex/misc    $(TEX_DIR)/
79
 
        mv $(DBLATEX_DIR)/latex/style   $(TEX_DIR)/
80
 
        ln --symbolic ../../texmf/tex/latex/dblatex/contrib \
81
 
                      $(DBLATEX_DIR)/latex/contrib
82
 
 
83
 
        # Remove upstream files that are already included in other Debian
84
 
        # packages.
85
 
        rm $(TEX_DIR)/misc/passivetex/LICENSE \
86
 
           $(TEX_DIR)/misc/attachfile.sty \
87
 
           $(TEX_DIR)/misc/bibtopic.sty \
88
 
           $(TEX_DIR)/misc/enumitem.sty \
89
 
           $(TEX_DIR)/misc/lastpage.sty \
90
 
           $(TEX_DIR)/misc/ragged2e.sty
 
41
        # Call upstream setup.py with additional parameters:
 
42
        # Choose an install layout suitable for Debian
 
43
        dh_auto_install -- --install-layout=deb
91
44
 
92
45
override_dh_installchangelogs:
93
46
        dh_installchangelogs docs/changes/changes.txt