File: rules

package info (click to toggle)
pyenv 2.6.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,496 kB
  • sloc: sh: 4,914; python: 410; makefile: 161; ansic: 60
file content (43 lines) | stat: -rwxr-xr-x 1,216 bytes parent folder | download
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
#!/usr/bin/make -f
export DH_VERBOSE = 1
export PYBUILD_NAME=pyenv
export PYENV_SHELL=bash
export SHELL=/bin/bash

export CFLAGS=${CFLAGS:-""}
export CPPFLAGS=${CPPFLAGS:-""}
export LDFLAGS=${LDFLAGS:-""}

export BATS_SKIP_VERSION_TESTS=1
export BATS_BIN=/usr/bin/bats

%:
	dh $@
override_dh_auto_install:
# Create the directory to install the binaries
	mkdir -p debian/pyenv-runtime/usr/bin/
	mkdir -p debian/pyenv-runtime/usr/share/pyenv/libexec/
	mkdir -p debian/pyenv/usr/share/pyenv/pyenv.d/
	mkdir -p debian/pyenv/usr/share/pyenv/libexec/

# Set pyenv variables
	printf '%s\n' \
		'#!/bin/bash' \
		'export PYENV_ROOT="/usr/share/pyenv"' \
		'export PATH="$$PYENV_ROOT/bin:$$PYENV_ROOT/libexec:$$PATH"' \
		'exec pyenv "$$@"' \
		> debian/pyenv-runtime/usr/bin/pyenv
	chmod 755 debian/pyenv-runtime/usr/bin/pyenv

override_dh_auto_build:
	$(MAKE) PYENV_SKIP_DOCKER=1

execute_after_dh_install:
	find debian/pyenv/ -name ".gitignore" -delete
	find debian/pyenv/usr/share/pyenv/plugins/  \
	-name 'README.md' -delete \
	-o -name '.gitignore' -delete \
	-o -name 'LICENSE' -delete \
	-o -name 'requirements.txt' -delete
	find debian/pyenv/usr/share/pyenv/plugins/python-build/  \
	-type d -empty -exec rmdir {} +