ed983256d48d880a352a51c2c7fb68ddbacb1218
[apex.git] / build / Makefile
1 ##############################################################################
2 # Copyright (c) 2016 Red Hat Inc.
3 # dradez@redhat.com
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 export USE_MASTER = ""
11 export CENTDNLD = http://mirrors.cat.pdx.edu/centos/7.3.1611/isos/x86_64/CentOS-7-x86_64-DVD-1611.iso
12 export RELEASE = "0"
13
14 export RPM_DIST = $(shell rpm -E %dist)
15
16 export TACKER_REPO := $(shell awk -F\= '/^tacker_repo/ {print $$2}' variables.sh )
17 export TACKER_BRANCH := $(shell awk -F\= '/^tacker_branch/ {print $$2}' variables.sh )
18 export TACKER_COMMIT := $(shell git ls-remote $(TACKER_REPO) $(TACKER_BRANCH) | awk '{print substr($$1,1,7)}')
19
20 export TACKERCLIENT_REPO := $(shell awk -F\= '/^tackerclient_repo/ {print $$2}' variables.sh )
21 export TACKERCLIENT_BRANCH := $(shell awk -F\= '/^tackerclient_branch/ {print $$2}' variables.sh )
22 export TACKERCLIENT_COMMIT := $(shell git ls-remote $(TACKERCLIENT_REPO) $(TACKERCLIENT_BRANCH) | awk '{print substr($$1,1,7)}')
23
24 export CONGRESS_REPO := $(shell awk -F\= '/^congress_repo/ {print $$2}' variables.sh )
25 export CONGRESS_BRANCH := $(shell awk -F\= '/^congress_branch/ {print $$2}' variables.sh )
26 export CONGRESS_COMMIT := $(shell git ls-remote $(CONGRESS_REPO) $(CONGRESS_BRANCH) | awk '{print substr($$1,1,7)}')
27
28 export NETVPP_VERS := $(shell grep Version $(shell pwd)/rpm_specs/networking-vpp.spec | head -n 1 | awk '{ print $$2 }')
29 export NETVPP_REPO := $(shell awk -F\= '/^netvpp_repo/ {print $$2}' variables.sh )
30 export NETVPP_BRANCH := $(shell awk -F\= '/^netvpp_branch/ {print $$2}' variables.sh )
31 export NETVPP_COMMIT := $(shell git ls-remote $(NETVPP_REPO) $(NETVPP_BRANCH) | awk '{print substr($$1,1,7)}')
32
33 export RELRPMVERS = $(shell grep Version $(shell pwd)/rpm_specs/opnfv-apex-release.spec | head -n 1 | awk '{ print $$2 }')
34 export RPMVERS = $(shell grep Version $(shell pwd)/rpm_specs/opnfv-apex.spec | head -n 1 | awk '{ print $$2 }')
35
36 export BUILD_ROOT = $(shell pwd)
37 export BUILD_DIR = $(shell dirname $$(pwd))/.build
38 export CACHE_DIR = $(shell dirname $$(pwd))/.cache
39 export PATCHES_DIR = $(BUILD_ROOT)/patches
40 export QUAGGA_BUILD_DIR = $(BUILD_DIR)/quagga_build_dir
41 export QUAGGA_RPMS_DIR = $(QUAGGA_BUILD_DIR)/rpmbuild
42 export RPM_DIR_ARGS = -D '_topdir $(BUILD_DIR)' -D '_builddir $(BUILD_DIR)' -D '_sourcedir $(BUILD_DIR)' -D '_rpmdir $(BUILD_DIR)' -D '_specdir $(BUILD_DIR)' -D '_srcrpmdir $(BUILD_DIR)'
43
44 export RPMREL = $(BUILD_DIR)/noarch/opnfv-apex-release-$(RPMVERS)-$(shell echo ${RELEASE} | tr -d '_-').noarch.rpm
45 export RPMCOM = $(BUILD_DIR)/noarch/opnfv-apex-common-$(RPMVERS)-$(shell echo ${RELEASE} | tr -d '_-').noarch.rpm
46 export RPMUDR = $(BUILD_DIR)/noarch/opnfv-apex-undercloud-$(RPMVERS)-$(shell echo ${RELEASE} | tr -d '_-').noarch.rpm
47 export RPMODL = $(BUILD_DIR)/noarch/opnfv-apex-$(RPMVERS)-$(shell echo ${RELEASE} | tr -d '_-').noarch.rpm
48 export RPMONO = $(BUILD_DIR)/noarch/opnfv-apex-onos-$(RPMVERS)-$(shell echo ${RELEASE} | tr -d '_-').noarch.rpm
49 export ISO = $(BUILD_DIR)/release/OPNFV-CentOS-7-x86_64-${RELEASE}.iso
50 export CENTISO = $(BUILD_DIR)/$(shell basename $(CENTDNLD))
51
52 .PHONY: all
53 all: iso
54
55 .PHONY: clean
56 clean:
57         rm -rf $(BUILD_DIR)
58
59 .PHONY: clean-cache
60 clean-cache:
61         rm -rf $(CACHE_DIR)
62
63 .PHONY: images
64 images: undercloud overcloud-full overcloud-opendaylight overcloud-onos
65
66 .PHONY: rpms
67 rpms: common-rpm undercloud-rpm opendaylight-rpm onos-rpm
68
69 .PHONY: rpms-check
70 rpms-check: release-rpm-check common-rpm-check undercloud-rpm-check opendaylight-rpm-check onos-rpm-check
71
72 .PHONY: rpms-clean
73 rpms-clean:
74         rm -rf $(BUILD_DIR)/noarch
75         rm -rf $(BUILD_DIR)/BUILDROOT
76
77 $(BUILD_DIR)/opnfv-apex-release.tar.gz:
78         mkdir -p $(BUILD_DIR)
79         pushd ../ && git archive --format=tar.gz --prefix=opnfv-apex-release-$(RELRPMVERS)/ HEAD > $(BUILD_DIR)/opnfv-apex-release.tar.gz
80
81 .PHONY: release-rpm-check
82 release-rpm-check: $(BUILD_DIR)/opnfv-apex-release.tar.gz
83         rpmbuild --clean -bi -bl rpm_specs/opnfv-apex-release.spec $(RPM_DIR_ARGS) -D "release $(shell echo $(RELEASE) | tr -d '_-')"
84
85 .PHONY: release-rpm
86 release-rpm: $(BUILD_DIR)/opnfv-apex-release.tar.gz $(RPMREL)
87
88 $(RPMREL):
89         @echo "Building the Apex Release RPM"
90         # build the release RPM
91         rpmbuild --clean -ba rpm_specs/opnfv-apex-release.spec $(RPM_DIR_ARGS) -D "release $(shell echo $(RELEASE) | tr -d '_-')"
92
93 $(BUILD_DIR)/opnfv-apex-common.tar.gz:
94         pushd ../ && git archive --format=tar.gz --prefix=opnfv-apex-common-$(RPMVERS)/ HEAD > $(BUILD_DIR)/opnfv-apex-common.tar.gz
95
96 .PHONY: common-rpm-check
97 common-rpm-check: $(BUILD_DIR)/opnfv-apex-common.tar.gz
98         rpmbuild --clean -bi -bl rpm_specs/opnfv-apex-common.spec $(RPM_DIR_ARGS) -D "release $(shell echo $(RELEASE) | tr -d '_-')"
99
100 .PHONY: common-rpm
101 common-rpm: $(BUILD_DIR)/opnfv-apex-common.tar.gz $(RPMCOM)
102
103 $(RPMCOM):
104         @echo "Building the Apex Common RPM"
105         # build the common RPM
106         rpmbuild --clean -ba rpm_specs/opnfv-apex-common.spec $(RPM_DIR_ARGS) -D "release $(shell echo $(RELEASE) | tr -d '_-')"
107
108 ##################
109 #  PYTHON TESTS  #
110 ##################
111
112 .PHONY: python-tests
113 python-tests:
114         # clean previous coverage data
115         rm -rf ../tests/.coverage
116         rm -rf ../tests/htmlcov
117         # run nose tests
118         cd ../tests && PYTHONPATH=../lib/python/ nosetests-3.4 . --with-coverage --cover-package apex --cover-package apex_python_utils --cover-html --cover-min-percentage 90
119
120         # generate reports
121         cd ../tests && coverage3 report --include '*lib/python/*' -m
122
123 #######################
124 #  PYTHON PEP8 CHECK  #
125 #######################
126
127 .PHONY: python-pep8-check
128 python-pep8-check:
129         pep8 ../lib/python
130         pep8 ../tests
131
132 ###############
133 #  TACKER     #
134 ###############
135
136 $(BUILD_DIR)/openstack-tacker.tar.gz:
137         @echo "Preparing the Tacker RPM prerequisites"
138         git clone $(TACKER_REPO) -b $(TACKER_BRANCH) $(BUILD_DIR)/openstack-tacker-2016.2
139         cp rpm_specs/openstack-tacker-server.service $(BUILD_DIR)/openstack-tacker-2016.2
140         tar czf $(BUILD_DIR)/openstack-tacker.tar.gz -C $(BUILD_DIR) openstack-tacker-2016.2
141
142 .PHONY: tacker-rpm
143 tacker-rpm: $(BUILD_DIR)/openstack-tacker.tar.gz $(BUILD_DIR)/noarch/openstack-tacker-2016.2-1.git$(TACKER_COMMIT).noarch.rpm
144
145 $(BUILD_DIR)/noarch/openstack-tacker-2016.2-1.git$(TACKER_COMMIT).noarch.rpm:
146         @echo "Building the Tacker RPM"
147         rpmbuild --clean -ba --target noarch rpm_specs/openstack-tacker.spec $(RPM_DIR_ARGS) -D 'git .git$(TACKER_COMMIT)'
148
149 #################
150 #  TACKERCLIENT #
151 #################
152
153 $(BUILD_DIR)/python-tackerclient.tar.gz:
154         @echo "Preparing the TackerClient RPM prerequisites"
155         git clone $(TACKERCLIENT_REPO) -b $(TACKERCLIENT_BRANCH) $(BUILD_DIR)/python-tackerclient-2016.2
156         tar czf $(BUILD_DIR)/python-tackerclient.tar.gz -C $(BUILD_DIR) python-tackerclient-2016.2
157
158 .PHONY: tackerclient-rpm
159 tackerclient-rpm: $(BUILD_DIR)/python-tackerclient.tar.gz $(BUILD_DIR)/noarch/python-tackerclient-2016.2-1.git$(TACKERCLIENT_COMMIT).noarch.rpm
160
161 $(BUILD_DIR)/noarch/python-tackerclient-2016.2-1.git$(TACKERCLIENT_COMMIT).noarch.rpm:
162         @echo "Building the TackerClient RPM"
163         rpmbuild --clean -ba --target noarch rpm_specs/python-tackerclient.spec $(RPM_DIR_ARGS) -D 'git .git$(TACKERCLIENT_COMMIT)'
164
165 ###############
166 #  CONGRESS   #
167 ###############
168
169 .PHONY: congress-clean
170 congress-clean:
171         @rm -rf $(BUILD_DIR)/openstack-congress-2016.2
172         @rm -f $(BUILD_DIR)/openstack-congress.tar.gz
173
174 $(BUILD_DIR)/openstack-congress.tar.gz:
175         @echo "Preparing the Congress RPM prerequisites"
176         git clone $(CONGRESS_REPO) -b $(CONGRESS_BRANCH) $(BUILD_DIR)/openstack-congress-2016.2
177         cp rpm_specs/openstack-congress-server.service $(BUILD_DIR)/openstack-congress-2016.2
178         tar czf $(BUILD_DIR)/openstack-congress.tar.gz -C $(BUILD_DIR) openstack-congress-2016.2
179
180 .PHONY: congress-rpm
181 congress-rpm: $(BUILD_DIR)/noarch/openstack-congress-2016.2-1.git$(CONGRESS_COMMIT).noarch.rpm
182
183 $(BUILD_DIR)/noarch/openstack-congress-2016.2-1.git$(CONGRESS_COMMIT).noarch.rpm: $(BUILD_DIR)/openstack-congress.tar.gz
184         @echo "Building the Congress RPM"
185         rpmbuild --clean -ba --target noarch rpm_specs/openstack-congress.spec $(RPM_DIR_ARGS) -D 'git .git$(CONGRESS_COMMIT)'
186
187 ##################
188 # NETWORKING-VPP #
189 ##################
190
191 $(BUILD_DIR)/python-networking-vpp.tar.gz:
192         @echo "Preparing the networking-vpp RPM prerequisites"
193         git clone $(NETVPP_REPO) $(BUILD_DIR)/python-networking-vpp-$(NETVPP_VERS)
194         tar czf $(BUILD_DIR)/python-networking-vpp.tar.gz -C $(BUILD_DIR) python-networking-vpp-$(NETVPP_VERS)
195
196 .PHONY: networking-vpp-rpm
197 networking-vpp-rpm: $(BUILD_DIR)/noarch/python-networking-vpp-$(NETVPP_VERS)-1.git$(NETVPP_COMMIT)$(RPM_DIST).noarch.rpm
198
199 $(BUILD_DIR)/noarch/python-networking-vpp-$(NETVPP_VERS)-1.git$(NETVPP_COMMIT)$(RPM_DIST).noarch.rpm: $(BUILD_DIR)/python-networking-vpp.tar.gz
200         @echo "Building the Networking VPP RPM"
201         rpmbuild --clean -ba --target noarch rpm_specs/networking-vpp.spec $(RPM_DIR_ARGS) -D 'git .git$(NETVPP_COMMIT)'
202
203 ###############
204 #  UNDERCLOUD #
205 ###############
206
207 .PHONY: undercloud
208 undercloud: $(BUILD_DIR)/undercloud.qcow2
209
210 $(BUILD_DIR)/undercloud.qcow2: tackerclient-rpm
211         @echo "Building the Apex Undercloud Image"
212         @./undercloud.sh
213
214 $(BUILD_DIR)/opnfv-apex-undercloud.tar.gz: $(BUILD_DIR)/undercloud.qcow2
215         @echo "Preparing the Apex Undercloud RPM prerequisites"
216         pushd ../ && git archive --format=tar --prefix=opnfv-apex-undercloud-$(RPMVERS)/ HEAD > $(BUILD_DIR)/opnfv-apex-undercloud.tar
217         tar -rf $(BUILD_DIR)/opnfv-apex-undercloud.tar \
218                --xform="s:.*undercloud.qcow2:opnfv-apex-undercloud-$(RPMVERS)/build/undercloud.qcow2:" $(BUILD_DIR)/undercloud.qcow2
219         gzip -f $(BUILD_DIR)/opnfv-apex-undercloud.tar
220
221 .PHONY: undercloud-rpm-check
222 undercloud-rpm-check: $(BUILD_DIR)/opnfv-apex-undercloud.tar.gz
223         rpmbuild --clean -bi -bl rpm_specs/opnfv-apex-undercloud.spec $(RPM_DIR_ARGS) -D "release $(shell echo $(RELEASE) | tr -d '_-')"
224
225 .PHONY: undercloud-rpm
226 undercloud-rpm: $(BUILD_DIR)/opnfv-apex-undercloud.tar.gz $(RPMUDR)
227
228 $(RPMUDR):
229         @echo "Building the Apex Undercloud RPM"
230         rpmbuild --clean -ba rpm_specs/opnfv-apex-undercloud.spec $(RPM_DIR_ARGS) -D "release $(shell echo $(RELEASE) | tr -d '_-')"
231
232 ###############
233 #  OVERCLOUD  #
234 ###############
235
236 .PHONY: overcloud-full
237 overcloud-full: $(BUILD_DIR)/overcloud-full.qcow2
238
239 $(BUILD_DIR)/overcloud-full.qcow2: congress-rpm tacker-rpm networking-vpp-rpm
240         @echo "Building the Apex Base Overcloud Image"
241         @./overcloud-full.sh
242
243 ###############
244 #    ODL      #
245 ###############
246
247 .PHONY: overcloud-opendaylight
248 overcloud-opendaylight: $(BUILD_DIR)/overcloud-full-opendaylight.qcow2
249
250 $(BUILD_DIR)/overcloud-full-opendaylight.qcow2: $(BUILD_DIR)/overcloud-full.qcow2
251         @echo "Building the Apex OpenDaylight Overcloud Image"
252         @./overcloud-opendaylight.sh
253
254 $(BUILD_DIR)/opnfv-apex.tar.gz: $(BUILD_DIR)/overcloud-full-opendaylight.qcow2
255         tar -czf $(BUILD_DIR)/opnfv-apex.tar.gz --xform="s:.*overcloud-full-opendaylight.qcow2:opnfv-apex-$(RPMVERS)/build/overcloud-full-opendaylight.qcow2:" $(BUILD_DIR)/overcloud-full-opendaylight.qcow2
256
257 .PHONY: opendaylight-rpm-check
258 opendaylight-rpm-check: $(BUILD_DIR)/opnfv-apex.tar.gz
259         rpmbuild --clean -bi -bl rpm_specs/opnfv-apex.spec $(RPM_DIR_ARGS) -D "release $(shell echo $(RELEASE) | tr -d '_-')"
260
261 .PHONY: opendaylight-rpm
262 opendaylight-rpm: $(BUILD_DIR)/opnfv-apex.tar.gz $(RPMODL)
263
264 $(RPMODL):
265         @echo "Building the Apex OpenDaylight RPM"
266         # build the overcloud RPM
267         rpmbuild --clean -ba rpm_specs/opnfv-apex.spec $(RPM_DIR_ARGS) -D "release $(shell echo $(RELEASE) | tr -d '_-')"
268
269 ###############
270 #    ONOS     #
271 ###############
272
273 .PHONY: overcloud-onos
274 overcloud-onos: $(BUILD_DIR)/overcloud-full-onos.qcow2
275
276 $(BUILD_DIR)/overcloud-full-onos.qcow2: $(BUILD_DIR)/overcloud-full.qcow2
277         @echo "Building the Apex ONOS Overcloud Image"
278         @./overcloud-onos.sh
279
280 $(BUILD_DIR)/opnfv-apex-onos.tar.gz: $(BUILD_DIR)/overcloud-full-onos.qcow2
281         tar -czf $(BUILD_DIR)/opnfv-apex-onos.tar.gz --xform="s:.*overcloud-full-onos.qcow2:opnfv-apex-onos-$(RPMVERS)/build/overcloud-full-onos.qcow2:" $(BUILD_DIR)/overcloud-full-onos.qcow2
282
283 .PHONY: onos-rpm-check
284 onos-rpm-check: $(BUILD_DIR)/opnfv-apex-onos.tar.gz
285         rpmbuild --clean -bi -bl rpm_specs/opnfv-apex-onos.spec $(RPM_DIR_ARGS) -D "release $(shell echo $(RELEASE) | tr -d '_-')"
286
287 .PHONY: onos-rpm
288 onos-rpm: $(BUILD_DIR)/opnfv-apex-onos.tar.gz $(RPMONO)
289
290 $(RPMONO):
291         @echo "Building the Apex ONOS RPM"
292         # build the overcloud RPM
293         rpmbuild --clean -ba rpm_specs/opnfv-apex-onos.spec $(RPM_DIR_ARGS) -D "release $(shell echo $(RELEASE) | tr -d '_-')"
294
295 ###############
296 #    ISO      #
297 ###############
298
299 $(CENTISO):
300         curl $(CENTDNLD) -z $(CENTISO) -o $(CENTISO) --verbose --silent --location
301
302 iso-clean:
303         @rm -Rf $(BUILD_DIR)/centos
304         @rm -Rf $(BUILD_DIR)/release
305         @rm -f $(ISO)
306
307 .PHONY: mount-centiso umount-centiso
308 mount-centiso: $(CENTISO)
309         @echo "Mounting CentOS ISO in $(CENTDIR)"
310         @mkdir -p $(CENTDIR)
311         @fuseiso $(CENTISO) $(CENTDIR)
312
313 umount-centiso:
314         @set +e
315         @echo "Unmounting CentOS ISO from $(CENTDIR)"
316         @fusermount -u $(CENTDIR)
317         @rmdir $(CENTDIR)
318         @set -e
319
320 .PHONY: iso
321 iso:    iso-clean images rpms $(CENTISO)
322         @echo "Building the Apex ISO"
323         @mkdir $(BUILD_DIR)/centos $(BUILD_DIR)/release
324         cd $(BUILD_DIR)/centos && bsdtar -xf ../$(shell basename $(CENTISO))
325         # modify the installer iso's contents
326         @chmod -R u+w $(BUILD_DIR)/centos
327         @cp -f isolinux.cfg $(BUILD_DIR)/centos/isolinux/isolinux.cfg
328         @ln $(RPMCOM) $(BUILD_DIR)/centos/Packages
329         @ln $(RPMUDR) $(BUILD_DIR)/centos/Packages
330         @ln $(RPMODL) $(BUILD_DIR)/centos/Packages
331         # add packages to the centos packages
332         cd $(BUILD_DIR)/centos/Packages && yumdownloader openvswitch openstack-tripleo jq python34 python34-libs python34-yaml python34-setuptools ipxe-roms-qemu
333         cd $(BUILD_DIR)/centos/Packages && curl -O https://radez.fedorapeople.org/python34-markupsafe-0.23-9.el7.centos.x86_64.rpm
334         cd $(BUILD_DIR)/centos/Packages && curl -O https://radez.fedorapeople.org/python3-jinja2-2.8-5.el7.centos.noarch.rpm
335         cd $(BUILD_DIR)/centos/Packages && curl -O http://artifacts.opnfv.org/apex/dependencies/python3-ipmi-0.3.0-1.noarch.rpm
336         # regenerate yum repo data
337         @echo "Generating new yum metadata"
338         createrepo --update -g $(BUILD_ROOT)/c7-opnfv-x86_64-comps.xml $(BUILD_DIR)/centos
339         # build the iso
340         @echo "Building OPNFV iso"
341         mkisofs -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -V "OPNFV CentOS 7 x86_64" -R -J -v -T -o $(ISO) $(BUILD_DIR)/centos
342         isohybrid $(ISO)
343         @printf "\n\nISO is built at $(ISO)\n\n"
344
345 ####################
346 #  python3-jinja2  #
347 ####################
348
349 .PHONY: python3-jinja2
350 python3-jinja2: python3-markupsafe
351         cd $(BUILD_DIR) \
352         && curl -O -L artifacts.opnfv.org/apex/dependencies/python-jinja2-2.8-5.fc24.src.rpm \
353         && rpm2cpio python-jinja2-2.8-5.fc24.src.rpm | cpio -idmv \
354         && sed -i 's/python3-devel/python34-devel/' python-jinja2.spec \
355         && sed -i 's/python3-setuptools/python34-setuptools/' python-jinja2.spec \
356         && sed -i 's/python3-pytest/python34-pytest/' python-jinja2.spec \
357         && sed -i 's/python3-markupsafe/python34-markupsafe/' python-jinja2.spec \
358         && rpmbuild -ba python-jinja2.spec $(RPM_DIR_ARGS) -D "with_python3 1"
359
360 ########################
361 #  python3-markupsafe  #
362 ########################
363
364 .PHONY: python3-markupsafe
365 python3-markupsafe:
366         cd $(BUILD_DIR) \
367         && curl -O -L artifacts.opnfv.org/apex/dependencies/python-markupsafe-0.23-9.fc24.src.rpm \
368         && rpm2cpio python-markupsafe-0.23-9.fc24.src.rpm | cpio -idmv \
369         && sed -i 's/python3-devel/python34-devel/' python-markupsafe.spec \
370         && sed -i 's/python3-setuptools/python34-setuptools/' python-markupsafe.spec \
371         && sed -i 's/python3-pytest/python34-pytest/' python-markupsafe.spec \
372         && sed -i 's/python3-markupsafe/python34-markupsafe/' python-markupsafe.spec \
373         && rpmbuild -ba python-markupsafe.spec $(RPM_DIR_ARGS) -D "with_python3 1"
374
375 ##################
376 #  Quagga Clean  #
377 ##################
378 .PHONY: quagga-clean
379 quagga-clean:
380         @rm -rf $(QUAGGA_BUILD_DIR)
381         @sudo yum -y remove zrpc* quagga* c-capnproto* thrift*
382
383 #################
384 #  Quagga+ZRPC  #
385 #################
386 .PHONY: quagga-zrpc
387 quagga-zrpc: quagga-clean thrift-rpm capnproto-rpm quagga-rpm zrpc-rpm
388
389 ##########
390 #  ZRPC  #
391 ##########
392 .PHONY: zrpc-rpm
393 zrpc-rpm: quagga-rpm $(QUAGGA_RPMS_DIR)/zrpcd-%.x86_64.rpm
394
395 $(QUAGGA_RPMS_DIR)/zrpcd-%.x86_64.rpm:
396         @echo "Building ZRPC RPM"
397         @./build_quagga.sh -a zrpc
398
399 ############
400 #  Quagga  #
401 ############
402 .PHONY: quagga-rpm
403 quagga-rpm: $(QUAGGA_RPMS_DIR)/RPMS/x86_64/quagga-1.1.0_%.el7.centos.x86_64.rpm
404
405 $(QUAGGA_RPMS_DIR)/RPMS/x86_64/quagga-1.1.0_%.el7.centos.x86_64.rpm:
406         @echo "Building Quagga RPM"
407         @./build_quagga.sh -a quagga
408
409 ###############
410 #  Capnproto  #
411 ###############
412 .PHONY: capnproto-rpm
413 capnproto-rpm: $(QUAGGA_RPMS_DIR)/RPMS/x86_64/c-capnproto-%.x86_64.rpm
414
415 $(QUAGGA_RPMS_DIR)/RPMS/x86_64/c-capnproto-%.x86_64.rpm:
416         @echo "Building capnproto RPMs"
417         @./build_quagga.sh -a capnproto
418
419 ############
420 #  Thrift  #
421 ############
422
423 .PHONY: thrift-rpm
424 thrift-rpm: $(QUAGGA_RPMS_DIR)/RPMS/x86_64/thrift-%.x86_64.rpm
425
426 $(QUAGGA_RPMS_DIR)/RPMS/x86_64/thrift-%.x86_64.rpm:
427         @echo "Building Thrift RPMs"
428         @./build_quagga.sh -a thrift