added tools dir and node-image-tools
[ovirt-node/TEMP.git] / Makefile.am
blob60237779975c2d8a272f4460044893370f8a7cbc
1 # Copyright (C) 2008 Red Hat, Inc.
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; version 2 of the License.
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10 # GNU General Public License for more details.
12 # You should have received a copy of the GNU General Public License
13 # along with this program; if not, write to the Free Software
14 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
15 # MA  02110-1301, USA.  A copy of the GNU General Public License is
16 # also available at http://www.gnu.org/copyleft/gpl.html.
18 OVIRT_CACHE_DIR ?= $(HOME)/ovirt-cache
19 SUBDIRS = gptsync
21 EXTRA_DIST =                    \
22   .gitignore                    \
23   ovirt-node.spec               \
24   ovirt-node.spec.in            \
25   ovirt-node-selinux.te         \
26   ovirt-node-selinux.fc         \
27   images/grub-splash.xpm.gz     \
28   images/syslinux-vesa-splash.jpg       \
29   nodeadmin/__init__.py         \
30   nodeadmin/adddomain.py        \
31   nodeadmin/addhost.py          \
32   nodeadmin/addpool.py          \
33   nodeadmin/addvolume.py        \
34   nodeadmin/changehost.py       \
35   nodeadmin/configscreen.py     \
36   nodeadmin/createmeter.py      \
37   nodeadmin/createnetwork.py    \
38   nodeadmin/createuser.py       \
39   nodeadmin/definenet.py        \
40   nodeadmin/destroynetwork.py   \
41   nodeadmin/domainconfig.py     \
42   nodeadmin/halworker.py        \
43   nodeadmin/hostconnect.py      \
44   nodeadmin/hostmenu.py         \
45   nodeadmin/libvirtworker.py    \
46   nodeadmin/listdomains.py      \
47   nodeadmin/listnetworks.py     \
48   nodeadmin/listpools.py        \
49   nodeadmin/mainmenu.py         \
50   nodeadmin/menuscreen.py       \
51   nodeadmin/networkconfig.py    \
52   nodeadmin/netmenu.py          \
53   nodeadmin/nodeadmin.py        \
54   nodeadmin/nodemenu.py         \
55   nodeadmin/poolconfig.py       \
56   nodeadmin/removedomain.py     \
57   nodeadmin/removehost.py       \
58   nodeadmin/removepool.py       \
59   nodeadmin/removevolume.py     \
60   nodeadmin/setup.py            \
61   nodeadmin/startdomain.py      \
62   nodeadmin/startpool.py        \
63   nodeadmin/stopdomain.py       \
64   nodeadmin/stoppool.py         \
65   nodeadmin/storagemenu.py      \
66   nodeadmin/undefinenetwork.py  \
67   nodeadmin/userworker.py       \
68   nodeadmin/utils.py            \
69   nodeadmin/volumeconfig.py     \
70   scripts/collectd.conf.in      \
71   scripts/ovirt                 \
72   scripts/ovirt-awake           \
73   scripts/ovirt-config-boot  \
74   scripts/ovirt-config-boot-wrapper  \
75   scripts/ovirt-config-collectd  \
76   scripts/ovirt-config-hostname  \
77   scripts/ovirt-config-iscsi    \
78   scripts/ovirt-config-logging  \
79   scripts/ovirt-config-networking \
80   scripts/ovirt-config-password \
81   scripts/ovirt-config-setup    \
82   scripts/ovirt-config-storage  \
83   scripts/ovirt-config-uninstall \
84   scripts/ovirt-config-view-logs \
85   scripts/ovirt-early           \
86   scripts/ovirt-firstboot       \
87   scripts/ovirt-functions       \
88   scripts/ovirt-install-node-stateful   \
89   scripts/ovirt-install-node-stateless  \
90   scripts/persist                       \
91   scripts/unpersist                     \
92   scripts/ovirt-post            \
93   scripts/ovirt-process-config  \
94   scripts/ovirt-uninstall-node-stateful \
95   kinit/ovirt-kinit             \
96   logrotate/ovirt-logrotate     \
97   logrotate/ovirt-logrotate.conf
99 DISTCLEANFILES = $(PACKAGE)-$(VERSION).tar.gz
101 # For Release: 0..., set _ovirt_dev=1 so that we get extra_release.GIT-
102 # annotated rpm version strings.
103 _ovirt_dev = \
104  $(shell grep -q '^[[:space:]]*Release:[[:space:]]*0' \
105    $(srcdir)/*.spec.in && echo 1 || :)
107 git_head        = $$(git log -1 --pretty=format:%h)
108 GIT_RELEASE     = $$(date --utc +%Y%m%d%H%M%S)git$(git_head)
109 RPMDIR          = $$(rpm --eval '%{_rpmdir}')
110 RPM_FLAGS       = --define "ovirt_cache_dir $(OVIRT_CACHE_DIR)"
111 RPM_FLAGS       += $(if $(_ovirt_dev),--define "extra_release .$(GIT_RELEASE)")
113 rpms: dist
114         rpmbuild $(RPM_FLAGS) -ta $(distdir).tar.gz
116 srpms: dist
117         rpmbuild $(RPM_FLAGS) -ts $(distdir).tar.gz
119 publish: rpms
120         mkdir -p $(OVIRT_CACHE_DIR)
121         rsync -aq $(shell rpm --eval '%{_rpmdir}')/ $(OVIRT_CACHE_DIR)/ovirt/
122         rsync -aq $(shell rpm --eval '%{_srcrpmdir}')/ $(OVIRT_CACHE_DIR)/ovirt/src
123         createrepo $(OVIRT_CACHE_DIR)/ovirt
125 .PHONY: rpms publish srpms