Add unvram, a nvram manipulation tool suitable for brcm-2.4 and bcm47xx platforms
[openwrt/staging/dedeckeh.git] / package / unvram / Makefile
1 #
2 # Copyright (C) 2009 Jo-Philipp Wich <xm@subsignal.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:=unvram
11 PKG_RELEASE:=1
12
13 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
14
15 include $(INCLUDE_DIR)/package.mk
16
17 define Package/unvram
18 SECTION:=utils
19 CATEGORY:=Base system
20 TITLE:=Userspace port of the Broadcom NVRAM manipulation tool
21 endef
22
23 define Package/unvram/description
24 This package contains an utility to manipulate NVRAM on Broadcom based devices.
25 It works on both brcm-2.4 and bcm47xx (Linux 2.6) without using the kernel api.
26 endef
27
28 define Build/Prepare
29 mkdir -p $(PKG_BUILD_DIR)
30 $(CP) ./src/* $(PKG_BUILD_DIR)/
31 endef
32
33 define Build/Configure
34 endef
35
36 define Build/Compile
37 $(MAKE) -C $(PKG_BUILD_DIR) \
38 CC="$(TARGET_CC)" \
39 CFLAGS="$(TARGET_CFLAGS) -Wall" \
40 LDFLAGS="$(TARGET_LDFLAGS)"
41 endef
42
43 define Package/unvram/install
44 $(INSTALL_DIR) $(1)/sbin
45 $(INSTALL_BIN) $(PKG_BUILD_DIR)/unvram $(1)/sbin/
46 $(INSTALL_DIR) $(1)/usr/lib
47 $(INSTALL_BIN) $(PKG_BUILD_DIR)/libnvram.so.0.1 $(1)/usr/lib/
48 endef
49
50 $(eval $(call BuildPackage,unvram))