Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 export DH_VERBOSE = 1
3 export PYBUILD_NAME=pyenv
4 export PYENV_SHELL=bash
5 export SHELL=/bin/bash
6
7 export CFLAGS=${CFLAGS:-""}
8 export CPPFLAGS=${CPPFLAGS:-""}
9 export LDFLAGS=${LDFLAGS:-""}
10
11 export BATS_SKIP_VERSION_TESTS=1
12 export BATS_BIN=/usr/bin/bats
13
14 %:
15 dh $@
16 override_dh_auto_install:
17 # Create the directory to install the binaries
18 mkdir -p debian/pyenv-runtime/usr/bin/
19 mkdir -p debian/pyenv-runtime/usr/share/pyenv/libexec/
20 mkdir -p debian/pyenv/usr/share/pyenv/pyenv.d/
21 mkdir -p debian/pyenv/usr/share/pyenv/libexec/
22
23 # Set pyenv variables
24 printf '%s\n' \
25 '#!/bin/bash' \
26 'export PYENV_ROOT="/usr/share/pyenv"' \
27 'export PATH="$$PYENV_ROOT/bin:$$PYENV_ROOT/libexec:$$PATH"' \
28 'exec pyenv "$$@"' \
29 > debian/pyenv-runtime/usr/bin/pyenv
30 chmod 755 debian/pyenv-runtime/usr/bin/pyenv
31
32 override_dh_auto_build:
33 $(MAKE) PYENV_SKIP_DOCKER=1
34
35 execute_after_dh_install:
36 find debian/pyenv/ -name ".gitignore" -delete
37 find debian/pyenv/usr/share/pyenv/plugins/ \
38 -name 'README.md' -delete \
39 -o -name '.gitignore' -delete \
40 -o -name 'LICENSE' -delete \
41 -o -name 'requirements.txt' -delete
42 find debian/pyenv/usr/share/pyenv/plugins/python-build/ \
43 -type d -empty -exec rmdir {} +