Statistics
| Branch: | Tag: | Revision:

root / debian / rules @ 6bc94e2b

History | View | Annotate | Download (4.2 kB)

1
#!/usr/bin/make -f
2
# Sample debian/rules that uses debhelper.
3
# This file is public domain software, originally written by Joey Hess.
4
#
5

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

    
9
GANETI_DIR=$(CURDIR)/debian/snf-ganeti
10
HTOOLS_DIR=$(CURDIR)/debian/ganeti-htools
11

    
12
build: build-arch build-indep
13
build-arch: build-stamp
14
build-indep: build-stamp
15

    
16
build-stamp:
17
	dh_testdir
18

    
19
	# Add here commands to compile the package.
20
	./autogen.sh
21
	./configure \
22
	  --prefix=/usr \
23
	  --localstatedir=/var \
24
	  --sysconfdir=/etc \
25
	  --with-export-dir=/var/lib/ganeti/export \
26
	  --with-iallocator-search-path=/usr/local/lib/ganeti/iallocators,/usr/lib/ganeti/iallocators \
27
	  --with-os-search-path=/srv/ganeti/os,/usr/local/lib/ganeti/os,/usr/lib/ganeti/os,/usr/share/ganeti/os \
28
	  --docdir=/usr/share/doc/snf-ganeti \
29
	  --enable-htools --enable-htools-rapi
30

    
31
	$(MAKE)
32

    
33
	touch $@
34

    
35
clean:
36
	dh_testdir
37
	dh_testroot
38
	rm -f build-stamp
39

    
40
	# Add here commands to clean up after the build process.
41
	#$(MAKE) clean
42
	[ ! -f Makefile ] || $(MAKE) distclean
43
	# this is not removed by make distclean :(
44
	rm -f ganeti
45

    
46
	rm -f debian/snf-ganeti.ganeti.init
47
	rm -f debian/snf-ganeti.ganeti.cron.d
48
	rm -f debian/snf-ganeti.ganeti.default
49

    
50
	dh_clean
51

    
52
install: build
53
	dh_testdir
54
	dh_testroot
55
	dh_prep
56
	dh_installdirs
57

    
58
	# Add here commands to install the package into debian/<packagename>.
59
	$(MAKE) install DESTDIR=$(CURDIR)/debian/snf-ganeti
60
	cp $(CURDIR)/doc/examples/ganeti.initd $(CURDIR)/debian/snf-ganeti.ganeti.init
61
	cp $(CURDIR)/doc/examples/ganeti.cron $(CURDIR)/debian/snf-ganeti.ganeti.cron.d
62
	cp $(CURDIR)/doc/examples/ganeti.default $(CURDIR)/debian/snf-ganeti.ganeti.default
63
	# No longer needed with ganeti 2.1
64
	#mv $(CURDIR)/debian/snf-ganeti/usr/share/doc/ganeti $(CURDIR)/debian/snf-ganeti/usr/share/doc/snf-ganeti
65
	install -m 0644 $(CURDIR)/doc/examples/bash_completion \
66
	  $(GANETI_DIR)/etc/bash_completion.d/ganeti
67
	install -m 0644 $(CURDIR)/debian/snf-ganeti.overrides \
68
	  $(GANETI_DIR)/usr/share/lintian/overrides/snf-ganeti
69

    
70
	# remove embedded copy of jquery
71
	rm -f $(GANETI_DIR)/usr/share/doc/snf-ganeti/html/_static/jsquery.js
72

    
73
	rmdir $(GANETI_DIR)/var/run/ganeti
74
	rmdir $(GANETI_DIR)/var/run
75

    
76
	# htools
77
	mv $(GANETI_DIR)/usr/bin $(HTOOLS_DIR)/usr/
78
	mv $(GANETI_DIR)/usr/lib/ganeti/iallocators/hail \
79
	   $(HTOOLS_DIR)/usr/lib/ganeti/iallocators/
80

    
81
	mkdir -p $(HTOOLS_DIR)/usr/share/man/man1
82
	for i in htools hail hbal hscan hspace; do \
83
	  mv $(GANETI_DIR)/usr/share/man/man1/$${i}.1 \
84
	     $(HTOOLS_DIR)/usr/share/man/man1/ ; \
85
	done
86
	rmdir $(GANETI_DIR)/usr/share/man/man1
87

    
88
# Build architecture-independent files here.
89
binary-indep: build install
90
	dh_testdir -i
91
	dh_testroot -i
92
	dh_installchangelogs -i
93
	dh_installdocs -i
94
#	dh_installexamples -i
95
#	dh_installmenu -i
96
#	dh_installdebconf -i
97
#	dh_installlogrotate -i
98
#	dh_installemacsen -i
99
#	dh_installcatalogs -i
100
#	dh_installpam -i
101
#	dh_installmime -i
102
# Note: dh_pysupport *must* be before dh_installinit, since the daemons
103
# need the python modules as installed by pysupport
104
	dh_pysupport
105
	dh_installinit --name=ganeti --error-handler=true -- defaults 20 80 -i
106
	dh_installcron --name=ganeti -i
107
#	dh_installinfo -i
108
#	dh_installwm -i
109
#	dh_installudev -i
110
#	dh_lintian -i
111
#	dh_bugfiles -i
112
#	dh_undocumented -i
113
	dh_installman -i
114
	dh_link -i
115
	# Note: no compression on the html docs, since it will break navigation
116
	dh_compress -Xsnf-ganeti/html/ -i
117
	dh_fixperms -i
118
#	dh_perl -i
119
	dh_installdeb -i
120
	dh_gencontrol -i
121
	dh_md5sums -i
122
	dh_builddeb -i
123

    
124
# Build architecture-dependent files here.
125
binary-arch: build install
126
	dh_testdir -a
127
	dh_testroot -a
128
	dh_installchangelogs -a
129
	dh_installdocs -a
130
#	dh_installexamples -a
131
#	dh_install -a
132
#	dh_installmenu -a
133
#	dh_installdebconf -a
134
#	dh_installlogrotate -a
135
#	dh_installemacsen -a
136
#	dh_installcatalogs -a
137
#	dh_installpam -a
138
#	dh_installmime -a
139
#	dh_installinit -a
140
#	dh_installcron -a
141
#	dh_installinfo -a
142
#	dh_installwm -a
143
#	dh_installudev -a
144
#	dh_lintian -a
145
#	dh_bugfiles -a
146
#	dh_undocumented -a
147
	dh_installman -a
148
	dh_link -a
149
	dh_strip -a
150
	dh_compress -a
151
	dh_fixperms -a
152
#	dh_perl -a
153
#	dh_makeshlibs -a
154
	dh_installdeb -a
155
	dh_shlibdeps -a
156
	dh_gencontrol -a
157
	dh_md5sums -a
158
	dh_builddeb -a
159

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