diff options
Diffstat (limited to 'meta/recipes-core/base-files/base-files_3.0.14.bb')
-rw-r--r-- | meta/recipes-core/base-files/base-files_3.0.14.bb | 147 |
1 files changed, 147 insertions, 0 deletions
diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb new file mode 100644 index 0000000000..054fefa050 --- /dev/null +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb | |||
@@ -0,0 +1,147 @@ | |||
1 | SUMMARY = "Miscellaneous files for the base system." | ||
2 | DESCRIPTION = "The base-files package creates the basic system directory structure and provides a small set of key configuration files for the system." | ||
3 | SECTION = "base" | ||
4 | PR = "r73" | ||
5 | LICENSE = "GPLv2" | ||
6 | LIC_FILES_CHKSUM = "file://licenses/GPL-2;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
7 | # Removed all license related tasks in this recipe as license.bbclass | ||
8 | # now deals with this. In order to get accurate licensing on to the image: | ||
9 | # Set COPY_LIC_MANIFEST to just copy just the license.manifest to the image | ||
10 | # For the manifest and the license text for each package: | ||
11 | # Set COPY_LIC_MANIFEST and COPY_LIC_DIRS | ||
12 | |||
13 | SRC_URI = "file://rotation \ | ||
14 | file://nsswitch.conf \ | ||
15 | file://motd \ | ||
16 | file://inputrc \ | ||
17 | file://host.conf \ | ||
18 | file://profile \ | ||
19 | file://shells \ | ||
20 | file://fstab \ | ||
21 | file://filesystems \ | ||
22 | file://issue.net \ | ||
23 | file://issue \ | ||
24 | file://usbd \ | ||
25 | file://share/dot.bashrc \ | ||
26 | file://share/dot.profile \ | ||
27 | file://licenses/GPL-2 \ | ||
28 | " | ||
29 | S = "${WORKDIR}" | ||
30 | |||
31 | INHIBIT_DEFAULT_DEPS = "1" | ||
32 | |||
33 | docdir_append = "/${P}" | ||
34 | dirs1777 = "/tmp ${localstatedir}/volatile/tmp" | ||
35 | dirs2775 = "/home ${prefix}/src ${localstatedir}/local" | ||
36 | dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \ | ||
37 | ${sysconfdir}/skel /lib /mnt /proc ${ROOT_HOME} /run /sbin \ | ||
38 | ${prefix} ${bindir} ${docdir} /usr/games ${includedir} \ | ||
39 | ${libdir} ${sbindir} ${datadir} \ | ||
40 | ${datadir}/common-licenses ${datadir}/dict ${infodir} \ | ||
41 | ${mandir} ${datadir}/misc ${localstatedir} \ | ||
42 | ${localstatedir}/backups ${localstatedir}/lib \ | ||
43 | /sys ${localstatedir}/lib/misc ${localstatedir}/spool \ | ||
44 | ${localstatedir}/volatile \ | ||
45 | ${localstatedir}/volatile/log \ | ||
46 | /media" | ||
47 | dirs3755 = "/srv \ | ||
48 | ${prefix}/local ${prefix}/local/bin ${prefix}/local/games \ | ||
49 | ${prefix}/local/include ${prefix}/local/lib ${prefix}/local/sbin \ | ||
50 | ${prefix}/local/share ${prefix}/local/src \ | ||
51 | ${prefix}/lib/locale" | ||
52 | dirs4775 = "/var/mail" | ||
53 | |||
54 | volatiles = "log tmp" | ||
55 | conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \ | ||
56 | ${sysconfdir}/inputrc ${sysconfdir}/issue /${sysconfdir}/issue.net \ | ||
57 | ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \ | ||
58 | ${sysconfdir}/default" | ||
59 | |||
60 | # | ||
61 | # set standard hostname, might be a candidate for a DISTRO variable? :M: | ||
62 | # | ||
63 | hostname = "openembedded" | ||
64 | |||
65 | BASEFILESISSUEINSTALL ?= "do_install_basefilesissue" | ||
66 | |||
67 | do_install () { | ||
68 | for d in ${dirs755}; do | ||
69 | install -m 0755 -d ${D}$d | ||
70 | done | ||
71 | for d in ${dirs1777}; do | ||
72 | install -m 1777 -d ${D}$d | ||
73 | done | ||
74 | for d in ${dirs2775}; do | ||
75 | install -m 2755 -d ${D}$d | ||
76 | done | ||
77 | for d in ${volatiles}; do | ||
78 | ln -sf volatile/$d ${D}${localstatedir}/$d | ||
79 | done | ||
80 | ln -snf ../run ${D}${localstatedir}/run | ||
81 | ln -snf ../run/lock ${D}${localstatedir}/lock | ||
82 | |||
83 | ${BASEFILESISSUEINSTALL} | ||
84 | |||
85 | rotation=`cat ${WORKDIR}/rotation` | ||
86 | if [ "$rotation" != "0" ]; then | ||
87 | install -m 0644 ${WORKDIR}/rotation ${D}${sysconfdir}/rotation | ||
88 | fi | ||
89 | |||
90 | install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab | ||
91 | install -m 0644 ${WORKDIR}/filesystems ${D}${sysconfdir}/filesystems | ||
92 | install -m 0644 ${WORKDIR}/usbd ${D}${sysconfdir}/default/usbd | ||
93 | sed -i "s#ROOTHOME#${ROOT_HOME}#" ${WORKDIR}/profile | ||
94 | install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile | ||
95 | install -m 0644 ${WORKDIR}/shells ${D}${sysconfdir}/shells | ||
96 | install -m 0755 ${WORKDIR}/share/dot.profile ${D}${sysconfdir}/skel/.profile | ||
97 | install -m 0755 ${WORKDIR}/share/dot.bashrc ${D}${sysconfdir}/skel/.bashrc | ||
98 | install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc | ||
99 | install -m 0644 ${WORKDIR}/nsswitch.conf ${D}${sysconfdir}/nsswitch.conf | ||
100 | install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf | ||
101 | install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd | ||
102 | |||
103 | ln -sf /proc/mounts ${D}${sysconfdir}/mtab | ||
104 | } | ||
105 | |||
106 | do_install_basefilesissue () { | ||
107 | if [ "${hostname}" != "" ]; then | ||
108 | if [ -n "${MACHINE}" -a "${hostname}" = "openembedded" ]; then | ||
109 | echo ${MACHINE} > ${D}${sysconfdir}/hostname | ||
110 | else | ||
111 | echo ${hostname} > ${D}${sysconfdir}/hostname | ||
112 | fi | ||
113 | fi | ||
114 | |||
115 | install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir} | ||
116 | if [ -n "${DISTRO_NAME}" ]; then | ||
117 | printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue | ||
118 | printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net | ||
119 | if [ -n "${DISTRO_VERSION}" ]; then | ||
120 | printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue | ||
121 | printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net | ||
122 | fi | ||
123 | printf "\\\n \\\l\n" >> ${D}${sysconfdir}/issue | ||
124 | echo >> ${D}${sysconfdir}/issue | ||
125 | echo "%h" >> ${D}${sysconfdir}/issue.net | ||
126 | echo >> ${D}${sysconfdir}/issue.net | ||
127 | fi | ||
128 | } | ||
129 | |||
130 | do_install_append_linuxstdbase() { | ||
131 | for d in ${dirs3755}; do | ||
132 | install -m 0755 -d ${D}$d | ||
133 | done | ||
134 | |||
135 | for d in ${dirs4775}; do | ||
136 | install -m 2755 -d ${D}$d | ||
137 | done | ||
138 | } | ||
139 | |||
140 | PACKAGES = "${PN}-doc ${PN} ${PN}-dev ${PN}-dbg" | ||
141 | FILES_${PN} = "/" | ||
142 | FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses" | ||
143 | |||
144 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
145 | |||
146 | CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname'][(d.getVar('hostname', True) != '')]}" | ||
147 | |||