1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/default.mk
include /usr/share/dpkg/architecture.mk
# less debug info to avoid running
# out of address space
ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel))
export DEB_CFLAGS_MAINT_APPEND = -g1
export DEB_CXXFLAGS_MAINT_APPEND = -g1
endif
docpkg := $(DEB_SOURCE)-doc
%:
dh $@
override_dh_install-arch:
dh_install -a
# sed -i 's:/bin/tcsh:/usr/bin/tcsh:g' bin/*
mv bin/starch bin/bedops-starch
mkdir -p debian/$(DEB_SOURCE)/usr/bin/
cp bin/* debian/$(DEB_SOURCE)/usr/bin/
override_dh_installdocs-indep:
cd docs && make html
mkdir -p debian/$(docpkg)/usr/share/doc/$(DEB_SOURCE)
cp -r docs/_build/html debian/$(docpkg)/usr/share/doc/$(DEB_SOURCE)
find debian/$(docpkg)/usr/share/doc/$(DEB_SOURCE)/html/content/usage-examples -type f | xargs sed -i 's;https://cdn[js]*\..*/MathJax.js;../../_static/mathjax.js;g'
find debian/$(docpkg)/usr/share/doc/$(DEB_SOURCE)/html/content -type f | xargs sed -i 's;https://cdn[js]*\..*//MathJax.js;../_static/mathjax.js;g'
find debian/$(docpkg)/usr/share/doc/$(DEB_SOURCE)/html -type f | xargs sed -i 's;https://cdn[js]*\..*/MathJax.js;_static/mathjax.js;g'
ln -s /usr/share/javascript/mathjax/MathJax.js debian/$(docpkg)/usr/share/doc/$(DEB_SOURCE)/html/_static/mathjax.js
dh_installdocs -i
override_dh_installman-arch:
cd bin && for f in * ; do help2man --no-discard-stderr --version-string="$(DEB_VERSION_UPSTREAM)" -o $$f.1 ./$$f; done
dh_installman -a
override_dh_dwz:
# Work around: dwz: Too few files for multifile optimization
echo "Do not run dh_dwz"
override_dh_auto_clean:
dh_auto_clean
rm -rf docs/_build/
|