File: rules

package info (click to toggle)
python-virtualenv 1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 896 kB
  • ctags: 137
  • sloc: sh: 2,501; python: 1,325; xml: 151; makefile: 51
file content (78 lines) | stat: -rwxr-xr-x 2,263 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

PYTHON_VERSIONS = $(shell pyversions -r debian/control)
CURRENT_PYTHON_VERSION = $(shell pyversions -d)

debian/virtualenv.1.gz: debian/virtualenv.xml
	cd debian && xsltproc -''-nonet /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl virtualenv.xml
	gzip -9 debian/virtualenv.1

build: build-stamp
build-stamp: debian/virtualenv.1.gz
	dh_testdir

	for python in $(PYTHON_VERSIONS); do \
		$$python setup.py build; \
	done

	touch $@

clean:
	dh_testdir
	dh_testroot

	for python in $(PYTHON_VERSIONS); do \
		$$python setup.py clean; \
	done

	rm -rf build
	rm -f build-stamp
	rm -f debian/virtualenv.1*
	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

	for python in $(PYTHON_VERSIONS); do \
		$$python setup.py install --root=$(CURDIR)/debian/python-virtualenv; \
		mv $(CURDIR)/debian/python-virtualenv/usr/bin/virtualenv $(CURDIR)/debian/python-virtualenv/usr/bin/virtualenv-$$python; \
	done
	sed 's_^#\!/usr/bin/$(CURRENT_PYTHON_VERSION)_#\!/usr/bin/python_' < $(CURDIR)/debian/python-virtualenv/usr/bin/virtualenv-$(CURRENT_PYTHON_VERSION) > $(CURDIR)/debian/python-virtualenv/usr/bin/virtualenv
	rm -f $(CURDIR)/debian/python-virtualenv/usr/bin/virtualenv-*

	cp debian/python-virtualenv.overrides ${CURDIR}/debian/python-virtualenv/usr/share/lintian/overrides/python-virtualenv


# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs -i
	dh_installdocs -i
	dh_fixperms -i
	dh_installman -i
	dh_pycentral -i
	rm -rf $(CURDIR)/debian/python-virtualenv/usr/lib
	dh_compress -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: build install

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install