update everything to the latest version
[openwrt.git] / obsolete-buildroot / make / pciutils.mk
1 #############################################################
2 #
3 # pciutils
4 #
5 #############################################################
6 PCIUTILS_SOURCE:=pciutils-2.1.10.tar.gz
7 PCIUTILS_SITE:=ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci
8 PCIUTILS_DIR:=$(BUILD_DIR)/pciutils-2.1.10
9 PCIUTILS_CAT:=zcat
10
11 # Yet more targets...
12 PCIIDS_SITE:=http://pciids.sourceforge.net/
13 PCIIDS_SOURCE:=pci.ids.bz2
14 PCIIDS_CAT:=bzcat
15
16 $(DL_DIR)/$(PCIUTILS_SOURCE):
17          $(WGET) -P $(DL_DIR) $(PCIUTILS_SITE)/$(PCIUTILS_SOURCE)
18
19 $(DL_DIR)/$(PCIIDS_SOURCE):
20         $(WGET) -P $(DL_DIR) $(PCIIDS_SITE)/$(PCIIDS_SOURCE)
21
22 pciutils-source: $(DL_DIR)/$(PCIUTILS_SOURCE) $(DL_DIR)/$(PCIIDS_SOURCE)
23
24 $(PCIUTILS_DIR)/.unpacked: $(DL_DIR)/$(PCIUTILS_SOURCE) $(DL_DIR)/$(PCIIDS_SOURCE)
25         $(PCIUTILS_CAT) $(DL_DIR)/$(PCIUTILS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
26         $(PCIIDS_CAT) $(DL_DIR)/$(PCIIDS_SOURCE) > $(PCIUTILS_DIR)/pci.id
27         touch $(PCIUTILS_DIR)/.unpacked
28
29 $(PCIUTILS_DIR)/.configured: $(PCIUTILS_DIR)/.unpacked
30         (cd $(PCIUTILS_DIR); rm -rf config.cache; \
31                 $(TARGET_CONFIGURE_OPTS) \
32                 ./configure \
33                 --target=$(GNU_TARGET_NAME) \
34                 --host=$(GNU_TARGET_NAME) \
35                 --build=$(GNU_HOST_NAME) \
36                 --prefix=/usr \
37                 --exec-prefix=/usr \
38                 --bindir=/usr/bin \
39                 --sbindir=/usr/sbin \
40                 --libexecdir=/usr/lib \
41                 --sysconfdir=/etc \
42                 --datadir=/usr/share \
43                 --localstatedir=/var \
44                 --mandir=/usr/man \
45                 --infodir=/usr/info \
46                 $(DISABLE_NLS) \
47         );
48         touch  $(PCIUTILS_DIR)/.configured
49
50 $(PCIUTILS_DIR)/lspci: $(PCIUTILS_DIR)/.configured
51         $(MAKE) CC=$(TARGET_CC) -C $(PCIUTILS_DIR)
52
53 $(TARGET_DIR)/sbin/lspci: $(PCIUTILS_DIR)/lspci
54         install -c $(PCIUTILS_DIR)/lspci $(TARGET_DIR)/sbin/lspci
55
56 $(TARGET_DIR)/sbin/setpci: $(PCIUTILS_DIR)/setpci
57         install -c $(PCIUTILS_DIR)/setpci $(TARGET_DIR)/sbin/setpci
58
59 $(TARGET_DIR)/usr/share/misc/pci.ids: $(PCIUTILS_DIR)/.dist
60         install -Dc $(PCIUTILS_DIR)/pci.ids $(TARGET_DIR)/usr/share/misc/pci.ids
61
62
63 pciutils: uclibc $(TARGET_DIR)/sbin/setpci $(TARGET_DIR)/sbin/lspci $(TARGET_DIR)/usr/share/misc/pci.ids
64
65 pciutils-clean:
66         $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(PCIUTILS_DIR) uninstall
67         -$(MAKE) -C $(PCIUTILS_DIR) clean
68
69 pciutils-dirclean:
70         rm -rf $(PCIUTILS_DIR)
71