mtce.inc: cleanup the commented lines and align with stx3.0 97/3797/1
authorJackie Huang <jackie.huang@windriver.com>
Fri, 22 May 2020 02:20:18 +0000 (10:20 +0800)
committerJackie Huang <jackie.huang@windriver.com>
Fri, 22 May 2020 02:52:19 +0000 (10:52 +0800)
- Remove the useless TODO
- Align with stx 3.0 to create symlinks for libamon.so

Issue-ID: INF-53
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: I3ca998d1f843375b8a7e433aa62b2bd75777f804

meta-stx/recipes-core/stx-metal/mtce.inc

index 9a9fb57..2ca9ef6 100644 (file)
@@ -13,6 +13,9 @@
 #  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"
@@ -54,9 +57,6 @@ do_compile_prepend () {
 }
 
 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}
@@ -187,9 +187,9 @@ do_install_prepend () {
        
        # 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 += " \
@@ -265,7 +265,7 @@ FILES_mtce = " \
        ${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 \