summaryrefslogtreecommitdiffstats
path: root/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb
blob: 7375c47933009685ade5afc87348fb78df0f036c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
SUMMARY = "Test recipe for recipetool appendfile"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

INHIBIT_DEFAULT_DEPS = "1"

SRC_URI = "file://installscript.sh \
           file://selftest-replaceme-orig \
           file://selftest-replaceme-todir \
           file://file1 \
           file://add-file.patch \
           file://subdir \
           file://selftest-replaceme-src-glob* \
           file://selftest-replaceme-inst-globfile \
           file://selftest-replaceme-inst-todir-globfile \
           file://selftest-replaceme-inst-func"

EXCLUDE_FROM_WORLD = "1"

install_extrafunc() {
	install -m 0644 ${WORKDIR}/selftest-replaceme-inst-func ${D}${datadir}/selftest-replaceme-inst-func
}

do_install() {
	install -d ${D}${datadir}/
	install -m 0644 ${WORKDIR}/selftest-replaceme-orig ${D}${datadir}/selftest-replaceme-orig
	install -m 0644 ${WORKDIR}/selftest-replaceme-todir ${D}${datadir}
	install -m 0644 ${WORKDIR}/file1 ${D}${datadir}/selftest-replaceme-renamed
	install -m 0644 ${WORKDIR}/subdir/fileinsubdir ${D}${datadir}/selftest-replaceme-subdir
	install -m 0644 ${WORKDIR}/selftest-replaceme-src-globfile ${D}${datadir}/selftest-replaceme-src-globfile
	cp ${WORKDIR}/selftest-replaceme-inst-glob* ${D}${datadir}/selftest-replaceme-inst-globfile
	cp ${WORKDIR}/selftest-replaceme-inst-todir-glob* ${D}${datadir}
	install -d ${D}${sysconfdir}
	install -m 0644 ${S}/file2 ${D}${sysconfdir}/selftest-replaceme-patched
	sh ${WORKDIR}/installscript.sh ${D}${datadir}
	install_extrafunc
}

pkg_postinst_${PN} () {
	echo "Test file installed by postinst" > $D${datadir}/selftest-replaceme-postinst
}

FILES_${PN} += "${datadir}"