blob: c187b4c4927e500090131dc9548edeb85f64e328 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001inherit workonsrc
2inherit pkgconfig
3inherit systemd
4
5DESCRIPTION = "Encrypted Library Decryption Helper"
6LICENSE = "MediaTekProprietary"
7LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
8APPS_SRC = "${TOPDIR}/../meta/meta-mediatek/recipes-support/encryptlibrary-init"
9SECURE_PROGRAM = "secure_program"
10WORKONSRC = "${APPS_SRC}"
11
12#####Customization Start#####
13EncryptedLibraryName = "libMtkOmxEac3Dec.so"
14#####Customization End#####
15
16SYSTEMD_PACKAGES = "${PN}"
17SYSTEMD_SERVICE_${PN} = "encryptlibrary-init.service"
18FILES_${PN} += "${systemd_unitdir}/system/encryptlibrary-init.service"
19FILES_${PN} += "etc/encryptlibrary-init.sh"
20FILES_${PN} += "${libdir}/encrypted/${EncryptedLibraryName}"
21
22do_install() {
23 install -d ${D}${systemd_system_unitdir}
24 install -m 0755 ${S}files/encryptlibrary-init.service ${D}${systemd_system_unitdir}
25
26 install -d ${D}/etc
27 install -m 755 ${S}files/encryptlibrary-init.sh ${D}/etc/encryptlibrary-init.sh
28
29 install -d ${D}${libdir}/encrypted
30 install -m 644 ${S}files/${EncryptedLibraryName} ${D}${libdir}/encrypted
31
32 echo "${SECURE_PROGRAM} dec /usr/lib/encrypted/${EncryptedLibraryName} /tmp/${EncryptedLibraryName}" >> ${D}/etc/encryptlibrary-init.sh
33}
34
35