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.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://ozlabs.org/~jk/projects/petitboot/downloads/
16 PKG_MD5SUM:=b320c434f38d57c1fcc6980e51d934a8
18 include $(INCLUDE_DIR)/package.mk
20 define Package/petitboot
22 CATEGORY:=Boot Loaders
23 DEPENDS:=+libtwin +udev +udevextras +kexec-tools @TARGET_ps3
24 TITLE:=Graphical bootloader
25 URL:=http://ozlabs.org/~jk/projects/petitboot/
28 define Build/Configure
32 TARGET_CPPFLAGS += -I$(PKG_BUILD_DIR)
35 PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
36 PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \
37 $(MAKE) -C $(PKG_BUILD_DIR) \
38 DESTDIR="$(PKG_INSTALL_DIR)" \
39 $(TARGET_CONFIGURE_OPTS) \
40 CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
44 define Package/petitboot/install
45 $(INSTALL_DIR) $(1)/usr/sbin
46 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/petitboot $(1)/usr/sbin/
47 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/petitboot-udev-helper \
49 $(INSTALL_BIN) files/petitboot-wrapper $(1)/usr/sbin/petitboot-wrapper
50 $(INSTALL_DIR) $(1)/usr/share/petitboot/
51 $(CP) $(PKG_INSTALL_DIR)/usr/share/petitboot/artwork \
52 $(1)/usr/share/petitboot/
53 $(INSTALL_DIR) $(1)/etc/udev/rules.d
54 $(CP) $(PKG_BUILD_DIR)/utils/99-petitboot.rules $(1)/etc/udev/rules.d/
55 $(INSTALL_DIR) $(1)/etc/init.d/
56 $(INSTALL_BIN) ./files/petitboot.init $(1)/etc/init.d/petitboot
60 $(eval $(call BuildPackage,petitboot))