This removes lines that set PKG_BUILD_DIR when the set value is no
different from the default value.
Specifically, the line is removed if the assigned value is:
* $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
The default PKG_BUILD_DIR was updated[1] to incorporate BUILD_VARIANT
if it is set, so now this is identical to the default value.
* $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
if PKG_SOURCE_SUBDIR is set to $(PKG_NAME)-$(PKG_VERSION), making it
the same as the previous case
* $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
This is the same as the default PKG_BUILD_DIR when there is no
BUILD_VARIANT.
* $(BUILD_DIR)/[name]-$(PKG_VERSION)
where [name] is a string that is identical to PKG_NAME
[1]: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=e545fac8d968864a965edb9e50c6f90940b0a6c9
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
(cherry picked from commit 53e1692ae9
)
110 lines
2.7 KiB
Makefile
110 lines
2.7 KiB
Makefile
#
|
|
# Copyright (C) 2010-2017 OpenWrt.org
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=flashrom
|
|
PKG_VERSION:=1.0
|
|
PKG_RELEASE:=2
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
PKG_SOURCE_URL:=https://download.flashrom.org/releases
|
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
|
PKG_HASH:=3702fa215ba5fb5af8e54c852d239899cfa1389194c1e51cb2a170c4dc9dee64
|
|
|
|
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
|
|
PKG_LICENSE:=GPL-2.0-or-later
|
|
PKG_LICENSE_FILES:=COPYING
|
|
|
|
PKG_INSTALL:=1
|
|
PKG_BUILD_PARALLEL:=1
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
include flashrom.mk
|
|
|
|
TARGET_CFLAGS+= \
|
|
-std=gnu89
|
|
|
|
MAKE_FLAGS+= \
|
|
PREFIX="/usr"
|
|
|
|
define Package/flashrom/default
|
|
SECTION:=utils
|
|
CATEGORY:=Utilities
|
|
TITLE:=FlashROM Utility
|
|
URL:=https://www.flashrom.org/
|
|
endef
|
|
|
|
define Package/flashrom
|
|
$(Package/flashrom/default)
|
|
TITLE+= (full)
|
|
DEPENDS+= \
|
|
+(TARGET_x86||TARGET_x86_64):dmidecode \
|
|
+libftdi1 \
|
|
+libusb-1.0 \
|
|
+libusb-compat \
|
|
+pciutils
|
|
VARIANT:=full
|
|
DEFAULT_VARIANT:=1
|
|
endef
|
|
|
|
define Package/flashrom-pci
|
|
$(Package/flashrom/default)
|
|
TITLE+= (pci)
|
|
DEPENDS+= \
|
|
+(TARGET_x86||TARGET_x86_64):dmidecode \
|
|
+pciutils
|
|
VARIANT:=pci
|
|
endef
|
|
|
|
define Package/flashrom-spi
|
|
$(Package/flashrom/default)
|
|
TITLE+= (spi)
|
|
VARIANT:=spi
|
|
endef
|
|
|
|
define Package/flashrom-usb
|
|
$(Package/flashrom/default)
|
|
TITLE+= (usb)
|
|
DEPENDS+= \
|
|
+libftdi1 \
|
|
+libusb-1.0 \
|
|
+libusb-compat
|
|
VARIANT:=usb
|
|
endef
|
|
|
|
define Package/flashrom/default/description
|
|
flashrom is an utility for identifying, reading, writing, verifying
|
|
and erasing flash chips. It's often used to flash BIOS/EFI/coreboot
|
|
/firmware images.
|
|
endef
|
|
Package/flashrom/description = $(Package/flashrom/default/description)
|
|
Package/flashrom-pci/description = $(Package/flashrom/default/description)
|
|
Package/flashrom-spi/description = $(Package/flashrom/default/description)
|
|
Package/flashrom-usb/description = $(Package/flashrom/default/description)
|
|
|
|
define Package/flashrom/install
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/flashrom $(1)/usr/sbin/flashrom
|
|
endef
|
|
define Package/flashrom-pci/install
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/flashrom $(1)/usr/sbin/flashrom-pci
|
|
endef
|
|
define Package/flashrom-spi/install
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/flashrom $(1)/usr/sbin/flashrom-spi
|
|
endef
|
|
define Package/flashrom-usb/install
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/flashrom $(1)/usr/sbin/flashrom-usb
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,flashrom))
|
|
$(eval $(call BuildPackage,flashrom-pci))
|
|
$(eval $(call BuildPackage,flashrom-spi))
|
|
$(eval $(call BuildPackage,flashrom-usb))
|