# See the License for the specific language governing permissions and
# limitations under the License.
+MAJOR = "${@d.getVar('PV').split('.')[0]}"
+MINOR = "${@d.getVar('PV').split('.')[1]}"
+
PACKAGES += " mtce"
PACKAGES += " mtce-pmon"
PACKAGES += " mtce-hwmon"
}
do_compile_prepend () {
+ # use sed to correct the path of systemctl
+ sed -i -e 's|${bindir}/systemctl|${base_bindir}/systemctl|' ${S}/mtce/src/pmon/pmonHdlr.cpp
cd ${S}/mtce/src/
oe_runmake -e VER=1 VER_MJR=1 INCLUDES=" -I. -I../alarm -I../heartbeat -I../maintenance \
-I../hostw -I../public -I../smash -I../common -I../hwmon \
}
do_install_prepend () {
-# TODO:
-# Really need to fix the package;s Makefile
-
cd ${S}/mtce/src/
install -m 755 -d ${D}/${bindir}
install -m 755 -d ${D}/${sbindir}
install -m 755 -d ${D}/${sysconfdir}/pmon.d
install -m 755 -d ${D}/${sysconfdir}/logrotate.d
- install -m 755 -d ${D}/${sysconfdir}/serverices.d
- install -m 755 -d ${D}/${sysconfdir}/serverices.d/controller
- install -m 755 -d ${D}/${sysconfdir}/serverices.d/worker
- install -m 755 -d ${D}/${sysconfdir}/serverices.d/storage
+ install -m 755 -d ${D}/${sysconfdir}/services.d
+ install -m 750 -d ${D}/${sysconfdir}/services.d/controller
+ install -m 750 -d ${D}/${sysconfdir}/services.d/worker
+ install -m 750 -d ${D}/${sysconfdir}/services.d/storage
cd ${S}/mtce/src/
install -m 755 -p -D scripts/mtcAgent ${D}/${libdir}/ocf/resource.d/platform
install -m 755 -p -D scripts/goenabled ${D}/${sysconfdir}/init.d/goenabled
# start or stop services test script
- install -m 755 -p -D scripts/mtcTest ${D}/${sysconfdir}/serverices.d/worker
- install -m 755 -p -D scripts/mtcTest ${D}/${sysconfdir}/serverices.d/controller
- install -m 755 -p -D scripts/mtcTest ${D}/${sysconfdir}/serverices.d/storage
+ install -m 755 -p -D scripts/mtcTest ${D}/${sysconfdir}/services.d/worker
+ install -m 755 -p -D scripts/mtcTest ${D}/${sysconfdir}/services.d/controller
+ install -m 755 -p -D scripts/mtcTest ${D}/${sysconfdir}/services.d/storage
install -m 755 -p -D scripts/runservices ${D}/${sysconfdir}/init.d/runservices
# software development files
install -m 644 -p -D heartbeat/mtceHbsCluster.h ${D}/${includedir}/mtceHbsCluster.h
- install -m 755 -p -D public/libamon.so.1 ${D}/${libdir}/
- #cd ${D}/%{_libdir} ; ln -s libamon.so.$MAJOR libamon.so.$MAJOR.$MINOR
- #cd ${D}/%{_libdir} ; ln -s libamon.so.$MAJOR libamon.so
+ install -m 755 -p -D public/libamon.so.${MAJOR} ${D}/${libdir}/
+ cd ${D}/${libdir} ; ln -s libamon.so.${MAJOR} libamon.so.${MAJOR}.${MINOR}
+ cd ${D}/${libdir} ; ln -s libamon.so.${MAJOR} libamon.so
}
SYSTEMD_PACKAGES += " \
${sbindir}/fsync \
${sbindir}/dmemchk.sh \
${libdir}/ocf/resource.d/platform/mtcAgent \
- ${libdir}/libamon.so.1 \
+ ${libdir}/libamon${SOLIBS} \
${systemd_system_unitdir}/mtcalarm.service \
${systemd_system_unitdir}/goenabled.service \
${systemd_system_unitdir}/mtclog.service \
${sysconfdir}/bmc/server_profiles.d/sensor_hp380_v1_ilo_v4.profile \
${sysconfdir}/bmc/server_profiles.d/sensor_hp360_v1_ilo_v4.profile \
${sysconfdir}/bmc/server_profiles.d/sensor_quanta_v1_ilo_v4.profile \
- ${sysconfdir}/serverices.d/worker/mtcTest \
- ${sysconfdir}/serverices.d/controller/mtcTest \
- ${sysconfdir}/serverices.d/storage/mtcTest \
+ ${sysconfdir}/services.d/worker/mtcTest \
+ ${sysconfdir}/services.d/controller/mtcTest \
+ ${sysconfdir}/services.d/storage/mtcTest \
${sysconfdir}/mtc/fsmond.conf \
${sysconfdir}/mtc/tmp/ \
${sysconfdir}/mtc.ini \