import sysvinit package
authorMike Frysinger <vapier@gentoo.org>
Tue, 13 Dec 2005 05:01:49 +0000 (05:01 -0000)
committerMike Frysinger <vapier@gentoo.org>
Tue, 13 Dec 2005 05:01:49 +0000 (05:01 -0000)
package/Config.in
package/sysvinit/Config.in [new file with mode: 0644]
package/sysvinit/sysvinit-2.86-gentoo.patch [new file with mode: 0644]
package/sysvinit/sysvinit.mk [new file with mode: 0644]

index ca159d1c9cdd5cec4f514ff5b4b47e31a65d6d39..477851b963403eea6fd81133c07f090af110380a 100644 (file)
@@ -110,6 +110,7 @@ source "package/slang/Config.in"
 source "package/socat/Config.in"
 source "package/strace/Config.in"
 source "package/sysklogd/Config.in"
+source "package/sysvinit/Config.in"
 source "package/tcl/Config.in"
 source "package/tcpdump/Config.in"
 source "package/tftpd/Config.in"
diff --git a/package/sysvinit/Config.in b/package/sysvinit/Config.in
new file mode 100644 (file)
index 0000000..fc645d4
--- /dev/null
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_SYSVINIT
+       bool "sysvinit"
+       default n
+       help
+         /sbin/init - parent of all processes
+
+         http://freshmeat.net/projects/sysvinit/
diff --git a/package/sysvinit/sysvinit-2.86-gentoo.patch b/package/sysvinit/sysvinit-2.86-gentoo.patch
new file mode 100644 (file)
index 0000000..06b9e15
--- /dev/null
@@ -0,0 +1,9 @@
+--- sysvinit/src/Makefile
++++ sysvinit/src/Makefile
+@@ -10,5 +10,3 @@
+-CC    = gcc
+-CFLAGS        = -Wall -O2 -fomit-frame-pointer -D_GNU_SOURCE
+-LDFLAGS       = -s
++CFLAGS        += -Wall -D_GNU_SOURCE
+ STATIC        =
diff --git a/package/sysvinit/sysvinit.mk b/package/sysvinit/sysvinit.mk
new file mode 100644 (file)
index 0000000..3a94a0d
--- /dev/null
@@ -0,0 +1,48 @@
+#############################################################
+#
+# sysvinit
+#
+#############################################################
+SYSVINIT_VER:=2.86
+SYSVINIT_SOURCE:=sysvinit-$(SYSVINIT_VER).tar.gz
+SYSVINIT_SITE:=ftp://ftp.cistron.nl/pub/people/miquels/software
+SYSVINIT_DIR:=$(BUILD_DIR)/sysvinit-$(SYSVINIT_VER)
+SYSVINIT_CAT:=zcat
+SYSVINIT_BINARY:=src/init
+SYSVINIT_TARGET_BINARY:=bin/init
+
+$(DL_DIR)/$(SYSVINIT_SOURCE):
+       $(WGET) -P $(DL_DIR) $(SYSVINIT_SITE)/$(SYSVINIT_SOURCE)
+
+sysvinit-unpacked: $(SYSVINIT_DIR)/.unpacked
+$(SYSVINIT_DIR)/.unpacked: $(DL_DIR)/$(SYSVINIT_SOURCE)
+       $(SYSVINIT_CAT) $(DL_DIR)/$(SYSVINIT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+       toolchain/patch-kernel.sh $(SYSVINIT_DIR) package/sysvinit/ sysvinit-*.patch
+       touch $(SYSVINIT_DIR)/.unpacked
+
+$(SYSVINIT_DIR)/$(SYSVINIT_BINARY): $(SYSVINIT_DIR)/.unpacked
+       CFLAGS="$(TARGET_CFLAGS)" $(MAKE) CC=$(TARGET_CC) -C $(SYSVINIT_DIR)/src
+
+$(TARGET_DIR)/$(SYSVINIT_TARGET_BINARY): $(SYSVINIT_DIR)/$(SYSVINIT_BINARY)
+       for x in halt init shutdown ; do \
+               install -D $(SYSVINIT_DIR)/src/$$x $(TARGET_DIR)/sbin/$$x || exit 1 ; \
+       done
+
+sysvinit: uclibc ncurses $(TARGET_DIR)/$(SYSVINIT_TARGET_BINARY)
+
+sysvinit-clean:
+       for x in halt init shutdown ; do \
+               rm -f $(TARGET_DIR)/sbin/$$x || exit 1 ; \
+       done
+       -$(MAKE) -C $(SYSVINIT_DIR) clean
+
+sysvinit-dirclean:
+       rm -rf $(SYSVINIT_DIR)
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_SYSVINIT)),y)
+TARGETS+=sysvinit
+endif