Add initial meta-stx to support StarlingX build
[pti/rtp.git] / meta-stx / recipes-core / stx-utilities / utilities / update-motd.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 += " update-motd"
17
18 RDEPENDS_update-motd  += " cronie bash"
19 DESCRIPTION_update-motd  = "dynamic MOTD generation"
20 SUMMARY_update-motd  = "dynamic MOTD generation"
21
22 inherit setuptools distutils
23
24 do_configure_append() {
25         :
26 }
27 do_compile_append() {
28         :
29 }
30
31 do_install_append() {
32         cd ${S}/utilities/update-motd/files
33
34
35         install -d ${D}/${sbindir}
36         install -m 700 motd-update ${D}/${sbindir}/motd-update
37
38         install -m0755 -d ${D}/${sysconfdir}
39         install -m0755 -d ${D}/${sysconfdir}/motd.d
40
41         install -m 755 motd-header ${D}/${sysconfdir}/motd.d/00-header
42         install -m 755 motd-footer ${D}/${sysconfdir}/motd.d/99-footer
43         install -m 644 motd.head ${D}/${sysconfdir}/motd.d/motd.head
44
45         install -m0755  -d ${D}/${sysconfdir}/cron.d
46         install -m 600 motd-update.cron ${D}/${sysconfdir}/cron.d/motd-update
47         install -m 700 customize-banner ${D}/${sbindir}/customize-banner
48         install -m 700 apply_banner_customization ${D}/${sbindir}/apply_banner_customization
49         install -m 700 install_banner_customization ${D}/${sbindir}/install_banner_customization
50
51 }
52
53 FILES_update-motd = "  \
54         ${sbindir}/motd-update \
55         ${sysconfdir}/motd.d/00-header \
56         ${sysconfdir}/motd.d/99-footer \
57         ${sysconfdir}/motd.d/motd.head \
58         ${sysconfdir}/cron.d/motd-update \
59         ${sbindir}/customize-banner \
60         ${sbindir}/apply_banner_customization \
61         ${sbindir}/install_banner_customization \
62         "