summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2010-10-08 02:15:02 +0200
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2010-10-08 02:15:02 +0200
commitb28569ff56706a134c9a166e6b4a67ebdc02cc83 (patch)
tree3e0991fd1b8f6eae451454bc3165577ffeb9bf67 /packages
parent492f8c41568fb8370220eafd27ea98f6ceb4b2ba (diff)
downloadembtoolkit-b28569ff56706a134c9a166e6b4a67ebdc02cc83.tar.gz
embtoolkit-b28569ff56706a134c9a166e6b4a67ebdc02cc83.tar.bz2
embtoolkit-b28569ff56706a134c9a166e6b4a67ebdc02cc83.tar.xz
Packages: Add NEW package upstart-0.6.6
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'packages')
-rw-r--r--packages/system/system.kconfig3
-rw-r--r--packages/system/system.mk4
-rw-r--r--packages/system/upstart/upstart.kconfig72
-rw-r--r--packages/system/upstart/upstart.mk116
4 files changed, 195 insertions, 0 deletions
diff --git a/packages/system/system.kconfig b/packages/system/system.kconfig
index e843051..6da446a 100644
--- a/packages/system/system.kconfig
+++ b/packages/system/system.kconfig
@@ -28,3 +28,6 @@ source packages/system/dbus/dbus.kconfig
#util-linux-ng
source packages/system/utillinuxng/utillinuxng.kconfig
+
+#upstart
+source packages/system/upstart/upstart.kconfig
diff --git a/packages/system/system.mk b/packages/system/system.mk
index 621db24..93364ac 100644
--- a/packages/system/system.mk
+++ b/packages/system/system.mk
@@ -30,3 +30,7 @@ ROOTFS_COMPONENTS-$(CONFIG_EMBTK_HAVE_DBUS) += dbus_install
#util-linux-ng
include $(EMBTK_ROOT)/packages/system/utillinuxng/utillinuxng.mk
ROOTFS_COMPONENTS-$(CONFIG_EMBTK_HAVE_UTILLINUXNG) += utillinuxng_install
+
+#upstart
+include $(EMBTK_ROOT)/packages/system/upstart/upstart.mk
+ROOTFS_COMPONENTS-$(CONFIG_EMBTK_HAVE_UPSTART) += upstart_install
diff --git a/packages/system/upstart/upstart.kconfig b/packages/system/upstart/upstart.kconfig
new file mode 100644
index 0000000..4eb47fd
--- /dev/null
+++ b/packages/system/upstart/upstart.kconfig
@@ -0,0 +1,72 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2010 Abdoulaye Walsimou GAYE. All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file upstart.kconfig
+# \brief upstart.kconfig of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date October 2010
+################################################################################
+
+config EMBTK_HAVE_UPSTART
+ bool "Have upstart"
+ select KEMBTK_EGLIBC_OPTION_EGLIBC_UTMPX if EMBTK_CLIB_EGLIBC
+ select KEMBTK_UCLIBC_UCLIBC_HAS_UTMPX if EMBTK_CLIB_UCLIBC
+ select EMBTK_HAVE_LIBNIH
+ help
+ Upstart is an event-based replacement for the /sbin/init daemon
+ which handles starting of tasks and services during boot,
+ stopping them during shutdown and supervising them while the
+ system is running.
+
+ It was originally developed for the Ubuntu distribution, but is
+ intended to be suitable for deployment in all Linux
+ distributions as a replacement for the venerable System-V init.
+
+ Feature are:
+ * Tasks and Services are started and stopped by events
+ * Events are generated as tasks and services are started and
+ stopped
+ * Events may be received from any other process on the system
+ * Services may be respawned if they die unexpectedly
+ * Supervision and respawning of daemons which separate from
+ their parent process
+ * Communication with the init daemon over D-Bus
+
+choice
+ prompt "upstart version you wish"
+ depends on EMBTK_HAVE_UPSTART
+ help
+ Here you can choose which version of upstart you want to use.
+
+ config EMBTK_UPSTART_VERSION_0_6_6
+ bool "upstart-0.6.6"
+endchoice
+
+config EMBTK_UPSTART_MAJOR_VERSION_STRING
+ string
+ default "0.6" if EMBTK_UPSTART_VERSION_0_6_6
+
+config EMBTK_UPSTART_VERSION_STRING
+ string
+ default "0.6.6" if EMBTK_UPSTART_VERSION_0_6_6
+
+config EMBTK_UPSTART_NEED_PATCH
+ bool
+
+
diff --git a/packages/system/upstart/upstart.mk b/packages/system/upstart/upstart.mk
new file mode 100644
index 0000000..e98a51d
--- /dev/null
+++ b/packages/system/upstart/upstart.mk
@@ -0,0 +1,116 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2010 Abdoulaye Walsimou GAYE. All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file upstart.mk
+# \brief upstart.mk of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date October 2010
+################################################################################
+
+UPSTART_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_UPSTART_VERSION_STRING)))
+UPSTART_MAJOR_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_UPSTART_MAJOR_VERSION_STRING)))
+UPSTART_SITE := http://upstart.ubuntu.com/download/$(UPSTART_MAJOR_VERSION)
+UPSTART_PATCH_SITE := ftp://ftp.embtoolkit.org/embtoolkit.org/upstart/$(UPSTART_VERSION)
+UPSTART_PACKAGE := upstart-$(UPSTART_VERSION).tar.gz
+UPSTART_BUILD_DIR := $(PACKAGES_BUILD)/upstart-$(UPSTART_VERSION)
+
+UPSTART_BINS =
+UPSTART_SBINS =
+UPSTART_INCLUDES =
+UPSTART_LIBS =
+UPSTART_PKGCONFIGS =
+
+UPSTART_DEPS := libnih_install
+
+upstart_install: $(UPSTART_BUILD_DIR)/.installed
+ @test -e $(UPSTART_BUILD_DIR)/.installed || \
+ $(MAKE) $(UPSTART_BUILD_DIR)/.installed
+ $(MAKE) $(UPSTART_BUILD_DIR)/.special
+
+$(UPSTART_BUILD_DIR)/.installed: $(UPSTART_DEPS) download_upstart \
+ $(UPSTART_BUILD_DIR)/.decompressed $(UPSTART_BUILD_DIR)/.configured
+ $(call EMBTK_GENERIC_MESSAGE,"Compiling and installing \
+ upstart-$(UPSTART_VERSION) in your root filesystem...")
+ $(call EMBTK_KILL_LT_RPATH,$(UPSTART_BUILD_DIR))
+ $(Q)$(MAKE) -C $(UPSTART_BUILD_DIR) $(J)
+ $(Q)$(MAKE) -C $(UPSTART_BUILD_DIR) DESTDIR=$(SYSROOT) install
+ $(Q)$(MAKE) libtool_files_adapt
+ $(Q)$(MAKE) pkgconfig_files_adapt
+ @touch $@
+
+download_upstart:
+ $(call EMBTK_GENERIC_MESSAGE,"Downloading $(UPSTART_PACKAGE) \
+ if necessary...")
+ @test -e $(DOWNLOAD_DIR)/$(UPSTART_PACKAGE) || \
+ wget -O $(DOWNLOAD_DIR)/$(UPSTART_PACKAGE) \
+ $(UPSTART_SITE)/$(UPSTART_PACKAGE)
+ifeq ($(CONFIG_EMBTK_UPSTART_NEED_PATCH),y)
+ @test -e $(DOWNLOAD_DIR)/upstart-$(UPSTART_VERSION).patch || \
+ wget -O $(DOWNLOAD_DIR)/upstart-$(UPSTART_VERSION).patch \
+ $(UPSTART_PATCH_SITE)/upstart-$(UPSTART_VERSION)-*.patch
+endif
+
+$(UPSTART_BUILD_DIR)/.decompressed:
+ $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(UPSTART_PACKAGE) ...")
+ @tar -C $(PACKAGES_BUILD) -xzf $(DOWNLOAD_DIR)/$(UPSTART_PACKAGE)
+ifeq ($(CONFIG_EMBTK_UPSTART_NEED_PATCH),y)
+ @cd $(UPSTART_BUILD_DIR); \
+ patch -p1 < $(DOWNLOAD_DIR)/upstart-$(UPSTART_VERSION).patch
+endif
+ @touch $@
+
+$(UPSTART_BUILD_DIR)/.configured:
+ $(Q)cd $(UPSTART_BUILD_DIR); \
+ CC=$(TARGETCC_CACHED) \
+ CXX=$(TARGETCXX_CACHED) \
+ AR=$(TARGETAR) \
+ RANLIB=$(TARGETRANLIB) \
+ AS=$(CROSS_COMPILE)as \
+ LD=$(TARGETLD) \
+ NM=$(TARGETNM) \
+ STRIP=$(TARGETSTRIP) \
+ OBJDUMP=$(TARGETOBJDUMP) \
+ OBJCOPY=$(TARGETOBJCOPY) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ CXXFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="-L$(SYSROOT)/$(LIBDIR) -L$(SYSROOT)/usr/$(LIBDIR)" \
+ CPPFLAGS="-I$(SYSROOT)/usr/include" \
+ PKG_CONFIG=$(PKGCONFIG_BIN) \
+ PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \
+ ./configure --build=$(HOST_BUILD) --host=$(STRICT_GNU_TARGET) \
+ --target=$(STRICT_GNU_TARGET) --libdir=/usr/$(LIBDIR) --disable-rpath \
+ --prefix=/ --exec-prefix= --sysconfdir=/etc
+ @touch $@
+
+upstart_clean:
+ $(call EMBTK_GENERIC_MESSAGE,"cleanup upstart...")
+ $(Q)-cd $(SYSROOT)/usr/bin; rm -rf $(UPSTART_BINS)
+ $(Q)-cd $(SYSROOT)/usr/sbin; rm -rf $(UPSTART_SBINS)
+ $(Q)-cd $(SYSROOT)/usr/include; rm -rf $(UPSTART_INCLUDES)
+ $(Q)-cd $(SYSROOT)/usr/$(LIBDIR); rm -rf $(UPSTART_LIBS)
+ $(Q)-cd $(SYSROOT)/usr/$(LIBDIR)/pkgconfig; rm -rf $(UPSTART_PKGCONFIGS)
+ $(Q)-rm -rf $(UPSTART_BUILD_DIR)*
+
+$(UPSTART_BUILD_DIR)/.special:
+ $(Q)-mkdir -p $(ROOTFS)/etc
+ $(Q)-mkdir -p $(ROOTFS)/etc/dbus-1
+ $(Q)-mkdir -p $(ROOTFS)/etc/dbus-1/system.d
+ $(Q)-cp $(SYSROOT)/etc/dbus-1/system.d/Upstart.conf \
+ $(ROOTFS)/etc/dbus-1/system.d
+ $(Q)-cp -R $(SYSROOT)/etc/init $(ROOTFS)/etc/