Add deviceism and postinst bits to modutils and sysvinit.
authorChris Larson <clarson@kergoth.com>
Tue, 21 Oct 2003 20:03:39 +0000 (20:03 +0000)
committerChris Larson <clarson@kergoth.com>
Tue, 21 Oct 2003 20:03:39 +0000 (20:03 +0000)
BKrev: 3f95911bU9FiQEg-FS3llW4Xi-9Upw

modutils/modutils-2.4.25-r0/modules_collie [new file with mode: 0644]
modutils/modutils-2.4.25-r0/modules_corgi [new file with mode: 0644]
modutils/modutils-2.4.25-r0/modules_husky [new file with mode: 0644]
modutils/modutils-2.4.25-r0/modules_poodle [new file with mode: 0644]
modutils/modutils-2.4.25-r0/modules_shepherd [new file with mode: 0644]
modutils/modutils_2.4.25.oe
sysvinit/sysvinit_2.85.oe

diff --git a/modutils/modutils-2.4.25-r0/modules_collie b/modutils/modutils-2.4.25-r0/modules_collie
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/modutils/modutils-2.4.25-r0/modules_corgi b/modutils/modutils-2.4.25-r0/modules_corgi
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/modutils/modutils-2.4.25-r0/modules_husky b/modutils/modutils-2.4.25-r0/modules_husky
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/modutils/modutils-2.4.25-r0/modules_poodle b/modutils/modutils-2.4.25-r0/modules_poodle
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/modutils/modutils-2.4.25-r0/modules_shepherd b/modutils/modutils-2.4.25-r0/modules_shepherd
new file mode 100644 (file)
index 0000000..e69de29
index cfee450..b9077b5 100644 (file)
@@ -7,3 +7,21 @@ inherit autotools
 
 EXTRA_OECONF = --disable-strip
 export BUILDCC = ${BUILD_CC}
+
+do_install_prepend () {
+       oe_runmake 'DESTDIR=${D}' install
+}
+
+do_install () {
+       install -d ${D}/${sysconfdir}
+       if [ -e ${FILESDIR}/modules_${MACHINE} ]; then
+               install -m 0644 ${FILESDIR}/modules_${MACHINE} ${D}/${sysconfdir}/modules
+       else
+               touch ${D}/${sysconfdir}/modules
+       fi
+       if [ -e ${FILESDIR}/modules.conf_${MACHINE} ]; then
+               install -m 0644 ${FILESDIR}/modules.conf_${MACHINE} ${D}/${sysconfdir}/modules.conf
+       else
+               touch ${D}/${sysconfdir}/modules.conf
+       fi
+}
index e69de29..b5683fd 100644 (file)
@@ -0,0 +1,71 @@
+DEPENDS=virtual/libc
+DESCRIPTION = "System-V like init.\
+ Init is the first program to run after your system is booted, and\
+ continues to run as process number 1 until your system halts. Inits\
+ job is to start other programs that are essential to the operation of\
+ your system. All processes are descended from init. For more information,\
+ see the manual page init(8)."
+PACKAGES = ${PN} sysv-rc
+FILES_${PN} = /sbin ${bindir} ${sysconfdir}
+FILES_sysv-rc = ${sbindir}
+
+SRC_URI = ftp://ftp.cistron.nl/pub/people/miquels/${PN}/${P}.tar.gz \
+         cvs://anoncvs:anoncvs@cvs.handhelds.org/cvs;module=apps/update-rc.d
+S="${WORKDIR}/${P}/src"
+
+CFLAGS_prepend = "-D_GNU_SOURCE "
+export LCRYPT = "-lcrypt"
+
+do_install () {
+       install -d ${D}/${bindir} ${D}/${sbindir} \
+                  ${D}/sbin ${D}/${sysconfdir}/default \
+                  ${D}/${sysconfdir}/init.d
+#      install -m 755 debian/sysv-rc/sbin/invoke-rc.d \
+#              debian/sysv-rc/sbin/update-rc.d ${D}/usr/sbin/
+       install -m 755 halt killall5 \
+               runlevel shutdown ${D}/sbin/
+       install -m 755 init ${D}/sbin/sysvinit
+       install -m 755 mesg last ${D}/usr/bin/
+       install -m 0755 ${FILESDIR}/need                ${D}/sbin/need.sysvinit
+       install -m 0755 ${FILESDIR}/provide             ${D}/sbin/provide.sysvinit
+       ln -sf halt ${D}/sbin/reboot
+       ln -sf halt ${D}/sbin/poweroff
+       ln -sf init ${D}/sbin/telinit
+       ln -sf killall5 ${D}/sbin/pidof
+       ln -sf last ${D}/usr/bin/lastb
+#      echo "/etc/inittab" > ${D}/CONTROL/conffiles
+#      echo "/etc/default/rcS" >> ${D}/CONTROL/conffiles
+#      install -m 0755    ${FILESDIR}/prerm            ${D}/CONTROL/
+#      install -m 0755    ${FILESDIR}/postinst         ${D}/CONTROL/
+       if [ -e ${FILESDIR}/inittab_${MACHINE} ]; then
+               install -m 0644    ${FILESDIR}/inittab_${MACHINE}       ${D}/etc/inittab
+       else
+               install -m 0644    ${FILESDIR}/inittab  ${D}/etc/inittab
+       fi
+       install -m 0644    ${FILESDIR}/rcS-default      ${D}/etc/default/rcS
+       install -m 0755    ${FILESDIR}/rc               ${D}/etc/init.d
+       install -m 0755    ${FILESDIR}/rcS              ${D}/etc/init.d
+       install -m 0755    ${WORKDIR}/update-rc.d/update-rc.d ${D}/${sbindir}/
+}
+
+pkg_postinst () {
+       set -e
+
+       if [ X"$1" != Xconfigure ]; then
+               exit 0
+       fi
+
+# FIXME: use update-alternatives.. but what if the user doesnt have it?
+#      if [ -n "`which update-alternatives 2>/dev/null`" ]; then
+#              update-alternatives blah
+#      else
+               ln -sf sysvinit /sbin/init
+#      fi
+       exit 0
+}
+
+#pkg_prerm () {
+#      set -e
+# FIXME: use update-alternatives
+#      exit 0
+#}