root / debian / rules @ af59d886
History | View | Annotate | Download (4.3 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 |
--with-extstorage-search-path=/srv/ganeti/extstorage,/usr/local/lib/ganeti/extstorage,/usr/lib/ganeti/extstorage,/usr/share/ganeti/extstorage \ |
30 |
--enable-htools --enable-htools-rapi |
31 |
|
32 |
$(MAKE) |
33 |
|
34 |
touch $@ |
35 |
|
36 |
clean: |
37 |
dh_testdir |
38 |
dh_testroot |
39 |
rm -f build-stamp |
40 |
|
41 |
# Add here commands to clean up after the build process. |
42 |
#$(MAKE) clean |
43 |
[ ! -f Makefile ] || $(MAKE) distclean |
44 |
# this is not removed by make distclean :( |
45 |
rm -f ganeti |
46 |
|
47 |
rm -f debian/snf-ganeti.ganeti.init |
48 |
rm -f debian/snf-ganeti.ganeti.cron.d |
49 |
rm -f debian/snf-ganeti.ganeti.default |
50 |
|
51 |
dh_clean |
52 |
|
53 |
install: build |
54 |
dh_testdir |
55 |
dh_testroot |
56 |
dh_prep |
57 |
dh_installdirs |
58 |
|
59 |
# Add here commands to install the package into debian/<packagename>. |
60 |
$(MAKE) install DESTDIR=$(CURDIR)/debian/snf-ganeti |
61 |
cp $(CURDIR)/doc/examples/ganeti.initd $(CURDIR)/debian/snf-ganeti.ganeti.init |
62 |
cp $(CURDIR)/doc/examples/ganeti.cron $(CURDIR)/debian/snf-ganeti.ganeti.cron.d |
63 |
cp $(CURDIR)/doc/examples/ganeti.default $(CURDIR)/debian/snf-ganeti.ganeti.default |
64 |
# No longer needed with ganeti 2.1 |
65 |
#mv $(CURDIR)/debian/snf-ganeti/usr/share/doc/ganeti $(CURDIR)/debian/snf-ganeti/usr/share/doc/snf-ganeti |
66 |
install -m 0644 $(CURDIR)/doc/examples/bash_completion \ |
67 |
$(GANETI_DIR)/etc/bash_completion.d/ganeti |
68 |
install -m 0644 $(CURDIR)/debian/snf-ganeti.overrides \ |
69 |
$(GANETI_DIR)/usr/share/lintian/overrides/snf-ganeti |
70 |
|
71 |
# remove embedded copy of jquery |
72 |
rm -f $(GANETI_DIR)/usr/share/doc/snf-ganeti/html/_static/jsquery.js |
73 |
|
74 |
rmdir $(GANETI_DIR)/var/run/ganeti |
75 |
rmdir $(GANETI_DIR)/var/run |
76 |
|
77 |
# htools |
78 |
mv $(GANETI_DIR)/usr/bin $(HTOOLS_DIR)/usr/ |
79 |
mv $(GANETI_DIR)/usr/lib/ganeti/iallocators/hail \ |
80 |
$(HTOOLS_DIR)/usr/lib/ganeti/iallocators/ |
81 |
|
82 |
mkdir -p $(HTOOLS_DIR)/usr/share/man/man1 |
83 |
for i in htools hail hbal hscan hspace hinfo hcheck; do \ |
84 |
mv $(GANETI_DIR)/usr/share/man/man1/$${i}.1 \ |
85 |
$(HTOOLS_DIR)/usr/share/man/man1/ ; \ |
86 |
done |
87 |
rmdir $(GANETI_DIR)/usr/share/man/man1 |
88 |
|
89 |
# Build architecture-independent files here. |
90 |
binary-indep: build install |
91 |
dh_testdir -i |
92 |
dh_testroot -i |
93 |
dh_installchangelogs -i |
94 |
dh_installdocs -i |
95 |
# dh_installexamples -i |
96 |
# dh_installmenu -i |
97 |
# dh_installdebconf -i |
98 |
# dh_installlogrotate -i |
99 |
# dh_installemacsen -i |
100 |
# dh_installcatalogs -i |
101 |
# dh_installpam -i |
102 |
# dh_installmime -i |
103 |
# Note: dh_pysupport *must* be before dh_installinit, since the daemons |
104 |
# need the python modules as installed by pysupport |
105 |
dh_pysupport |
106 |
dh_installinit --name=ganeti --error-handler=true -- defaults 20 80 -i |
107 |
dh_installcron --name=ganeti -i |
108 |
# dh_installinfo -i |
109 |
# dh_installwm -i |
110 |
# dh_installudev -i |
111 |
# dh_lintian -i |
112 |
# dh_bugfiles -i |
113 |
# dh_undocumented -i |
114 |
dh_installman -i |
115 |
dh_link -i |
116 |
# Note: no compression on the html docs, since it will break navigation |
117 |
dh_compress -Xsnf-ganeti/html/ -i |
118 |
dh_fixperms -i |
119 |
# dh_perl -i |
120 |
dh_installdeb -i |
121 |
dh_gencontrol -i |
122 |
dh_md5sums -i |
123 |
dh_builddeb -i |
124 |
|
125 |
# Build architecture-dependent files here. |
126 |
binary-arch: build install |
127 |
dh_testdir -a |
128 |
dh_testroot -a |
129 |
dh_installchangelogs -a |
130 |
dh_installdocs -a |
131 |
# dh_installexamples -a |
132 |
# dh_install -a |
133 |
# dh_installmenu -a |
134 |
# dh_installdebconf -a |
135 |
# dh_installlogrotate -a |
136 |
# dh_installemacsen -a |
137 |
# dh_installcatalogs -a |
138 |
# dh_installpam -a |
139 |
# dh_installmime -a |
140 |
# dh_installinit -a |
141 |
# dh_installcron -a |
142 |
# dh_installinfo -a |
143 |
# dh_installwm -a |
144 |
# dh_installudev -a |
145 |
# dh_lintian -a |
146 |
# dh_bugfiles -a |
147 |
# dh_undocumented -a |
148 |
dh_installman -a |
149 |
dh_link -a |
150 |
dh_strip -a |
151 |
dh_compress -a |
152 |
dh_fixperms -a |
153 |
# dh_perl -a |
154 |
# dh_makeshlibs -a |
155 |
dh_installdeb -a |
156 |
dh_shlibdeps -a |
157 |
dh_gencontrol -a |
158 |
dh_md5sums -a |
159 |
dh_builddeb -a |
160 |
|
161 |
binary: binary-indep binary-arch |
162 |
.PHONY: build clean binary-indep binary-arch binary install |