platform-kickstarts: add new recipe for generating ks files
[pti/rtp.git] / meta-stx / recipes-core / stx-metal / platform-kickstarts.inc
1 #
2 ## Copyright (C) 2019 Wind River Systems, Inc.
3 #
4 #  Licensed under the Apache License, Version 2.0 (the "License");
5 #  you may not use this file except in compliance with the License.
6 #  You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #  Unless required by applicable law or agreed to in writing, software
11 #  distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15
16 PACKAGES += " \
17         platform-kickstarts \
18         platform-kickstarts-pxeboot \
19         platform-kickstarts-extracfgs \
20         "
21
22 feed_dir = "/www/pages/feed/rel-${STX_REL}"
23
24 DEPENDS += "perl-native"
25
26 do_compile_prepend () {
27         cd ${S}/bsp-files/
28         ./centos-ks-gen.pl --release ${STX_REL}
29 }
30
31 do_install_prepend () {
32         cd ${S}/bsp-files/
33         install -d -m 0755 ${D}${feed_dir}
34         install -m 0444 generated/* ${D}${feed_dir}/
35
36         install -d -m 0755 ${D}/pxeboot
37         install -D -m 0444 pxeboot/* ${D}/pxeboot
38
39         install -d -m 0755 ${D}/extra_cfgs
40         install -D -m 0444 extra_cfgs/* ${D}/extra_cfgs
41 }
42
43 FILES_platform-kickstarts = "${feed_dir}"
44 FILES_platform-kickstarts-pxeboot = "/pxeboot"
45 FILES_platform-kickstarts-extracfgs = "/extra_cfgs"