c1ff2ff0220d029f814d9a842acf1ad8eb7a143e
[tools/mic.git] / debian / rules
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 ifeq ($(shell cat /etc/issue | cut -d' ' -f2), 11.10)
7         SUBSTVARS = -Vdist:Depends="qemu-arm-static"
8 else
9         SUBSTVARS = -Vdist:Depends="qemu-user-static"
10 endif
11
12
13 build: build-stamp
14 build-stamp:
15         dh_testdir
16
17         python setup.py build
18         make man
19
20 clean:
21         dh_testdir
22         dh_testroot
23         rm -f build-stamp
24
25         dh_clean
26
27 install: build
28         dh_testdir
29         dh_testroot
30         dh_clean -k
31         dh_installdirs
32
33         # Installing package
34         mkdir -p $(CURDIR)/debian/mic $(CURDIR)/debian/mic/usr/bin $(CURDIR)/debian/mic/usr/share/man/man1 $(CURDIR)/debian/mic/etc/bash_completion.d
35         install -m644 doc/mic.1 $(CURDIR)/debian/mic/usr/share/man/man1
36         install -m755 etc/mic.bash $(CURDIR)/debian/mic/etc/bash_completion.d/mic.sh
37         python setup.py install --root=$(CURDIR)/debian/mic
38
39 binary-indep: build install
40         dh_testdir
41         dh_testroot
42         dh_installchangelogs
43         dh_installdocs
44         dh_install
45         dh_installman
46         dh_link
47         dh_strip
48         dh_compress
49         dh_fixperms
50         dh_pysupport
51         dh_installdeb
52         dh_shlibdeps
53         dh_gencontrol -- $(SUBSTVARS)
54         dh_md5sums
55         dh_builddeb
56
57 binary-arch: build install
58
59 binary: binary-indep binary-arch
60 .PHONY: build clean binary-indep binary-arch binary install