blob: 30b3db06cfd77003cf053e69a96b4633ef5ae84a (
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
xDESCRIPTION = "Base system miscellaneous files."
SECTION = "base"
PRIORITY = "required"
PR = "r5"
SRC_URI = " file://${FILESDIR}/etc/nsswitch.conf \
file://${FILESDIR}/etc/motd \
file://${FILESDIR}/etc/issue.net- \
file://${FILESDIR}/etc/issue-opensimpad \
file://${FILESDIR}/etc/issue.net-opensimpad \
file://${FILESDIR}/etc/issue- \
file://${FILESDIR}/etc/issue-openzaurus \
file://${FILESDIR}/etc/issue.net-openzaurus \
file://${FILESDIR}/etc/issue-familiar \
file://${FILESDIR}/etc/issue.net-familiar \
file://${FILESDIR}/etc/inputrc \
file://${FILESDIR}/etc/host.conf \
file://${FILESDIR}/etc/profile \
file://${FILESDIR}/shepherd/fstab \
file://${FILESDIR}/shepherd/hostname \
file://${FILESDIR}/epia/fstab \
file://${FILESDIR}/h3600/hostname \
file://${FILESDIR}/corgi/fstab \
file://${FILESDIR}/corgi/hostname \
file://${FILESDIR}/fstab \
file://${FILESDIR}/husky/fstab \
file://${FILESDIR}/husky/hostname \
file://${FILESDIR}/share/dot.bashrc \
file://${FILESDIR}/share/dot.profile \
file://${FILESDIR}/share/info.dir \
file://${FILESDIR}/share/motd.md5sums \
file://${FILESDIR}/collie/fstab \
file://${FILESDIR}/collie/hostname \
file://${FILESDIR}/debian/FAQ \
file://${FILESDIR}/debian/directory-list \
file://${FILESDIR}/debian/control \
file://${FILESDIR}/debian/1777-dirs \
file://${FILESDIR}/debian/rules \
file://${FILESDIR}/debian/conffiles \
file://${FILESDIR}/debian/changelog \
file://${FILESDIR}/debian/copyright.in \
file://${FILESDIR}/debian/postinst \
file://${FILESDIR}/debian/README.FHS \
file://${FILESDIR}/debian/2775-dirs \
file://${FILESDIR}/debian/preinst.in \
file://${FILESDIR}/debian/remove-base \
file://${FILESDIR}/debian/README.base \
file://${FILESDIR}/debian/current-md5sums \
file://${FILESDIR}/hostname \
file://${FILESDIR}/poodle/fstab \
file://${FILESDIR}/poodle/hostname \
file://${FILESDIR}/ramses/fstab \
file://${FILESDIR}/ramses/hostname \
file://${FILESDIR}/simpad/hostname \
file://${FILESDIR}/licenses/BSD \
file://${FILESDIR}/licenses/GPL-2 \
file://${FILESDIR}/licenses/LGPL-2 \
file://${FILESDIR}/licenses/LGPL-2.1 \
file://${FILESDIR}/licenses/Artistic"
S = "${WORKDIR}"
docdir_append = "/${P}"
do_install () {
install -d ${D}/${docdir}
install -d ${D}${datadir}/${PN}
install -m 644 debian/changelog debian/FAQ debian/README.FHS debian/README.base ${D}/${docdir}/
cat ${S}/debian/copyright.in | sed -e "s&#OSNAME#&${TARGET_OS}&g" > ${D}/${docdir}/copyright
install -m 755 debian/remove-base ${D}/${docdir}
# cd debian && install -m 755 preinst postinst ${D}/DEBIAN
# cd debian && install -m 644 conffiles ${D}/DEBIAN
( cd ${D} && install -d `cat ${S}/debian/directory-list` )
install -d ${D}/sys
install -p -m 644 share/* ${D}${datadir}/base-files
install -p -m 644 licenses/* ${D}${datadir}/common-licenses
ln -s LGPL-2.1 ${D}${datadir}/common-licenses/LGPL
ln -s GPL-2 ${D}${datadir}/common-licenses/GPL
cat share/info.dir | sed -e "s&#OSNAME#&${TARGET_OS}&g" > ${D}${datadir}/base-files/info.dir
gzip -9 ${D}/${docdir}/changelog
# chown -R root:root ${D}
# cd ${D} && chown root:src usr/src
# cd ${D} && chown root:staff var/local
# cd ${D} && chown root:staff home
cd ${D} && chmod 755 `find . -type d`
cd ${D} && chmod 1777 `cat ${S}/debian/1777-dirs`
cd ${D} && chmod 2775 `cat ${S}/debian/2775-dirs`
install -d ${D}/${sysconfdir}
oe_machinstall -m 0644 ${WORKDIR}/fstab ${D}/${sysconfdir}/fstab
oe_machinstall -m 0644 ${WORKDIR}/hostname ${D}/${sysconfdir}/hostname
oe_machinstall -m 0644 ${WORKDIR}/profile ${D}/${sysconfdir}/profile
install -m 0644 ${FILESDIR}/etc/issue-${DISTRO} ${D}/${sysconfdir}/issue
install -m 0644 ${FILESDIR}/etc/issue.net-${DISTRO} ${D}/${sysconfdir}/issue.net
cat ${WORKDIR}/etc/motd | sed -e "s&#OSNAME#&${TARGET_OS}&g" > ${D}${datadir}/base-files/motd
for f in inputrc nsswitch.conf host.conf profile
do
install -m 0644 ${WORKDIR}/etc/$f ${D}/${sysconfdir}/
done
install -m 0755 ${D}/usr/share/base-files/dot.profile ${D}/root/.profile
# debian ships these, but they are useless to us
rmdir ${D}/var/lib/dpkg \
${D}/var/lib/misc \
${D}/var/backups \
${D}/usr/src \
${D}/usr/info \
${D}/usr/games \
${D}/usr/doc \
${D}/usr/include \
${D}/usr/share/dict
rm -r ${D}/usr/share/base-files
if grep -q "^\(tmpfs\|ramfs\)\W\+/var" ${D}/etc/fstab; then
# /var is in a ramdisk
install -d ${D}/etc/init.d ${D}/etc/rcS.d
for d in `(cd ${D}/var; ls)`; do
mode=`stat -c %a ${D}/var/$d`
echo "mkdir -p /var/$d" >> ${D}/etc/init.d/populate-var
echo "chmod $mode /var/$d" >> ${D}/etc/init.d/populate-var
done
rmdir ${D}/var/*
chmod a+x ${D}/etc/init.d/populate-var
ln -s ../init.d/populate-var ${D}/etc/rcS.d/S37populate-var
ln -s /var/run/resolv.conf ${D}/etc/resolv.conf
ln -s /var/run/ld.so.cache ${D}/etc/ld.so.cache
fi
}
PACKAGES = "${PN}-doc ${PN}"
FILES_${PN} = "/"
FILES_${PN}-doc = "/usr/share/doc /usr/share/common-licenses"
|