petitboot: add missing file and fix cflags issues
[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
31 endef
32
33 TARGET_CPPFLAGS += -I$(PKG_BUILD_DIR)
34
35 define Build/Compile
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)" \
42 all install
43 endef
44
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 \
49 $(1)/usr/sbin/
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
58
59 endef
60
61 $(eval $(call BuildPackage,petitboot))