7bc76a82f0763183b79801e929a64deffa9659a3
[packages.git] / utils / petitboot / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=petitboot
11 PKG_VERSION:=0.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://ozlabs.org/~jk/projects/petitboot/downloads/
16 PKG_MD5SUM:=b320c434f38d57c1fcc6980e51d934a8
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/petitboot
21   SECTION:=boot
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/
26 endef
27
28 define Build/Configure
29
30 endef
31
32 TARGET_CPPFLAGS += -I$(PKG_BUILD_DIR)
33
34 define Build/Compile
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)" \
41                 all install
42 endef
43
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 \
48                 $(1)/usr/sbin/
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
57
58 endef
59
60 $(eval $(call BuildPackage,petitboot))