de369c7dfbfc75290553aa398f8d6688382abb22
[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.2.1511/isos/x86_64/CentOS-7-x86_64-DVD-1511.iso
12 export CENTISO = $(shell pwd)/$(shell basename $(CENTDNLD))
13 export RELEASE = "0"
14 export ISO = $(shell pwd)/release/OPNFV-CentOS-7-x86_64-${RELEASE}.iso
15 export RPMVERS = $(shell grep Version $(shell pwd)/rpm_specs/opnfv-apex.spec | head -n 1 | awk '{ print $$2 }')
16 export RPMCOM = $(shell pwd)/noarch/opnfv-apex-common-$(RPMVERS)-$(shell echo ${RELEASE} | tr -d '_-').noarch.rpm
17 export RPMUDR = $(shell pwd)/noarch/opnfv-apex-undercloud-$(RPMVERS)-$(shell echo ${RELEASE} | tr -d '_-').noarch.rpm
18 export RPMODL = $(shell pwd)/noarch/opnfv-apex-$(RPMVERS)-$(shell echo ${RELEASE} | tr -d '_-').noarch.rpm
19 export RPMONO = $(shell pwd)/noarch/opnfv-apex-onos-$(RPMVERS)-$(shell echo ${RELEASE} | tr -d '_-').noarch.rpm
20 export RPMSFC = $(shell pwd)/noarch/opnfv-apex-opendaylight-sfc-$(RPMVERS)-$(shell echo ${RELEASE} | tr -d '_-').noarch.rpm
21
22 all_networks="admin_network private_network storage_network external_network api_network"
23
24
25
26 .PHONY: all
27 all: iso
28
29 .PHONY: clean
30 clean: images-clean rpms-clean iso-clean tacker-clean congress-clean vpp-clean
31
32 .PHONY: images
33 images: undercloud overcloud-full overcloud-opendaylight overcloud-onos overcloud-opendaylight-sfc
34
35 .PHONY: images-clean
36 images-clean: undercloud-clean overcloud-full-clean overcloud-opendaylight-clean overcloud-onos-clean overcloud-opendaylight-sfc-clean
37         @rm -rf images/
38
39 .PHONY: rpms
40 rpms: common-rpm undercloud-rpm opendaylight-rpm onos-rpm opendaylight-sfc-rpm
41
42 .PHONY: rpms-check
43 rpms-check: common-rpm-check undercloud-rpm-check opendaylight-rpm-check onos-rpm-check opendaylight-sfc-rpm-check
44
45 .PHONY: rpms-clean
46 rpms-clean: common-rpm-clean undercloud-rpm-clean opendaylight-rpm-clean onos-rpm-clean opendaylight-sfc-rpm-clean
47
48 opnfv-apex-common.tar.gz:
49         pushd ../ && git archive --format=tar.gz --prefix=opnfv-apex-common-$(RPMVERS)/ HEAD > build/opnfv-apex-common.tar.gz
50
51 .PHONY: common-rpm-check
52 common-rpm-check: opnfv-apex-common.tar.gz
53         rpmbuild --clean -bi -bl rpm_specs/opnfv-apex-common.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D "release $(shell echo $(RELEASE) | tr -d '_-')"
54
55 .PHONY: common-rpm
56 common-rpm: opnfv-apex-common.tar.gz $(RPMCOM)
57
58 $(RPMCOM):
59         @echo "Building the Apex Common RPM"
60         # build the common RPM
61         rpmbuild --clean -ba rpm_specs/opnfv-apex-common.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D "release $(shell echo $(RELEASE) | tr -d '_-')"
62
63 ##################
64 #  PYTHON TESTS  #
65 ##################
66
67 .PHONY: python-tests
68 python-tests:
69         # clean previous coverage data
70         rm -rf ../tests/.coverage
71         rm -rf ../tests/htmlcov
72         # run nose tests
73         cd ../tests && PYTHONPATH=../lib/python/ nosetests-3.4 . --with-coverage --cover-package apex --cover-package apex_python_utils --cover-html --cover-min-percentage 85
74
75         # generate reports
76         cd ../tests && coverage3 report --include '*lib/python/*' -m
77
78 #######################
79 #  PYTHON PEP8 CHECK  #
80 #######################
81
82 .PHONY: python-pep8-check
83 python-pep8-check:
84         pep8 ../lib/python
85         pep8 ../tests
86
87 ###############
88 #  TACKER     #
89 ###############
90
91 .PHONY: tacker-clean
92
93 tacker-clean:
94         @rm -rf openstack-tacker-2015.2
95         @rm -f openstack-tacker.tar.gz
96
97 openstack-tacker.tar.gz:
98         @echo "Preparing the Tacker RPM prerequisites"
99         git clone http://github.com/trozet/tacker -b SFC_colorado openstack-tacker-2015.2
100         tar czf openstack-tacker.tar.gz openstack-tacker-2015.2
101
102 .PHONY: tacker-rpm
103 tacker-rpm: openstack-tacker.tar.gz openstack-tacker-2015.2-1.trozet.noarch.rpm
104
105 openstack-tacker-2015.2-1.trozet.noarch.rpm:
106         @echo "Building the Tacker RPM"
107         rpmbuild --clean -bb --target noarch rpm_specs/openstack-tacker.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)'
108
109 #################
110 #  TACKERCLIENT #
111 #################
112
113 .PHONY: tackerclient-clean
114
115 tackerclient-clean:
116         @rm -rf python-tackerclient-2015.2
117         @rm -f python-tackerclient.tar.gz
118
119 python-tackerclient.tar.gz:
120         @echo "Preparing the TackerClient RPM prerequisites"
121         git clone http://github.com/trozet/python-tackerclient -b SFC_refactor python-tackerclient-2015.2
122         tar czf python-tackerclient.tar.gz python-tackerclient-2015.2
123
124 .PHONY: tackerclient-rpm
125 tackerclient-rpm: python-tackerclient.tar.gz python-tackerclient-2015.2-1.trozet.noarch.rpm
126
127 python-tackerclient-2015.2-1.trozet.noarch.rpm:
128         @echo "Building the TackerClient RPM"
129         rpmbuild --clean -bb --target noarch rpm_specs/python-tackerclient.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)'
130
131 ###############
132 #  CONGRESS   #
133 ###############
134
135 .PHONY: congress-clean
136
137 congress-clean:
138         @rm -rf openstack-congress-2016.1
139         @rm -f openstack-congress.tar.gz
140
141 openstack-congress.tar.gz:
142         @echo "Preparing the Congress RPM prerequisites"
143         git clone http://github.com/openstack/congress -b stable/mitaka openstack-congress-2016.1
144         cd openstack-congress-2016.1 && curl -O https://radez.fedorapeople.org/openstack-congress.service
145         tar czf openstack-congress.tar.gz openstack-congress-2016.1
146
147 .PHONY: congress-rpm
148 congress-rpm: openstack-congress.tar.gz openstack-congress-2016.1-1.noarch.rpm
149
150 openstack-congress-2016.1-1.noarch.rpm:
151         @echo "Building the Congress RPM"
152         rpmbuild --clean -bb --target noarch rpm_specs/openstack-congress.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)'
153
154 ###############
155 #     VPP     #
156 ###############
157
158 VPP_DIR = vpp
159 MAVEN = apache-maven-3.3.9
160 MAVEN_FILE = $(MAVEN)-bin.tar.gz
161
162 .PHONY: vpp-clean
163 vpp-clean:
164         @rm -f vpp-bin.tar.gz
165         @rm -rf vpp-bin vpp
166         @rm -rf honeycomb $(MAVEN) $(MAVEN_FILE) honeycomb-1.0.0-99.noarch.rpm
167         @rm -rf networking-vpp networking-vpp.noarch.rpm
168
169 .PHONY: vpp-build
170 vpp-build: vpp-bin.tar.gz
171
172 vpp-bin.tar.gz: vpp honeycomb $(MAVEN)
173         $(MAKE) -C $(VPP_DIR) UNATTENDED=yes install-dep bootstrap build pkg-rpm
174         $(MAKE) -C $(VPP_DIR)/build-root PLATFORM=vpp TAG=vpp_debug vpp-api-install
175         pushd vpp/vpp-api/python && python setup.py bdist
176         pushd vpp/build-root/build-vpp-native/vpp-api/java/ && ../../../../../$(MAVEN)/bin/mvn install:install-file -Dfile=jvpp-registry-16.12.jar -DgroupId=io.fd.vpp -DartifactId=jvpp-registry -Dversion=16.12-SNAPSHOT -Dpackaging=jar
177         pushd vpp/build-root/build-vpp-native/vpp-api/java/ && ../../../../../$(MAVEN)/bin/mvn install:install-file -Dfile=jvpp-core-16.12.jar -DgroupId=io.fd.vpp -DartifactId=jvpp-core -Dversion=16.12-SNAPSHOT -Dpackaging=jar
178         pushd honeycomb && ../$(MAVEN)/bin/mvn clean install -DskipTests
179         pushd honeycomb/packaging/rpm/ && BUILD_NUMBER=99 ./rpmbuild.sh
180         mkdir vpp-bin
181         mv vpp/build-root/*.rpm vpp-bin/
182         mv honeycomb/packaging/rpm/RPMS/noarch/*.rpm .
183         mv vpp/vpp-api/python/dist/*.tar.gz vpp-bin/
184         tar czf vpp-bin.tar.gz vpp-bin
185
186 vpp:
187         git clone https://gerrit.fd.io/r/vpp
188
189 honeycomb:
190         git clone https://gerrit.fd.io/r/p/honeycomb.git
191
192 $(MAVEN): $(MAVEN_FILE)
193         tar zxvf apache-maven-3.3.9-bin.tar.gz
194         cp mvn_settings.xml $(MAVEN)/conf/settings.xml
195
196 $(MAVEN_FILE):
197         wget http://www.webhostingjams.com/mirror/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
198
199 .PHONY: networking-vpp-rpm
200 networking-vpp-rpm: networking-vpp.noarch.rpm
201
202 networking-vpp.noarch.rpm: networking-vpp
203         pushd networking-vpp && python setup.py bdist_rpm --binary-only
204         mv networking-vpp/dist/*.rpm networking-vpp.noarch.rpm
205
206 networking-vpp:
207         git clone -b stable_vlan_rewrite https://github.com/fepan/networking-vpp.git
208
209 ###############
210 #  UNDERCLOUD #
211 ###############
212
213 .PHONY: undercloud-clean
214 undercloud-clean:
215         @rm -f images/undercloud.*
216
217 .PHONY: undercloud
218 undercloud: images/undercloud.qcow2
219
220 images/undercloud.qcow2: tackerclient-rpm
221         @echo "Building the Apex Undercloud Image"
222         @./undercloud.sh
223
224 opnfv-apex-undercloud.tar.gz: images/undercloud.qcow2
225         @echo "Preparing the Apex Undercloud RPM prerequisites"
226         pushd ../ && git archive --format=tar --prefix=opnfv-apex-undercloud-$(RPMVERS)/ HEAD > build/opnfv-apex-undercloud.tar
227         tar -rf opnfv-apex-undercloud.tar \
228                --xform="s:images/undercloud.qcow2:opnfv-apex-undercloud-$(RPMVERS)/build/undercloud.qcow2:" images/undercloud.qcow2
229         gzip -f opnfv-apex-undercloud.tar
230
231 .PHONY: undercloud-rpm-check
232 undercloud-rpm-check: opnfv-apex-undercloud.tar.gz
233         rpmbuild --clean -bi -bl rpm_specs/opnfv-apex-undercloud.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D "release $(shell echo $(RELEASE) | tr -d '_-')"
234
235 .PHONY: undercloud-rpm
236 undercloud-rpm: opnfv-apex-undercloud.tar.gz $(RPMUDR)
237
238 $(RPMUDR):
239         @echo "Building the Apex Undercloud RPM"
240         rpmbuild --clean -ba rpm_specs/opnfv-apex-undercloud.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D "release $(shell echo $(RELEASE) | tr -d '_-')"
241
242 ###############
243 #  OVERCLOUD  #
244 ###############
245
246 .PHONY: overcloud-full-clean
247 overcloud-full-clean:
248         @rm -rf images/overcloud-full.d
249         @rm -f images/overcloud-full.*
250
251 .PHONY: overcloud-full
252 overcloud-full: images/overcloud-full.qcow2
253
254 images/overcloud-full.qcow2: tacker-rpm tackerclient-rpm congress-rpm networking-vpp-rpm
255         @echo "Building the Apex Base Overcloud Image"
256         @./overcloud-full.sh
257
258 ###############
259 #    ODL      #
260 ###############
261
262 .PHONY: overcloud-opendaylight-clean
263 overcloud-opendaylight-clean:
264         @rm -f images/overcloud-full-opendaylight.qcow2
265
266 .PHONY: overcloud-opendaylight
267 overcloud-opendaylight: images/overcloud-full-opendaylight.qcow2
268
269 images/overcloud-full-opendaylight.qcow2: images/overcloud-full.qcow2
270         @echo "Building the Apex OpenDaylight Overcloud Image"
271         @./overcloud-opendaylight.sh
272
273 opnfv-apex.tar.gz: images/overcloud-full-opendaylight.qcow2
274         tar -czf opnfv-apex.tar.gz --xform="s:images/overcloud-full-opendaylight.qcow2:opnfv-apex-$(RPMVERS)/build/images/overcloud-full-opendaylight.qcow2:" images/overcloud-full-opendaylight.qcow2
275
276 .PHONY: opendaylight-rpm-check
277 opendaylight-rpm-check: opnfv-apex.tar.gz
278         rpmbuild --clean -bi -bl rpm_specs/opnfv-apex.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D "release $(shell echo $(RELEASE) | tr -d '_-')"
279
280 .PHONY: opendaylight-rpm
281 opendaylight-rpm: opnfv-apex.tar.gz $(RPMODL)
282
283 $(RPMODL):
284         @echo "Building the Apex OpenDaylight RPM"
285         # build the overcloud RPM
286         rpmbuild --clean -ba rpm_specs/opnfv-apex.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D "release $(shell echo $(RELEASE) | tr -d '_-')"
287
288 ###############
289 #    ONOS     #
290 ###############
291
292 .PHONY: overcloud-onos-clean
293 overcloud-onos-clean:
294         @rm -f images/overcloud-full-onos.qcow2
295         @rm -rf images/puppet-onos
296         @rm -f images/puppet-onos.tar.gz
297
298 .PHONY: overcloud-onos
299 overcloud-onos: images/overcloud-full-onos.qcow2
300
301 images/overcloud-full-onos.qcow2: images/overcloud-full.qcow2
302         @echo "Building the Apex ONOS Overcloud Image"
303         @./overcloud-onos.sh
304
305 .PHONY: onos-rpm-clean
306 onos-rpm-clean:
307         @rpmbuild --clean rpm_specs/opnfv-apex-onos.spec -D "release $(shell echo $RELEASE | tr -d '_-')"
308
309 opnfv-apex-onos.tar.gz: images/overcloud-full-onos.qcow2
310         tar -czf opnfv-apex-onos.tar.gz --xform="s:images/overcloud-full-onos.qcow2:opnfv-apex-onos-$(RPMVERS)/build/images/overcloud-full-onos.qcow2:" images/overcloud-full-onos.qcow2
311
312 .PHONY: onos-rpm-check
313 onos-rpm-check: opnfv-apex-onos.tar.gz
314         rpmbuild --clean -bi -bl rpm_specs/opnfv-apex-onos.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D "release $(shell echo $(RELEASE) | tr -d '_-')"
315
316 .PHONY: onos-rpm
317 onos-rpm: opnfv-apex-onos.tar.gz $(RPMONO)
318
319 $(RPMONO):
320         @echo "Building the Apex ONOS RPM"
321         # build the overcloud RPM
322         rpmbuild --clean -ba rpm_specs/opnfv-apex-onos.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D "release $(shell echo $(RELEASE) | tr -d '_-')"
323
324 ###############
325 #   ODL-SFC   #
326 ###############
327
328 .PHONY: overcloud-opendaylight-sfc-clean
329 overcloud-opendaylight-sfc-clean:
330         @rm -f images/overcloud-full-opendaylight-sfc.qcow2
331
332 .PHONY: overcloud-opendaylight-sfc
333 overcloud-opendaylight-sfc: images/overcloud-full-opendaylight-sfc.qcow2
334
335 images/overcloud-full-opendaylight-sfc.qcow2: images/overcloud-full-opendaylight.qcow2
336         @echo "Building the Apex OpenDaylight Overcloud Image"
337         @./overcloud-opendaylight-sfc.sh
338
339 opnfv-apex-opendaylight-sfc.tar.gz: images/overcloud-full-opendaylight-sfc.qcow2
340         tar -czf opnfv-apex-opendaylight-sfc.tar.gz --xform="s:images/overcloud-full-opendaylight-sfc.qcow2:opnfv-apex-opendaylight-sfc-$(RPMVERS)/build/images/overcloud-full-opendaylight-sfc.qcow2:" images/overcloud-full-opendaylight-sfc.qcow2
341
342 .PHONY: opendaylight-sfc-rpm-check
343 opendaylight-sfc-rpm-check: opnfv-apex-opendaylight-sfc.tar.gz
344         rpmbuild --clean -bi -bl rpm_specs/opnfv-apex-opendaylight-sfc.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D "release $(shell echo $(RELEASE) | tr -d '_-')"
345
346 .PHONY: opendaylight-sfc-rpm
347 opendaylight-sfc-rpm: opnfv-apex-opendaylight-sfc.tar.gz $(RPMSFC)
348
349 $(RPMSFC):
350         @echo "Building the Apex OpenDaylight SFC RPM"
351         rpmbuild --clean -ba rpm_specs/opnfv-apex-opendaylight-sfc.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D "release $(shell echo $(RELEASE) | tr -d '_-')"
352
353 ###############
354 #    ISO      #
355 ###############
356
357 $(CENTISO):
358         curl $(CENTDNLD) -z $(CENTISO) -o $(CENTISO) --verbose --silent --location
359
360 .PHONY: iso-clean
361 iso-clean:
362         @rm -Rf centos
363         @rm -Rf release
364         @rm -f $(ISO)
365
366 .PHONY: mount-centiso umount-centiso
367 mount-centiso: $(CENTISO)
368         @echo "Mounting CentOS ISO in $(CENTDIR)"
369         @mkdir -p $(CENTDIR)
370         @fuseiso $(CENTISO) $(CENTDIR)
371
372 umount-centiso:
373         @set +e
374         @echo "Unmounting CentOS ISO from $(CENTDIR)"
375         @fusermount -u $(CENTDIR)
376         @rmdir $(CENTDIR)
377         @set -e
378
379 .PHONY: iso
380 iso:    iso-clean images rpms $(CENTISO)
381         @echo "Building the Apex ISO"
382         @mkdir centos release
383         cd centos && bsdtar -xf ../$(shell basename $(CENTISO))
384         # modify the installer iso's contents
385         @chmod -R u+w centos
386         @cp -f isolinux.cfg centos/isolinux/isolinux.cfg
387         @ln $(RPMCOM) centos/Packages
388         @ln $(RPMUDR) centos/Packages
389         @ln $(RPMODL) centos/Packages
390         @ln $(RPMONO) centos/Packages
391         @ln $(RPMSFC) centos/Packages
392         # add packages to the centos packages
393         cd centos/Packages && yumdownloader openvswitch
394         cd centos/Packages && yumdownloader openstack-tripleo
395         cd centos/Packages && yumdownloader jq
396         cd centos/Packages && yumdownloader python34
397         cd centos/Packages && yumdownloader python34-libs
398         cd centos/Packages && yumdownloader python34-yaml
399         cd centos/Packages && yumdownloader python34-setuptools
400         cd centos/Packages && yumdownloader ipxe-roms-qemu
401         cd centos/Packages && curl -O https://radez.fedorapeople.org/python34-markupsafe-0.23-9.el7.centos.x86_64.rpm
402         cd centos/Packages && curl -O https://radez.fedorapeople.org/python3-jinja2-2.8-5.el7.centos.noarch.rpm
403         # regenerate yum repo data
404         @echo "Generating new yum metadata"
405         createrepo --update -g ../c7-opnfv-x86_64-comps.xml centos
406         # build the iso
407         @echo "Building OPNFV iso"
408         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) centos
409         isohybrid $(ISO)
410         @printf "\n\nISO is built at $(ISO)\n\n"
411
412 ####################
413 #  python3-jinja2  #
414 ####################
415
416 .PHONY: python3-jinja2
417 python3-jinja2: python3-markupsafe python-jinja2-2.8-5.fc24.src.rpm
418         curl -O http://ftp.linux.ncsu.edu/pub/fedora/linux//development/24/Everything/source/tree/Packages/p/python-jinja2-2.8-5.fc24.src.rpm
419         rpm2cpio python-jinja2-2.8-5.fc24.src.rpm | cpio -idmv
420         sed -i 's/python3-devel/python34-devel/' python-jinja2.spec
421         sed -i 's/python3-setuptools/python34-setuptools/' python-jinja2.spec
422         sed -i 's/python3-pytest/python34-pytest/' python-jinja2.spec
423         sed -i 's/python3-markupsafe/python34-markupsafe/' python-jinja2.spec
424         rpmbuild -ba python-jinja2.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D "with_python3 1"
425
426 .PHONY: python3-jinja2-clean
427 python3-jinja2-clean:
428         rm -f python-jinja2-2.8-5.fc24.src.rpm
429         rm -f python-jinja2.spec
430         rm -f Jinja2-2.8.tar.gz
431
432 ########################
433 #  python3-markupsafe  #
434 ########################
435
436 .PHONY: python3-markupsafe
437 python3-markupsafe: python-markupsafe-0.23-9.fc24.src.rpm
438         curl -O http://ftp.linux.ncsu.edu/pub/fedora/linux//development/24/Everything/source/tree/Packages/p/python-markupsafe-0.23-9.fc24.src.rpm
439         rpm2cpio python-markupsafe-0.23-9.fc24.src.rpm | cpio -idmv
440         sed -i 's/python3-devel/python34-devel/' python-markupsafe.spec
441         sed -i 's/python3-setuptools/python34-setuptools/' python-markupsafe.spec
442         sed -i 's/python3-pytest/python34-pytest/' python-markupsafe.spec
443         sed -i 's/python3-markupsafe/python34-markupsafe/' python-markupsafe.spec
444         rpmbuild -ba python-markupsafe.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D "with_python3 1"
445
446 .PHONY: python3-markupsafe-clean
447 python3-markupsafe-clean:
448         rm -f python-markupsafe-0.23-9.fc24.src.rpm
449         rm -f python-markupsafe.spec
450         rm -f MarkupSafe-0.23.tar.gz