summaryrefslogtreecommitdiffstats
path: root/meta-skeleton
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@dowhile0.org>2012-08-05 19:48:35 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-06 14:18:48 (GMT)
commit84728a1e8f7dbccc36e883dd5bed72f21f727d8e (patch)
tree9ca4974e389a15b5710dbcfc1b5e6909ef5ffc76 /meta-skeleton
parent344c40b97bef42d84750e6ef1e6fa5abe6f42f8f (diff)
downloadpoky-84728a1e8f7dbccc36e883dd5bed72f21f727d8e.tar.gz
useradd-example: use ${datadir} instead of /usr/share for packaging
It is considered good practice to use the build system provided variables instead of directly specify hardcoded paths. (From OE-Core rev: b93a9dadc9a2754d4e33929bda8dba46dd20b694) Signed-off-by: Javier Martinez Canillas <javier@dowhile0.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-skeleton')
-rw-r--r--meta-skeleton/recipes-skeleton/useradd/useradd-example.bb36
1 files changed, 18 insertions, 18 deletions
diff --git a/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb b/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
index b10c1d0..53d2340 100644
--- a/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
+++ b/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
@@ -1,7 +1,7 @@
1SUMMARY = "Example recipe for using inherit useradd" 1SUMMARY = "Example recipe for using inherit useradd"
2DESCRIPTION = "This recipe serves as an example for using features from useradd.bbclass" 2DESCRIPTION = "This recipe serves as an example for using features from useradd.bbclass"
3SECTION = "examples" 3SECTION = "examples"
4PR = "r0" 4PR = "r1"
5LICENSE = "MIT" 5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ 6LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
7 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" 7 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
@@ -43,32 +43,32 @@ GROUPADD_PARAM_${PN} = "-g 880 group1; -g 890 group2"
43GROUPADD_PARAM_${PN}-user3 = "-g 900 group3" 43GROUPADD_PARAM_${PN}-user3 = "-g 900 group3"
44 44
45do_install () { 45do_install () {
46 install -d -m 755 ${D}/usr/share/user1 46 install -d -m 755 ${D}${datadir}/user1
47 install -d -m 755 ${D}/usr/share/user2 47 install -d -m 755 ${D}${datadir}/user2
48 install -d -m 755 ${D}/usr/share/user3 48 install -d -m 755 ${D}${datadir}/user3
49 49
50 install -p -m 644 file1 ${D}/usr/share/user1/ 50 install -p -m 644 file1 ${D}${datadir}/user1/
51 install -p -m 644 file2 ${D}/usr/share/user1/ 51 install -p -m 644 file2 ${D}${datadir}/user1/
52 52
53 install -p -m 644 file2 ${D}/usr/share/user2/ 53 install -p -m 644 file2 ${D}${datadir}/user2/
54 install -p -m 644 file3 ${D}/usr/share/user2/ 54 install -p -m 644 file3 ${D}${datadir}/user2/
55 55
56 install -p -m 644 file3 ${D}/usr/share/user3/ 56 install -p -m 644 file3 ${D}${datadir}/user3/
57 install -p -m 644 file4 ${D}/usr/share/user3/ 57 install -p -m 644 file4 ${D}${datadir}/user3/
58 58
59 # The new users and groups are created before the do_install 59 # The new users and groups are created before the do_install
60 # step, so you are now free to make use of them: 60 # step, so you are now free to make use of them:
61 chown -R user1 ${D}/usr/share/user1 61 chown -R user1 ${D}${datadir}/user1
62 chown -R user2 ${D}/usr/share/user2 62 chown -R user2 ${D}${datadir}/user2
63 chown -R user3 ${D}/usr/share/user3 63 chown -R user3 ${D}${datadir}/user3
64 64
65 chgrp -R group1 ${D}/usr/share/user1 65 chgrp -R group1 ${D}${datadir}/user1
66 chgrp -R group2 ${D}/usr/share/user2 66 chgrp -R group2 ${D}${datadir}/user2
67 chgrp -R group3 ${D}/usr/share/user3 67 chgrp -R group3 ${D}${datadir}/user3
68} 68}
69 69
70FILES_${PN} = "/usr/share/user1/* /usr/share/user2/*" 70FILES_${PN} = "${datadir}/user1/* ${datadir}/user2/*"
71FILES_${PN}-user3 = "/usr/share/user3/*" 71FILES_${PN}-user3 = "${datadir}/user3/*"
72 72
73# Prevents do_package failures with: 73# Prevents do_package failures with:
74# debugsources.list: No such file or directory: 74# debugsources.list: No such file or directory: