root / debian / rules @ 04973c88
History | View | Annotate | Download (3.1 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 |
build: build-arch build-indep |
10 |
build-arch: build-stamp |
11 |
build-indep: build-stamp |
12 |
|
13 |
build-stamp: |
14 |
dh_testdir |
15 |
|
16 |
# Add here commands to compile the package. |
17 |
./autogen.sh |
18 |
|
19 |
./configure \ |
20 |
--prefix=/usr \ |
21 |
--localstatedir=/var \ |
22 |
--sysconfdir=/etc \ |
23 |
--with-export-dir=/var/lib/ganeti/export \ |
24 |
--with-iallocator-search-path=/usr/local/lib/ganeti/iallocators,/usr/lib/ganeti/iallocators \ |
25 |
--with-os-search-path=/srv/ganeti/os,/usr/local/lib/ganeti/os,/usr/lib/ganeti/os,/usr/share/ganeti/os \ |
26 |
--docdir=/usr/share/doc/snf-ganeti \ |
27 |
--enable-htools |
28 |
|
29 |
$(MAKE) |
30 |
|
31 |
touch $@ |
32 |
|
33 |
clean: |
34 |
dh_testdir |
35 |
dh_testroot |
36 |
rm -f build-stamp |
37 |
|
38 |
# Add here commands to clean up after the build process. |
39 |
#$(MAKE) clean |
40 |
[ ! -f Makefile ] || $(MAKE) distclean |
41 |
# this is not removed by make distclean :( |
42 |
rm -f ganeti |
43 |
|
44 |
rm -f debian/snf-ganeti.ganeti.init |
45 |
rm -f debian/snf-ganeti.ganeti.cron.d |
46 |
rm -f debian/snf-ganeti.ganeti.default |
47 |
|
48 |
dh_clean |
49 |
|
50 |
install: build |
51 |
dh_testdir |
52 |
dh_testroot |
53 |
dh_prep |
54 |
dh_installdirs |
55 |
|
56 |
# Add here commands to install the package into debian/<packagename>. |
57 |
$(MAKE) install DESTDIR=$(CURDIR)/debian/`dh_listpackages` |
58 |
cp $(CURDIR)/doc/examples/ganeti.initd $(CURDIR)/debian/snf-ganeti.ganeti.init |
59 |
cp $(CURDIR)/doc/examples/ganeti.cron $(CURDIR)/debian/snf-ganeti.ganeti.cron.d |
60 |
cp $(CURDIR)/doc/examples/ganeti.default $(CURDIR)/debian/snf-ganeti.ganeti.default |
61 |
# No longer needed with ganeti 2.1 |
62 |
#mv $(CURDIR)/debian/snf-ganeti/usr/share/doc/ganeti $(CURDIR)/debian/snf-ganeti/usr/share/doc/snf-ganeti |
63 |
install -m 0644 $(CURDIR)/doc/examples/bash_completion \ |
64 |
$(CURDIR)/debian/snf-ganeti/etc/bash_completion.d/ganeti |
65 |
#install -m 0644 $(CURDIR)/debian/snf-ganeti.overrides \ |
66 |
# $(CURDIR)/debian/snf-ganeti/usr/share/lintian/overrides/snf-ganeti |
67 |
|
68 |
# remove embedded copy of jquery |
69 |
rm -f $(CURDIR)/debian/snf-ganeti/usr/share/doc/snf-ganeti/html/_static/jsquery.js |
70 |
|
71 |
rmdir debian/snf-ganeti/var/run/ganeti |
72 |
rmdir debian/snf-ganeti/var/run |
73 |
|
74 |
# Build architecture-independent files here. |
75 |
binary-indep: build install |
76 |
dh_testdir |
77 |
dh_testroot |
78 |
dh_installchangelogs |
79 |
dh_installdocs |
80 |
# dh_installexamples |
81 |
# dh_installmenu |
82 |
# dh_installdebconf |
83 |
# dh_installlogrotate |
84 |
# dh_installemacsen |
85 |
# dh_installcatalogs |
86 |
# dh_installpam |
87 |
# dh_installmime |
88 |
# Note: dh_pysupport *must* be before dh_installinit, since the daemons |
89 |
# need the python modules as installed by pysupport |
90 |
dh_pysupport |
91 |
dh_installinit --name=ganeti --error-handler=true -- defaults 20 80 |
92 |
dh_installcron --name=ganeti |
93 |
# dh_installinfo |
94 |
# dh_installwm |
95 |
# dh_installudev |
96 |
# dh_lintian |
97 |
# dh_bugfiles |
98 |
# dh_undocumented |
99 |
dh_installman |
100 |
dh_link |
101 |
# Note: no compression on the html docs, since it will break navigation |
102 |
dh_compress -Xsnf-ganeti/html/ |
103 |
dh_fixperms |
104 |
# dh_perl |
105 |
dh_installdeb |
106 |
dh_gencontrol |
107 |
dh_md5sums |
108 |
dh_builddeb |
109 |
|
110 |
# Build architecture-dependent files here. |
111 |
binary-arch: build install |
112 |
# We have nothing to do by default. |
113 |
|
114 |
binary: binary-indep binary-arch |
115 |
.PHONY: build clean binary-indep binary-arch binary install |