buildrootschalter/package/pciutils/pciutils.mk
Peter Korsgaard 096b21e552 pciutils: fix access to pci.ids and make update-pciids work with busybox wget
Closes #1819

Fix two issues with pciutils:

- pciutils would look in /usr/share/misc for pci.ids, but install it in
  /usr/share. This is because pciutils doesn't use a ./configure script,
  so we have to also provide the configuration (make) arguments when
  we run make install as well. Fix it by making it look into /usr/share
  as that's simpler to do, and is what upstream does.

- the update-pciids script would call wget with the --no-timestamping
  option, which isn't supported by busybox wget. Fix it by simply
  removing that option as it isn't really critical.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-05-24 08:22:26 +02:00

46 lines
1.2 KiB
Makefile

#############################################################
#
# PCIUTILS
#
#############################################################
PCIUTILS_VERSION = 3.1.7
PCIUTILS_SITE = ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci
ifeq ($(BR2_PACKAGE_ZLIB),y)
PCIUTILS_ZLIB=yes
else
PCIUTILS_ZLIB=no
endif
PCIUTILS_DNS=no
PCIUTILS_SHARED=yes
define PCIUTILS_CONFIGURE_CMDS
$(SED) 's/wget --no-timestamping/wget/' $(PCIUTILS_DIR)/update-pciids.sh
$(SED) 's/uname -s/echo Linux/' \
-e 's/uname -r/echo $(LINUX_HEADERS_VERSION)/' \
$(PCIUTILS_DIR)/lib/configure
$(SED) 's/^STRIP/#STRIP/' $(PCIUTILS_DIR)/Makefile
endef
define PCIUTILS_BUILD_CMDS
$(MAKE) CC="$(TARGET_CC)" \
HOST="$(KERNEL_ARCH)-linux" \
OPT="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
RANLIB=$(TARGET_RANLIB) \
AR=$(TARGET_AR) \
-C $(PCIUTILS_DIR) \
SHARED=$(PCIUTILS_SHARED) \
ZLIB=$(PCIUTILS_ZLIB) \
DNS=$(PCIUTILS_DNS) \
PREFIX=/usr
endef
# Ditch install-lib if SHARED is an option in the future
define PCIUTILS_INSTALL_TARGET_CMDS
$(MAKE) BUILDDIR=$(@D) -C $(@D) PREFIX=$(TARGET_DIR)/usr install
$(MAKE) BUILDDIR=$(@D) -C $(@D) PREFIX=$(TARGET_DIR)/usr install-lib
endef
$(eval $(call GENTARGETS,package,pciutils))