p7zip: add native build support
[AGL/meta-agl.git] / meta-ivi-common / recipes-extended / p7zip / p7zip_9.20.1.bbappend
1 # This bbappend is to implement native package built
2 #
3 # native support has been submitted upstream, and may land in meta-openembedded:
4 #  http://lists.openembedded.org/pipermail/openembedded-devel/2016-March/106755.html
5
6 # all3: to build bin/7za, bin/7z (with its plugins), bin/7zr and bin/7zCon.sfx
7 EXTRA_OEMAKE_class-native = "all3"
8
9 do_install_class-native() {
10     install -d ${D}${bindir}
11     install -d ${D}${bindir}/Codecs
12     install -m 0755 ${S}/bin/7* ${D}${bindir}
13     install -m 0755 ${S}/bin/Codecs/* ${D}${bindir}/Codecs
14
15     # Create a shell script wrapper to execute next to 7z.so
16     mv ${D}${bindir}/7z ${D}${bindir}/7z.bin
17     echo "#! /bin/sh" > ${D}${bindir}/7z
18     echo "exec ${D}${bindir}/7z.bin \"\$@\"" >> ${D}${bindir}/7z
19     chmod 0755 ${D}${bindir}/7z
20 }
21
22 BBCLASSEXTEND += "native"