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