diff options
Diffstat (limited to 'recipes-demo/helloworld-flask')
-rw-r--r-- | recipes-demo/helloworld-flask/helloworld-flask_0.1.bb | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/recipes-demo/helloworld-flask/helloworld-flask_0.1.bb b/recipes-demo/helloworld-flask/helloworld-flask_0.1.bb index 896e45fd..043ccc52 100644 --- a/recipes-demo/helloworld-flask/helloworld-flask_0.1.bb +++ b/recipes-demo/helloworld-flask/helloworld-flask_0.1.bb | |||
@@ -16,23 +16,26 @@ CONTAINERIMAGE ?= "zeddii/app-container:latest" | |||
16 | CONTAINERPORT ?= "9000" | 16 | CONTAINERPORT ?= "9000" |
17 | EXTERNALPORT ?= "10000" | 17 | EXTERNALPORT ?= "10000" |
18 | 18 | ||
19 | S = "${WORKDIR}/sources" | ||
20 | UNPACKDIR = "${S}" | ||
21 | |||
19 | do_install() { | 22 | do_install() { |
20 | 23 | ||
21 | for tgt in flask-app.yaml flask-app-service.yaml; do | 24 | for tgt in flask-app.yaml flask-app-service.yaml; do |
22 | sed -i 's%\@NAME\@%${NAME}%g' ${WORKDIR}/$tgt | 25 | sed -i 's%\@NAME\@%${NAME}%g' ${UNPACKDIR}/$tgt |
23 | sed -i 's%\@APPNAME\@%${APPNAME}%g' ${WORKDIR}/$tgt | 26 | sed -i 's%\@APPNAME\@%${APPNAME}%g' ${UNPACKDIR}/$tgt |
24 | sed -i 's%\@CONTAINERNAME\@%${CONTAINERNAME}%g' ${WORKDIR}/$tgt | 27 | sed -i 's%\@CONTAINERNAME\@%${CONTAINERNAME}%g' ${UNPACKDIR}/$tgt |
25 | sed -i 's%\@CONTAINERIMAGE\@%${CONTAINERIMAGE}%g' ${WORKDIR}/$tgt | 28 | sed -i 's%\@CONTAINERIMAGE\@%${CONTAINERIMAGE}%g' ${UNPACKDIR}/$tgt |
26 | sed -i 's%\@CONTAINERPORT\@%${CONTAINERPORT}%g' ${WORKDIR}/$tgt | 29 | sed -i 's%\@CONTAINERPORT\@%${CONTAINERPORT}%g' ${UNPACKDIR}/$tgt |
27 | sed -i 's%\@EXTERNALPORT\@%${EXTERNALPORT}%g' ${WORKDIR}/$tgt | 30 | sed -i 's%\@EXTERNALPORT\@%${EXTERNALPORT}%g' ${UNPACKDIR}/$tgt |
28 | done | 31 | done |
29 | 32 | ||
30 | install -d ${D}${bindir}/ | 33 | install -d ${D}${bindir}/ |
31 | install -m 755 ${WORKDIR}/flask-app ${D}${bindir}/ | 34 | install -m 755 ${UNPACKDIR}/flask-app ${D}${bindir}/ |
32 | 35 | ||
33 | install -d ${D}${sysconfdir}/deploy | 36 | install -d ${D}${sysconfdir}/deploy |
34 | install -m 644 ${WORKDIR}/flask-app.yaml ${D}${sysconfdir}/ | 37 | install -m 644 ${UNPACKDIR}/flask-app.yaml ${D}${sysconfdir}/ |
35 | install -m 644 ${WORKDIR}/flask-app-service.yaml ${D}${sysconfdir}/ | 38 | install -m 644 ${UNPACKDIR}/flask-app-service.yaml ${D}${sysconfdir}/ |
36 | } | 39 | } |
37 | 40 | ||
38 | RDEPENDS:${PN} += "python3-core python3-flask" | 41 | RDEPENDS:${PN} += "python3-core python3-flask" |