2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://ozlabs.org/~jk/projects/petitboot/downloads/
17 PKG_MD5SUM:=b320c434f38d57c1fcc6980e51d934a8
19 include $(INCLUDE_DIR)/package.mk
21 define Package/petitboot
23 CATEGORY:=Boot Loaders
24 DEPENDS:=+libtwin +udev +udevextras +kexec-tools @TARGET_ps3
25 TITLE:=Graphical bootloader
26 URL:=http://ozlabs.org/~jk/projects/petitboot/
29 define Build/Configure
33 TARGET_CPPFLAGS += -I$(PKG_BUILD_DIR)
36 PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
37 PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \
38 $(MAKE) -C $(PKG_BUILD_DIR) \
39 DESTDIR="$(PKG_INSTALL_DIR)" \
40 $(TARGET_CONFIGURE_OPTS) \
41 CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
45 define Package/petitboot/install
46 $(INSTALL_DIR) $(1)/usr/sbin
47 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/petitboot $(1)/usr/sbin/
48 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/petitboot-udev-helper \
50 $(INSTALL_BIN) files/petitboot-wrapper $(1)/usr/sbin/petitboot-wrapper
51 $(INSTALL_DIR) $(1)/usr/share/petitboot/
52 $(CP) $(PKG_INSTALL_DIR)/usr/share/petitboot/artwork \
53 $(1)/usr/share/petitboot/
54 $(INSTALL_DIR) $(1)/etc/udev/rules.d
55 $(CP) $(PKG_BUILD_DIR)/utils/99-petitboot.rules $(1)/etc/udev/rules.d/
56 $(INSTALL_DIR) $(1)/etc/init.d/
57 $(INSTALL_BIN) ./files/petitboot.init $(1)/etc/init.d/petitboot
61 $(eval $(call BuildPackage,petitboot))