Initial commit of petitboot bootlaoder package
[openwrt/svn-archive/archive.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 # $Id:$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=petitboot
12 PKG_VERSION:=0.2
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://ozlabs.org/~jk/projects/petitboot/downloads/
17 PKG_MD5SUM:=b320c434f38d57c1fcc6980e51d934a8
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/petitboot
22 SECTION:=boot
23 CATEGORY:=Boot Loaders
24 DEPENDS:=+libtwin +udev +udevextras +kexec-tools
25 TITLE:=Graphical bootloader
26 URL:=http://ozlabs.org/~jk/projects/petitboot/
27 endef
28
29 define Build/Configure
30 endef
31
32 define Build/Compile
33 PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
34 PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \
35 $(MAKE) -C $(PKG_BUILD_DIR) \
36 DESTDIR="$(PKG_INSTALL_DIR)" \
37 $(TARGET_CONFIGURE_OPTS) \
38 all install
39 endef
40
41 define Package/petitboot/install
42 $(INSTALL_DIR) $(1)/usr/sbin
43 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/petitboot $(1)/usr/sbin/
44 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/petitboot-udev-helper \
45 $(1)/usr/sbin/
46 $(INSTALL_BIN) files/petitboot-wrapper $(1)/usr/sbin/petitboot-wrapper
47 $(INSTALL_DIR) $(1)/usr/share/petitboot/
48 $(CP) $(PKG_INSTALL_DIR)/usr/share/petitboot/artwork \
49 $(1)/usr/share/petitboot/
50 $(INSTALL_DIR) $(1)/etc/udev/rules.d
51 $(CP) $(PKG_BUILD_DIR)/utils/99-petitboot.rules $(1)/etc/udev/rules.d/
52 $(INSTALL_DIR) $(1)/etc/init.d/
53 $(INSTALL_BIN) ./files/petitboot.init $(1)/etc/init.d/petitboot
54
55 endef
56
57 $(eval $(call BuildPackage,petitboot))