blob: c187b4c4927e500090131dc9548edeb85f64e328 [file] [log] [blame]
inherit workonsrc
inherit pkgconfig
inherit systemd
DESCRIPTION = "Encrypted Library Decryption Helper"
LICENSE = "MediaTekProprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
APPS_SRC = "${TOPDIR}/../meta/meta-mediatek/recipes-support/encryptlibrary-init"
SECURE_PROGRAM = "secure_program"
WORKONSRC = "${APPS_SRC}"
#####Customization Start#####
EncryptedLibraryName = "libMtkOmxEac3Dec.so"
#####Customization End#####
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = "encryptlibrary-init.service"
FILES_${PN} += "${systemd_unitdir}/system/encryptlibrary-init.service"
FILES_${PN} += "etc/encryptlibrary-init.sh"
FILES_${PN} += "${libdir}/encrypted/${EncryptedLibraryName}"
do_install() {
install -d ${D}${systemd_system_unitdir}
install -m 0755 ${S}files/encryptlibrary-init.service ${D}${systemd_system_unitdir}
install -d ${D}/etc
install -m 755 ${S}files/encryptlibrary-init.sh ${D}/etc/encryptlibrary-init.sh
install -d ${D}${libdir}/encrypted
install -m 644 ${S}files/${EncryptedLibraryName} ${D}${libdir}/encrypted
echo "${SECURE_PROGRAM} dec /usr/lib/encrypted/${EncryptedLibraryName} /tmp/${EncryptedLibraryName}" >> ${D}/etc/encryptlibrary-init.sh
}