DESCRIPTION = "Miscellaneous files for the base system." SECTION = "base" PRIORITY = "required" PR = "r13" SRC_URI = " \ file://etc/nsswitch.conf \ file://etc/motd \ file://etc/inputrc \ file://etc/host.conf \ file://etc/profile \ file://fstab \ file://issue.net \ file://issue \ file://usbd \ file://share/dot.bashrc \ file://share/dot.profile \ file://share/info.dir \ file://share/motd.md5sums \ file://debian/FAQ \ file://debian/directory-list \ file://debian/control \ file://debian/1777-dirs \ file://debian/rules \ file://debian/conffiles \ file://debian/changelog \ file://debian/copyright.in \ file://debian/postinst \ file://debian/README.FHS \ file://debian/2775-dirs \ file://debian/preinst.in \ file://debian/remove-base \ file://debian/README.base \ file://debian/current-md5sums \ file://licenses/BSD \ file://licenses/GPL-2 \ file://licenses/LGPL-2 \ file://licenses/LGPL-2.1 \ file://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}/default install -m 0644 ${WORKDIR}/fstab ${D}/${sysconfdir}/fstab install -m 0644 ${WORKDIR}/usbd ${D}/${sysconfdir}/default/usbd [ -z "${MACHINE}" ] && echo "openembedded" >${D}/${sysconfdir}/hostname || echo ${MACHINE} >${D}/${sysconfdir}/hostname install -m 0644 ${WORKDIR}/etc/profile ${D}/${sysconfdir}/profile install -m 0644 ${WORKDIR}/issue ${D}/${sysconfdir}/issue install -m 0644 ${WORKDIR}/issue.net ${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 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 echo "#!/bin/sh" >> ${D}/etc/init.d/populate-var 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 echo "mkdir -p /var/lock/subsys" >> ${D}/etc/init.d/populate-var echo "chmod 755 /var/lock/subsys" >> ${D}/etc/init.d/populate-var echo "> /var/run/utmp" >> ${D}/etc/init.d/populate-var echo "touch /var/log/wtmp" >> ${D}/etc/init.d/populate-var echo "chmod 0664 /var/run/utmp /var/log/wtmp" >> ${D}/etc/init.d/populate-var echo "rm -f /var/run/utmpx" >> ${D}/etc/init.d/populate-var 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 ln -s /proc/mounts ${D}/etc/mtab fi # # populate some common mountpoints # install -m 0755 -d ${D}/mnt install -m 0755 -d ${D}/mnt/card install -m 0755 -d ${D}/mnt/cf install -m 0755 -d ${D}/mnt/net install -m 0755 -d ${D}/mnt/ram } PACKAGES = "${PN}-doc ${PN}" FILES_${PN} = "/" FILES_${PN}-doc = "/usr/share/doc /usr/share/common-licenses"