fa983b5850e71ea2a8ee81db4098c5e7c8ec6b59
[pti/rtp.git] / meta-stx / recipes-core / stx-utilities / utilities / logmgmt.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 += " logmgmt"
17
18 RDEPENDS_logmgmt += " \
19         systemd \
20         python-daemon \
21         "
22 DESCRIPTION_logmgmt = "Management of /var/log filesystem"
23
24 do_configure_append() {
25         cd ${S}/utilities/logmgmt/logmgmt/
26         distutils_do_configure
27 }
28 do_compile_append() {
29         cd ${S}/utilities/logmgmt/logmgmt/
30         distutils_do_compile
31 }
32
33 do_install_append() {
34         cd ${S}/utilities/logmgmt/logmgmt/
35         distutils_do_install
36
37         cd ${S}/utilities/logmgmt/scripts
38         install -d -m0755 ${D}/${bindir}
39         install -m0700 bin/logmgmt ${D}/${bindir}
40         install -m0700 bin/logmgmt_postrotate ${D}/${bindir}
41         install -m0700 bin/logmgmt_prerotate ${D}/${bindir}
42
43         install -d -m0755 ${D}/${sysconfdir}/init.d
44         install -m0700 init.d/logmgmt ${D}/${sysconfdir}/init.d
45
46         install -d -m0755 ${D}/${sysconfdir}/pmon.d
47         install -m0700 pmon.d/logmgmt ${D}/${sysconfdir}/pmon.d
48
49         install -d -m0755 ${D}/${systemd_system_unitdir}
50         install -m0664 etc/systemd/system/logmgmt.service ${D}/${systemd_system_unitdir}
51 }
52
53 FILES_logmgmt = "  \
54         ${bindir}/logmgmt \
55         ${bindir}/logmgmt_postrotate \
56         ${bindir}/logmgmt_prerotate \
57         ${sysconfdir}/init.d/logmgmt \
58         ${sysconfdir}/pmon.d/logmgmt \
59         ${systemd_system_unitdir}/logmgmt.service \
60         ${PYTHON_SITEPACKAGES_DIR}/logmgmt/ \
61         ${PYTHON_SITEPACKAGES_DIR}/logmgmt-${PV}-py${PYTHON_BASEVERSION}.egg-info/ \
62         "