Newer
Older
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# This file is public domain software, originally written by Joey Hess.
#
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:
dh_testdir
# Add here commands to compile the package.
./autogen.sh
./configure \
--prefix=/usr \
--localstatedir=/var \
--sysconfdir=/etc \
--with-export-dir=/var/lib/ganeti/export \
--with-iallocator-search-path=/usr/local/lib/ganeti/iallocators,/usr/lib/ganeti/iallocators \
--with-os-search-path=/srv/ganeti/os,/usr/local/lib/ganeti/os,/usr/lib/ganeti/os,/usr/share/ganeti/os \
--docdir=/usr/share/doc/snf-ganeti \
--enable-htools
$(MAKE)
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
#$(MAKE) clean
[ ! -f Makefile ] || $(MAKE) distclean
# this is not removed by make distclean :(
rm -f ganeti
rm -f debian/snf-ganeti.ganeti.init
rm -f debian/snf-ganeti.ganeti.cron.d
rm -f debian/snf-ganeti.ganeti.default
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
# Add here commands to install the package into debian/<packagename>.
$(MAKE) install DESTDIR=$(CURDIR)/debian/`dh_listpackages`
cp $(CURDIR)/doc/examples/ganeti.initd $(CURDIR)/debian/snf-ganeti.ganeti.init
cp $(CURDIR)/doc/examples/ganeti.cron $(CURDIR)/debian/snf-ganeti.ganeti.cron.d
cp $(CURDIR)/doc/examples/ganeti.default $(CURDIR)/debian/snf-ganeti.ganeti.default
# No longer needed with ganeti 2.1
#mv $(CURDIR)/debian/snf-ganeti/usr/share/doc/ganeti $(CURDIR)/debian/snf-ganeti/usr/share/doc/snf-ganeti
install -m 0644 $(CURDIR)/doc/examples/bash_completion \
$(CURDIR)/debian/snf-ganeti/etc/bash_completion.d/ganeti
#install -m 0644 $(CURDIR)/debian/snf-ganeti.overrides \
# $(CURDIR)/debian/snf-ganeti/usr/share/lintian/overrides/snf-ganeti
# remove embedded copy of jquery
rm -f $(CURDIR)/debian/snf-ganeti/usr/share/doc/snf-ganeti/html/_static/jsquery.js
rmdir debian/snf-ganeti/var/run/ganeti
rmdir debian/snf-ganeti/var/run
# Build architecture-independent files here.
binary-indep: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
# dh_installexamples
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installcatalogs
# dh_installpam
# dh_installmime
# Note: dh_pysupport *must* be before dh_installinit, since the daemons
# need the python modules as installed by pysupport
dh_pysupport
dh_installinit --name=ganeti --error-handler=true -- defaults 20 80
dh_installcron --name=ganeti
# dh_installinfo
# dh_installwm
# dh_installudev
# dh_lintian
# dh_bugfiles
# dh_undocumented
dh_installman
dh_link
# Note: no compression on the html docs, since it will break navigation
dh_compress -Xsnf-ganeti/html/
dh_fixperms
# dh_perl
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
# 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