Add more license tags with SPDX identifiers
[openwrt.git] / package / utils / nvram / Makefile
1 #
2 # Copyright (C) 2009-2010 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:=nvram
11 PKG_RELEASE:=9
12
13 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
14
15 PKG_LICENSE:=GPL-2.0+
16 PKG_LICENSE_FILES:=
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/nvram
21   SECTION:=utils
22   CATEGORY:=Base system
23   TITLE:=Userspace port of the Broadcom NVRAM manipulation tool
24   MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org>
25   DEPENDS:=@TARGET_brcm47xx||@TARGET_bcm53xx||@TARGET_ar71xx
26 endef
27
28 define Package/nvram/description
29  This package contains an utility to manipulate NVRAM on Broadcom based devices.
30  It works on bcm47xx (Linux 2.6) without using the kernel api.
31 endef
32
33 define Build/Prepare
34         mkdir -p $(PKG_BUILD_DIR)
35         $(CP) ./src/* $(PKG_BUILD_DIR)/
36 endef
37
38 define Build/Configure
39 endef
40
41 define Build/Compile
42         $(MAKE) -C $(PKG_BUILD_DIR) \
43                 CC="$(TARGET_CC)" \
44                 CFLAGS="$(TARGET_CFLAGS) -Wall" \
45                 LDFLAGS="$(TARGET_LDFLAGS)"
46 endef
47
48 define Build/InstallDev
49         $(INSTALL_DIR) $(1)/usr/lib
50         $(INSTALL_BIN) $(PKG_BUILD_DIR)/libnvram.so.0.1 $(1)/usr/lib/
51         ln -s libnvram.so.0.1 $(1)/usr/lib/libnvram.so
52 endef
53
54 define Package/nvram/install
55         $(INSTALL_DIR) $(1)/etc/init.d
56         $(INSTALL_BIN) ./files/nvram.init $(1)/etc/init.d/nvram
57         $(INSTALL_DIR) $(1)/usr/sbin
58         $(INSTALL_BIN) $(PKG_BUILD_DIR)/nvram $(1)/usr/sbin/
59         $(INSTALL_DIR) $(1)/usr/lib
60         $(INSTALL_BIN) $(PKG_BUILD_DIR)/libnvram.so.0.1 $(1)/usr/lib/
61 endef
62
63 $(eval $(call BuildPackage,nvram))