2007-12-27 20:00:57 +00:00
|
|
|
#
|
2011-04-13 17:40:10 +00:00
|
|
|
# Copyright (C) 2007-2011 OpenWrt.org
|
2007-07-16 18:17:51 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=pciutils
|
2010-02-19 04:48:12 +00:00
|
|
|
PKG_VERSION:=3.1.7
|
2011-04-13 17:40:10 +00:00
|
|
|
PKG_RELEASE:=3
|
2007-07-16 18:17:51 +00:00
|
|
|
|
2007-12-27 20:00:57 +00:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
2010-01-21 08:51:15 +00:00
|
|
|
PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils
|
2010-02-19 04:48:12 +00:00
|
|
|
PKG_MD5SUM:=35222edb86b50a6641352c66fe829b2e
|
2010-01-21 08:51:15 +00:00
|
|
|
|
|
|
|
PKG_INSTALL:=1
|
2007-07-16 18:17:51 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/pciutils
|
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
|
|
|
TITLE:=Linux PCI Utilities
|
2007-12-27 20:00:57 +00:00
|
|
|
URL:=http://mj.ucw.cz/pciutils.shtml
|
2010-01-21 08:51:15 +00:00
|
|
|
DEPENDS:=+zlib
|
2007-10-14 04:32:56 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/pciutils/description
|
2007-12-27 20:00:57 +00:00
|
|
|
This package contains various utilities for inspecting and setting of
|
2007-10-14 04:32:56 +00:00
|
|
|
devices connected to the PCI bus.
|
2007-07-16 18:17:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/pciutils/postinst
|
|
|
|
#!/bin/sh
|
2011-04-13 17:40:10 +00:00
|
|
|
[ -z "$${IPKG_INSTROOT}" ] || \
|
2011-04-12 23:18:35 +00:00
|
|
|
(cd $${PKG_ROOT}/usr/share; $${PKG_ROOT}/usr/sbin/update-pciids; rm pci.ids.gz.old)
|
2010-01-21 12:58:33 +00:00
|
|
|
exit 0
|
2007-07-16 18:17:51 +00:00
|
|
|
endef
|
|
|
|
|
2007-12-27 20:00:57 +00:00
|
|
|
MAKE_FLAGS += \
|
2010-01-21 08:51:15 +00:00
|
|
|
CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
|
|
|
|
PREFIX="/usr" \
|
2007-12-27 20:00:57 +00:00
|
|
|
HOST="$(GNU_TARGET_NAME)" \
|
2010-01-21 08:51:15 +00:00
|
|
|
ZLIB="yes" \
|
2007-07-16 18:17:51 +00:00
|
|
|
|
2011-06-25 13:13:23 +00:00
|
|
|
ifneq ($(CONFIG_USE_EGLIBC)$(CONFIG_USE_GLIBC),)
|
|
|
|
TARGET_LDFLAGS += -lresolv
|
|
|
|
endif
|
|
|
|
|
2007-07-16 18:17:51 +00:00
|
|
|
define Build/InstallDev
|
2007-10-07 03:20:26 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/lib/libpci.a $(1)/usr/lib
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include/pci
|
2007-12-27 20:00:57 +00:00
|
|
|
$(CP) $(foreach i,pci.h config.h header.h types.h, \
|
|
|
|
$(PKG_BUILD_DIR)/lib/$(i)) $(1)/usr/include/pci
|
2007-07-16 18:17:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/pciutils/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2010-01-21 08:51:15 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{lspci,setpci,update-pciids} $(1)/usr/sbin/
|
2007-07-16 18:17:51 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/share
|
2010-01-21 08:51:15 +00:00
|
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pci.ids.gz $(1)/usr/share/
|
2007-07-16 18:17:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,pciutils))
|