File: rules

package info (click to toggle)
sixpack 0.57-4
  • links: PTS
  • area: contrib
  • in suites: etch, etch-m68k
  • size: 1,272 kB
  • ctags: 587
  • sloc: python: 10,074; makefile: 63
file content (97 lines) | stat: -rwxr-xr-x 2,645 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/usr/bin/make -f

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

PYVERS=$(shell pyversions -vr)

build: build-stamp

build-stamp: build-prereq $(PYVERS:%=build-python%)
# This is to force building of the sixpack script without an explicit 
# python version in the #! line.
	python setup.py build_scripts --build-dir=build/scripts || exit 1 ; 
	touch $@
 
build-prereq:
# Rename main program to the Debian name.  This is to avoid a naming conflict
# with a command line program in the EMBOSS suite.  Not the optimal solution 
# but acceptable. (CUS)
	cp -a sixpack.py SIXpack

build-python%:
	dh_testdir
	python$* setup.py build || exit 1;
	touch $@

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp build-python*

	# Clean up after the build process.
	/usr/bin/python setup.py clean
	rm -f *.pyc
# Remove the copied file.
	rm -f SIXpack
	rm -rf build

	dh_clean 

install: build install-prereq install-all-pythons

install-prereq:
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

install-all-pythons: $(PYVERS:%=install-python%)
# This is to force installation of the sixpack script without a specific
# version of python explicitly names in the #! line (Debian idiosyncracy).
# It actually overwrites the scripts installed by each of the install-python% 
# rules below...
	python setup.py install_scripts --force \
	 --install-dir=$(CURDIR)/debian/sixpack/usr/bin \
	 --build-dir=build/scripts || exit 1 ;
	cp -a xbms/* $(CURDIR)/debian/sixpack/usr/share/SIXpack/
	cp -a splogo.gif $(CURDIR)/debian/sixpack/usr/share/SIXpack/splogo.gif
	cp -a test.inp $(CURDIR)/debian/sixpack/usr/share/SIXpack/
	cp -a mnexafsfit.iff $(CURDIR)/debian/sixpack/usr/share/SIXpack/
	dh_install debian/SIXpack.xpm usr/share/pixmaps
	dh_install debian/SIXpack.desktop usr/share/applications

install-python%:
	# Install the package into debian/sixpack.
	dh_installdirs usr/lib/python$* usr/lib/python$*/site-packages
	python$* setup.py install \
	 --prefix=$(CURDIR)/debian/sixpack/usr || exit 1;
	-find $(CURDIR)/debian/ -name '*.py[co]' | xargs rm -f

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir -i
	dh_testroot -i
	dh_installdocs -i 
	dh_installexamples -i
	dh_installmenu -i
	dh_installman -i
	dh_installinfo -i
	dh_installchangelogs -i
	dh_pycentral
	dh_link -i
	dh_strip -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_shlibdeps -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: build install
# We have nothing to do by default.

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