Initial commit of petitboot bootlaoder package
authorHamish Guthrie <hcg@openwrt.org>
Thu, 11 Dec 2008 15:42:51 +0000 (15:42 +0000)
committerHamish Guthrie <hcg@openwrt.org>
Thu, 11 Dec 2008 15:42:51 +0000 (15:42 +0000)
SVN-Revision: 13597

utils/petitboot/Makefile [new file with mode: 0644]
utils/petitboot/files/petitboot.init [new file with mode: 0644]

diff --git a/utils/petitboot/Makefile b/utils/petitboot/Makefile
new file mode 100644 (file)
index 0000000..eb9024a
--- /dev/null
@@ -0,0 +1,57 @@
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id:$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=petitboot
+PKG_VERSION:=0.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://ozlabs.org/~jk/projects/petitboot/downloads/
+PKG_MD5SUM:=b320c434f38d57c1fcc6980e51d934a8
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/petitboot
+  SECTION:=boot
+  CATEGORY:=Boot Loaders
+  DEPENDS:=+libtwin +udev +udevextras +kexec-tools
+  TITLE:=Graphical bootloader
+  URL:=http://ozlabs.org/~jk/projects/petitboot/
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+       PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
+       PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               $(TARGET_CONFIGURE_OPTS) \
+               all install
+endef
+
+define Package/petitboot/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/petitboot $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/petitboot-udev-helper \
+               $(1)/usr/sbin/
+       $(INSTALL_BIN) files/petitboot-wrapper $(1)/usr/sbin/petitboot-wrapper
+       $(INSTALL_DIR) $(1)/usr/share/petitboot/
+       $(CP) $(PKG_INSTALL_DIR)/usr/share/petitboot/artwork \
+               $(1)/usr/share/petitboot/
+       $(INSTALL_DIR) $(1)/etc/udev/rules.d
+       $(CP) $(PKG_BUILD_DIR)/utils/99-petitboot.rules $(1)/etc/udev/rules.d/
+       $(INSTALL_DIR) $(1)/etc/init.d/
+       $(INSTALL_BIN) ./files/petitboot.init $(1)/etc/init.d/petitboot
+
+endef
+
+$(eval $(call BuildPackage,petitboot))
diff --git a/utils/petitboot/files/petitboot.init b/utils/petitboot/files/petitboot.init
new file mode 100644 (file)
index 0000000..e02041c
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+START=80
+
+start() {
+       /usr/sbin/petitboot-wrapper &
+}
+
+stop() {
+       killall petitboot-wrapper
+       killall petitboot
+}