File: rules

package info (click to toggle)
glance 2012.1.1-5
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,728 kB
  • sloc: python: 22,220; sh: 369; sql: 232; makefile: 28
file content (37 lines) | stat: -rwxr-xr-x 926 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
#!/usr/bin/make -f

# Verbose mode
#export DH_VERBOSE=1

%:
	dh $@ --with python2

ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	bash run_tests.sh -N || true
endif

override_dh_auto_build:
	dh_auto_build
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	mkdir -p doc/build
	python setup.py build_sphinx
else
	mkdir -p doc/build/html
endif

override_dh_auto_clean:
	dh_auto_clean
	debconf-updatepo
	rm -rf build doc/build glance.egg-info po/glance.pot glance/vcsversion.py
	rm -rf glance.sqlite

get-vcs-source:
	git remote add upstream git://github.com/openstack/glance.git || true
	git fetch upstream
	if ! [ -f ../glance_2012.1.orig.tar.xz ] ; then git archive --prefix=glance-2012.1/ 2012.1 | xz >../glance_2012.1.orig.tar.xz ; fi
	if ! git checkout master ; then \
		echo "No upstream branch: checking out" ; \
		git checkout -b master upstream/master ; \
	fi
	git checkout debian/unstable