Makefile.am 2.01 KB
Newer Older
1
osname=snf-image
Nikos Skalkotos's avatar
Nikos Skalkotos committed
2
3
osdir=$(OS_DIR)/$(osname)
defaultdir=$(DEFAULT_DIR)
4
exampledir = $(datarootdir)/doc/$(PACKAGE)
5
variantsdir=${sysconfdir}/ganeti/snf-image/variants
6
xenscriptsdir=${sysconfdir}/xen/scripts
Nikos Skalkotos's avatar
Nikos Skalkotos committed
7

8
dist_os_SCRIPTS = ${srcdir}/create ${srcdir}/import ${srcdir}/export \
9
	${srcdir}/rename ${srcdir}/verify ${srcdir}/pithcat \
10
	${srcdir}/copy-monitor.py ${srcdir}/helper-monitor.py \
11
	${srcdir}/host-monitor.py ${srcdir}/decode-config.py
12

13
dist_os_DATA = ${srcdir}/ganeti_api_version ${srcdir}/parameters.list \
14
15
               ${srcdir}/variants.list ${srcdir}/xen-common.sh \
               ${srcdir}/kvm-common.sh
Nikos Skalkotos's avatar
Nikos Skalkotos committed
16

17
18
dist_xenscripts_SCRIPTS = ${srcdir}/vif-snf-image

19
dist_bin_SCRIPTS = snf-image-update-helper snf-image-create-helper
20

21
os_DATA = ${srcdir}/common.sh
Nikos Skalkotos's avatar
Nikos Skalkotos committed
22

Nikos Skalkotos's avatar
Nikos Skalkotos committed
23
example_DATA = defaults multistrap.conf version_pinning.pref
24

Nikos Skalkotos's avatar
Nikos Skalkotos committed
25
26
27
28
29
30
edit = sed \
	   -e 's|@sysconfdir[@]|$(sysconfdir)|g' \
	   -e 's|@localstatedir[@]|$(localstatedir)|g' \
	   -e 's|@osdir[@]|$(osdir)|g' \
	   -e 's|@osname[@]|$(osname)|g' \
	   -e 's|@defaultdir[@]|$(defaultdir)|g' \
31
	   -e 's|@VERSION[@]|$(VERSION)|g' \
32
	   -e 's|@VERSION_CHECK[@]|$(VERSION_CHECK)|g' \
33
	   -e 's|@HELPER_DIR[@]|$(HELPER_DIR)|g' \
34
	   -e 's|@HELPER_URL[@]|$(HELPER_URL)|g' \
Nikos Skalkotos's avatar
Nikos Skalkotos committed
35
36
37
38
39
	   -e 's|@AWK[@]|$(AWK)|g' \
	   -e 's|@MKDIR_P[@]|$(MKDIR_P)|g' \
	   -e 's|@LOSETUP[@]|$(LOSETUP)|g' \
	   -e 's|@KPARTX[@]|$(KPARTX)|g' \
	   -e 's|@SFDISK[@]|$(SFDISK)|g' \
40
	   -e 's|@QEMU_IMG[@]|$(QEMU_IMG)|g' \
Nikos Skalkotos's avatar
Nikos Skalkotos committed
41
	   -e 's|@INSTALL_MBR[@]|$(INSTALL_MBR)|g' \
42
	   -e 's|@PROGRESS_MONITOR[@]|$(PROGRESS_MONITOR)|g' \
43
	   -e 's|@UNATTEND[@]|$(UNATTEND)|g' \
44
45
           -e 's|@MULTISTRAP_CONFIG[@]|$(MULTISTRAP_CONFIG)|g' \
           -e 's|@MULTISTRAP_APTPREFDIR[@]|$(MULTISTRAP_APTPREFDIR)|g'
Nikos Skalkotos's avatar
Nikos Skalkotos committed
46

47
%:%.in Makefile
Nikos Skalkotos's avatar
Nikos Skalkotos committed
48
49
50
51
52
53
	rm -f $@ $@.tmp
	srcdir=''; \
		   test -f ./$@.in || srcdir=$(srcdir)/; \
		   $(edit) $${srcdir}$@.in >$@.tmp
	mv $@.tmp $@

54
55
56
57
58
59
install-exec-local:
	@mkdir_p@ "$(DESTDIR)$(osdir)"
	@mkdir_p@ "$(DESTDIR)$(variantsdir)"
	touch "$(DESTDIR)$(variantsdir)/default.conf"
	

60
CLEANFILES = $(os_DATA) $(dist_bin_SCRIPTS) defaults