Statistics
| Branch: | Revision:

root / Makefile.am @ deaae996

History | View | Annotate | Download (2.1 kB)

1
linuxcustomdir=${sysconfdir}/ganeti/instance-image/hooks/linux
2

    
3
if WINSUPPORT
4
windowscustomdir=${sysconfdir}/ganeti/instance-image/hooks/windows
5
endif
6

    
7
configdir=${sysconfdir}/ganeti/instance-image
8
variantsdir=${sysconfdir}/ganeti/instance-image/variants
9
networksdir=${sysconfdir}/ganeti/instance-image/networks
10
overlaysdir=${sysconfdir}/ganeti/instance-image/overlays
11
toolsdir=$(osdir)/$(osname)/tools
12

    
13
dist_os_SCRIPTS = create import export rename verify
14
dist_tools_SCRIPTS = tools/*
15
dist_os_DATA = ganeti_api_version parameters.list common_linux.sh common_windows.sh
16
if WINSUPPORT
17
dist_os_DATA += unattend.xml
18
endif
19
dist_config_DATA = variants.list
20
os_DATA = common.sh
21

    
22
dist_linuxcustom_DATA = example/hooks/linux/*
23
if WINSUPPORT
24
dist_windowscustom_DATA = example/hooks/windows/*
25
endif
26
dist_doc_DATA = COPYING NEWS README
27

    
28
EXTRA_DIST = common.sh.in defaults
29

    
30
edit = sed \
31
	   -e 's|@sysconfdir[@]|$(sysconfdir)|g' \
32
	   -e 's|@localstatedir[@]|$(localstatedir)|g' \
33
	   -e 's|@osdir[@]|$(osdir)|g' \
34
	   -e 's|@osname[@]|$(osname)|g' \
35
	   -e 's|@AWK[@]|$(AWK)|g' \
36
	   -e 's|@MKDIR_P[@]|$(MKDIR_P)|g' \
37
	   -e 's|@DUMP[@]|$(DUMP)|g' \
38
	   -e 's|@RESTORE[@]|$(RESTORE)|g' \
39
	   -e 's|@LOSETUP[@]|$(LOSETUP)|g' \
40
	   -e 's|@KPARTX[@]|$(KPARTX)|g' \
41
	   -e 's|@SFDISK[@]|$(SFDISK)|g' \
42
	   -e 's|@QEMU_IMG[@]|$(QEMU_IMG)|g' \
43
	   -e 's|@NTFSCLONE[@]|$(NTFSCLONE)|g' \
44
	   -e 's|@NTFSRESIZE[@]|$(NTFSRESIZE)|g' \
45
	   -e 's|@XMLSTARLET[@]|$(XMLSTARLET)|g' \
46
	   -e 's|@INSTALL_MBR[@]|$(INSTALL_MBR)|g'
47

    
48

    
49
common.sh: $(srcdir)/common.sh.in Makefile
50
	rm -f $@ $@.tmp
51
	srcdir=''; \
52
		   test -f ./$@.in || srcdir=$(srcdir)/; \
53
		   $(edit) $${srcdir}$@.in >$@.tmp
54
	mv $@.tmp $@
55

    
56
install-exec-local:
57
	@mkdir_p@ "$(DESTDIR)$(osdir)/$(osname)"
58
	@mkdir_p@ "$(DESTDIR)$(variantsdir)"
59
	@mkdir_p@ "$(DESTDIR)$(networksdir)/subnets"
60
	@mkdir_p@ "$(DESTDIR)$(networksdir)/instances"
61
	@mkdir_p@ "$(DESTDIR)$(overlaysdir)"
62
	@mkdir_p@ "$(DESTDIR)$(localstatedir)/cache/ganeti-instance-image"
63
	touch "$(DESTDIR)$(variantsdir)/default.conf"
64
	ln -fs $(DESTDIR)$(configdir)/variants.list $(DESTDIR)$(osdir)/variants.list
65

    
66
CLEANFILES = common.sh