| 1 |
|
| 2 |
include /usr/share/dpkg/pkg-info.mk |
| 3 |
|
| 4 |
DEB_CM2ANYTHING_LISTOF_ANYTHING = latex xetex html pseudoxml xml man |
| 5 |
|
| 6 |
H2MFLAGS = \ |
| 7 |
--manual="recommonmark Python package" \ |
| 8 |
--source="recommonmark (Debian $(DEB_VERSION))" \ |
| 9 |
--version-string="$(DEB_VERSION)" \ |
| 10 |
--no-info |
| 11 |
|
| 12 |
export PYBUILD_AFTER_INSTALL = \ |
| 13 |
mkdir -p {destdir}/usr/share/man/man1 ;\ |
| 14 |
$(foreach ANYTHING,$(DEB_CM2ANYTHING_LISTOF_ANYTHING), \ |
| 15 |
$(call adhoc_pybuild_after_install_h2m_do,$(ANYTHING)) ;\ |
| 16 |
) |
| 17 |
|
| 18 |
default: |
| 19 |
@uscan --no-conf --dehs --report || true |
| 20 |
|
| 21 |
%: |
| 22 |
dh $@ --buildsystem=pybuild |
| 23 |
|
| 24 |
override_dh_compress-indep: |
| 25 |
dh_compress -Xexamples |
| 26 |
|
| 27 |
override_dh_installdocs: |
| 28 |
dh_installdocs -ppython-recommonmark-doc --doc-main-package=python3-recommonmark |
| 29 |
dh_installdocs --remaining-packages |
| 30 |
|
| 31 |
override_dh_installexamples: |
| 32 |
dh_installexamples -ppython-recommonmark-doc --doc-main-package=python3-recommonmark |
| 33 |
dh_installexamples --remaining-packages |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
cm2latex_DESCRIPTION = "convert CommonMark file to LaTeX source" |
| 39 |
cm2xetex_DESCRIPTION = "convert CommonMark file to XeTeX source" |
| 40 |
cm2html_DESCRIPTION = "convert CommonMark file to HTML document" |
| 41 |
cm2pseudoxml_DESCRIPTION = "convert CommonMark file to pseudo-XML document" |
| 42 |
cm2xml_DESCRIPTION = "convert CommonMark file to XML document" |
| 43 |
cm2man_DESCRIPTION = "convert CommonMark file to man page" |
| 44 |
|
| 45 |
|
| 46 |
adhoc_pybuild_after_install_h2m_do = \ |
| 47 |
LC_ALL=C PYTHONPATH={build_dir}:. help2man $(H2MFLAGS) -s 1 \ |
| 48 |
-I debian/man/cm2a.h2m \ |
| 49 |
-n $(cm2$(1)_DESCRIPTION) \ |
| 50 |
-o {destdir}/usr/share/man/man1/cm2$(1).1 \ |
| 51 |
debian/adhoc/wrappers/cm2$(1) |
| 52 |
|
| 53 |
|