diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-core/base-files/base-files_3.0.14.bb | |
download | poky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
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 | 178 |
1 files changed, 178 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..9021103158 --- /dev/null +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb | |||
@@ -0,0 +1,178 @@ | |||
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 = "r89" | ||
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 = "" | ||
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 | /home ${prefix}/src ${localstatedir}/local \ | ||
47 | /media" | ||
48 | |||
49 | dirs755-lsb = "/srv \ | ||
50 | ${prefix}/local ${prefix}/local/bin ${prefix}/local/games \ | ||
51 | ${prefix}/local/include ${prefix}/local/lib ${prefix}/local/sbin \ | ||
52 | ${prefix}/local/share ${prefix}/local/src \ | ||
53 | ${prefix}/lib/locale" | ||
54 | dirs2775-lsb = "/var/mail" | ||
55 | |||
56 | volatiles = "log tmp" | ||
57 | conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \ | ||
58 | ${sysconfdir}/inputrc ${sysconfdir}/issue /${sysconfdir}/issue.net \ | ||
59 | ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \ | ||
60 | ${sysconfdir}/default" | ||
61 | |||
62 | # | ||
63 | # set standard hostname, might be a candidate for a DISTRO variable? :M: | ||
64 | # | ||
65 | hostname = "openembedded" | ||
66 | |||
67 | BASEFILESISSUEINSTALL ?= "do_install_basefilesissue" | ||
68 | |||
69 | # In previous versions of base-files, /run was a softlink to /var/run and the | ||
70 | # directory was located in /var/volatlie/run. Also, /var/lock was a softlink | ||
71 | # to /var/volatile/lock which is where the real directory was located. Now, | ||
72 | # /run and /run/lock are the real directories. If we are upgrading, we may | ||
73 | # need to remove the symbolic links first before we create the directories. | ||
74 | # Otherwise the directory creation will fail and we will have circular symbolic | ||
75 | # links. | ||
76 | # | ||
77 | pkg_preinst_${PN} () { | ||
78 | #!/bin/sh -e | ||
79 | if [ x"$D" = "x" ]; then | ||
80 | if [ -h "/var/lock" ]; then | ||
81 | # Remove the symbolic link | ||
82 | rm -f /var/lock | ||
83 | fi | ||
84 | |||
85 | if [ -h "/run" ]; then | ||
86 | # Remove the symbolic link | ||
87 | rm -f /run | ||
88 | fi | ||
89 | fi | ||
90 | } | ||
91 | |||
92 | do_install () { | ||
93 | for d in ${dirs755}; do | ||
94 | install -m 0755 -d ${D}$d | ||
95 | done | ||
96 | for d in ${dirs1777}; do | ||
97 | install -m 1777 -d ${D}$d | ||
98 | done | ||
99 | for d in ${dirs2775}; do | ||
100 | install -m 2775 -d ${D}$d | ||
101 | done | ||
102 | for d in ${volatiles}; do | ||
103 | ln -sf volatile/$d ${D}${localstatedir}/$d | ||
104 | done | ||
105 | |||
106 | ln -snf ../run ${D}${localstatedir}/run | ||
107 | ln -snf ../run/lock ${D}${localstatedir}/lock | ||
108 | |||
109 | ${BASEFILESISSUEINSTALL} | ||
110 | |||
111 | rotation=`cat ${WORKDIR}/rotation` | ||
112 | if [ "$rotation" != "0" ]; then | ||
113 | install -m 0644 ${WORKDIR}/rotation ${D}${sysconfdir}/rotation | ||
114 | fi | ||
115 | |||
116 | install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab | ||
117 | install -m 0644 ${WORKDIR}/filesystems ${D}${sysconfdir}/filesystems | ||
118 | install -m 0644 ${WORKDIR}/usbd ${D}${sysconfdir}/default/usbd | ||
119 | install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile | ||
120 | sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}${sysconfdir}/profile | ||
121 | install -m 0644 ${WORKDIR}/shells ${D}${sysconfdir}/shells | ||
122 | install -m 0755 ${WORKDIR}/share/dot.profile ${D}${sysconfdir}/skel/.profile | ||
123 | install -m 0755 ${WORKDIR}/share/dot.bashrc ${D}${sysconfdir}/skel/.bashrc | ||
124 | install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc | ||
125 | install -m 0644 ${WORKDIR}/nsswitch.conf ${D}${sysconfdir}/nsswitch.conf | ||
126 | install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf | ||
127 | install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd | ||
128 | |||
129 | if [ "/usr/bin" != "${bindir}" ]; then | ||
130 | sed -i "s,/usr/bin/resize,${bindir}/resize," ${D}${sysconfdir}/profile | ||
131 | fi | ||
132 | |||
133 | ln -sf /proc/mounts ${D}${sysconfdir}/mtab | ||
134 | } | ||
135 | |||
136 | DISTRO_VERSION[vardepsexclude] += "DATE" | ||
137 | do_install_basefilesissue () { | ||
138 | if [ "${hostname}" != "" ]; then | ||
139 | if [ -n "${MACHINE}" -a "${hostname}" = "openembedded" ]; then | ||
140 | echo ${MACHINE} > ${D}${sysconfdir}/hostname | ||
141 | else | ||
142 | echo ${hostname} > ${D}${sysconfdir}/hostname | ||
143 | fi | ||
144 | fi | ||
145 | |||
146 | install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir} | ||
147 | if [ -n "${DISTRO_NAME}" ]; then | ||
148 | printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue | ||
149 | printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net | ||
150 | if [ -n "${DISTRO_VERSION}" ]; then | ||
151 | printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue | ||
152 | printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net | ||
153 | fi | ||
154 | printf "\\\n \\\l\n" >> ${D}${sysconfdir}/issue | ||
155 | echo >> ${D}${sysconfdir}/issue | ||
156 | echo "%h" >> ${D}${sysconfdir}/issue.net | ||
157 | echo >> ${D}${sysconfdir}/issue.net | ||
158 | fi | ||
159 | } | ||
160 | |||
161 | do_install_append_linuxstdbase() { | ||
162 | for d in ${dirs755-lsb}; do | ||
163 | install -m 0755 -d ${D}$d | ||
164 | done | ||
165 | |||
166 | for d in ${dirs2775-lsb}; do | ||
167 | install -m 2775 -d ${D}$d | ||
168 | done | ||
169 | } | ||
170 | |||
171 | PACKAGES = "${PN}-doc ${PN} ${PN}-dev ${PN}-dbg" | ||
172 | FILES_${PN} = "/" | ||
173 | FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses" | ||
174 | |||
175 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
176 | |||
177 | CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname'][(d.getVar('hostname', True) != '')]} ${sysconfdir}/shells" | ||
178 | |||