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
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 \
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 \
69 nodeadmin/volumeconfig.py \
70 scripts/collectd.conf.in \
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 \
86 scripts/ovirt-firstboot \
87 scripts/ovirt-functions \
88 scripts/ovirt-install-node-stateful \
89 scripts/ovirt-install-node-stateless \
93 scripts/ovirt-process-config \
94 scripts/ovirt-uninstall-node-stateful \
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.
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)")
114 rpmbuild $(RPM_FLAGS) -ta $(distdir).tar.gz
117 rpmbuild $(RPM_FLAGS) -ts $(distdir).tar.gz
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