File: rules

package info (click to toggle)
lio-utils 3.1%2Bgit2.fd0b34fd-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 992 kB
  • sloc: ansic: 7,031; python: 3,039; perl: 885; sh: 414; makefile: 118
file content (48 lines) | stat: -rwxr-xr-x 1,577 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
#!/usr/bin/make -f

build_dir   = build
install_dir = debian/lio-utils



%:
	dh $@ --with python2

override_dh_auto_clean:
	# manually clean any *.pyc files
	find . -name "*.pyc" | xargs rm -f
	find . -name "*.pyo" | xargs rm -f

override_dh_auto_build:
	dh_testdir
	$(MAKE) DESTDIR=$(install_dir) -C tools
	cd tcm-py ; python setup.py build --build-base $(build_dir)/tcm-py/
	cd lio-py ; python setup.py build --build-base $(build_dir)/lio-py/

override_dh_auto_install:
	$(MAKE) DESTDIR=$(CURDIR)/$(install_dir) conf_install;	\
	if [ -d tools ]; then	\
		mkdir -p $(CURDIR)/$(install_dir)/usr/sbin;	\
		$(MAKE) DESTDIR=$(CURDIR)/$(install_dir) -C tools install; \
        fi
	if [ -d mib-modules ]; then	\
		$(MAKE) DESTDIR=$(CURDIR)/$(install_dir) -C mib-modules install;	\
	fi

	cd tcm-py ; python setup.py install --prefix=/usr --no-compile --root=$(CURDIR)/$(install_dir) --install-layout=deb
	cd lio-py ; python setup.py install --prefix=/usr --no-compile --root=$(CURDIR)/$(install_dir) --install-layout=deb

override_dh_link:
	# Hack for now.
	chmod a+x $(CURDIR)/$(install_dir)/usr/share/pyshared/*.py

	# Upstream links a bunch of py's to bins.
	dh_link /usr/share/pyshared/tcm_node.py /usr/sbin/tcm_node
	dh_link /usr/share/pyshared/tcm_loop.py /usr/sbin/tcm_loop
	dh_link /usr/share/pyshared/tcm_dump.py /usr/sbin/tcm_dump
	dh_link /usr/share/pyshared/tcm_fabric.py /usr/sbin/tcm_fabric
	dh_link /usr/share/pyshared/lio_node.py /usr/sbin/lio_node
	dh_link /usr/share/pyshared/lio_dump.py /usr/sbin/lio_dump

override_dh_installinit:
	dh_installinit --name target