Welcome to mirror list, hosted at ThFree Co, Russian Federation.

rules « debian - github.com/dax/jmc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7b0b3d7042dabd5e4d5cee3259e5aa775d25df28 (plain)
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
79
#!/usr/bin/make -f

# This file was automatically generated by stdeb 0.2.a1 at
# Tue, 13 Nov 2007 19:00:04 +0100

PACKAGE_NAME=python-jmc
MODULE_NAME=jmc
DEB_UPSTREAM_VERSION=0.3

PYVERS=$(shell pyversions -vr)

build: build-stamp
build-stamp: $(PYVERS:%=build-python%)
	touch $@
build-python%:
# Force setuptools, but reset sys.argv[0] to 'setup.py' because setup.py files expect that.
	python$* -c "import setuptools,sys;f='setup.py';sys.argv[0]=f;execfile(f,{'__file__':f,'__name__':'__main__'})" build
	touch $@
clean:
	dh_testdir
	dh_testroot
	rm -f *-stamp
	rm -rf dist build
	-find -name '*.py[co]' | xargs rm -f
#	find . -name *.pyc -exec rm {} \;
	dh_clean

install: build install-prereq $(PYVERS:%=install-python%)
install-prereq:
	dh_testdir
	dh_testroot
	dh_clean -k

install-python%:
# Force setuptools, but reset sys.argv[0] to 'setup.py' because setup.py files expect that.
	python$* -c "import setuptools,sys;f='setup.py';sys.argv[0]=f;execfile(f,{'__file__':f,'__name__':'__main__'})" install		 --no-compile --single-version-externally-managed		 --root $(CURDIR)/debian/${PACKAGE_NAME}
	mv debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages/${MODULE_NAME}-${DEB_UPSTREAM_VERSION}-py$*.egg-info		 debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages/${MODULE_NAME}.egg-info

binary-arch:
	
binary-indep: build install
	dh_testdir -i
	dh_testroot -i
	dh_pycentral -i
	dh_install -i
	dh_installinit -i
	dh_install
	dh_installdocs -i
	dh_installdirs -i
	dh_installexamples  -i
	dh_strip -i
	dh_compress -i -X.py
	dh_fixperms -i
	: # Replace all '#!' calls to python with $(PYTHON)
	: # and make them executable
	for i in \
	  `find debian/python-jmc/usr/bin -type f` \
	  `find debian/python-jmc/usr/lib -type f`; \
	do \
	  case "$$i" in *-[0-9].[0-9]) continue; esac; \
	  sed '1s,#!.*python[^ ]*\(.*\),#! /usr/bin/python\1,' \
		$$i > $$i.temp; \
	  if cmp --quiet $$i $$i.temp; then \
	    rm -f $$i.temp; \
	  else \
	    mv -f $$i.temp $$i; \
	    chmod 755 $$i; \
	    echo "fixed interpreter: $$i"; \
	  fi; \
	done
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

binary: binary-indep binary-arch


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