| 1 |
#!/usr/bin/make -f |
| 2 |
include /usr/share/dpkg/default.mk |
| 3 |
export PYBUILD_DESTDIR = debian/cdist |
| 4 |
|
| 5 |
%: |
| 6 |
dh $@ --with linktree,sphinxdoc,bash_completion --buildsystem=pybuild |
| 7 |
|
| 8 |
cdist/version.py: |
| 9 |
echo 'VERSION = "$(DEB_VERSION_UPSTREAM)"' > cdist/version.py |
| 10 |
|
| 11 |
override_dh_auto_configure: cdist/version.py |
| 12 |
dh_auto_configure |
| 13 |
|
| 14 |
override_dh_auto_build: cdist/version.py |
| 15 |
# This directory is lost during |
| 16 |
# |
| 17 |
# upstream git -> tarball -> git-buildpackage |
| 18 |
# |
| 19 |
# process, since .gitignore files are excluded by |
| 20 |
# git-archive(1) and tarballs can store empty directories, |
| 21 |
# but git can not. |
| 22 |
# |
| 23 |
# Without this directory, build from git repository fails. |
| 24 |
mkdir -p docs/src/man7 |
| 25 |
$(MAKE) man html |
| 26 |
|
| 27 |
# This file contains instruction how to install cdist system-wide. It |
| 28 |
# gets installed in wrong place and actually redundant. |
| 29 |
execute_after_dh_auto_install: |
| 30 |
find debian/cdist/usr/lib -name 'README' -delete |
| 31 |
|
| 32 |
execute_after_dh_install: |
| 33 |
jdupes --link-soft --recurse debian/cdist-doc |
| 34 |
|
| 35 |
# If something has shebang, then `chmod +x'. But it is important to |
| 36 |
# search only among scripts, since some manpages trigger false-positive |
| 37 |
# (compressed manpages are considered to have single line by head(1), |
| 38 |
# and somewhere in that line #! sometimes occurs) |
| 39 |
execute_after_dh_fixperms: |
| 40 |
find debian/cdist/usr/lib/python3 -type f -execdir \ |
| 41 |
/bin/sh -c '(head -n1 {} | grep -qF "#!") && chmod +x {}' \; |
| 42 |
|
| 43 |
override_dh_auto_clean: cdist/version.py |
| 44 |
$(MAKE) clean |
| 45 |
dh_auto_clean |
| 46 |
rm -rf ./build cdist/version.py |