1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
$NetBSD: patch-aa,v 1.6 2012/04/22 16:00:38 wiz Exp $
--- Makefile.orig 2012-01-14 14:07:55.000000000 +0000
+++ Makefile
@@ -1,8 +1,7 @@
# Makefile for The PCI Utilities
# (c) 1998--2012 Martin Mares <mj@ucw.cz>
-OPT=-O2
-CFLAGS=$(OPT) -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes
+CFLAGS=-Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes
VERSION=3.1.9
DATE=2012-01-14
@@ -13,7 +12,7 @@ RELEASE=
CROSS_COMPILE=
# Support for compressed pci.ids (yes/no, default: detect)
-ZLIB=
+ZLIB=no
# Support for resolving ID's by DNS (yes/no, default: detect)
DNS=
@@ -22,23 +21,23 @@ DNS=
SHARED=no
# ABI version suffix in the name of the shared library
-ABI_VERSION=.3
+ABI_VERSION=-version-info 3:0
# Installation directories
-PREFIX=/usr/local
+#PREFIX=/usr/local
SBINDIR=$(PREFIX)/sbin
-SHAREDIR=$(PREFIX)/share
+SHAREDIR=$(PREFIX)/share/pciutils
IDSDIR=$(SHAREDIR)
-MANDIR:=$(shell if [ -d $(PREFIX)/share/man ] ; then echo $(PREFIX)/share/man ; else echo $(PREFIX)/man ; fi)
-INCDIR=$(PREFIX)/include
+MANDIR=$(PREFIX)/$(PKGMANDIR)
+INCDIR=$(PREFIX)/include/pciutils
LIBDIR=$(PREFIX)/lib
PKGCFDIR=$(LIBDIR)/pkgconfig
# Commands
-INSTALL=install
-DIRINSTALL=install -d
-STRIP=-s
-CC=$(CROSS_COMPILE)gcc
+#INSTALL=install
+#DIRINSTALL=install -d
+#STRIP=-s
+#CC=$(CROSS_COMPILE)gcc
AR=$(CROSS_COMPILE)ar
RANLIB=$(CROSS_COMPILE)ranlib
@@ -100,23 +99,31 @@ distclean: clean
install: all
# -c is ignored on Linux, but required on FreeBSD
- $(DIRINSTALL) -m 755 $(DESTDIR)$(SBINDIR) $(DESTDIR)$(IDSDIR) $(DESTDIR)$(MANDIR)/man8 $(DESTDIR)$(MANDIR)/man7
- $(INSTALL) -c -m 755 $(STRIP) lspci setpci $(DESTDIR)$(SBINDIR)
- $(INSTALL) -c -m 755 update-pciids $(DESTDIR)$(SBINDIR)
- $(INSTALL) -c -m 644 $(PCI_IDS) $(DESTDIR)$(IDSDIR)
- $(INSTALL) -c -m 644 lspci.8 setpci.8 update-pciids.8 $(DESTDIR)$(MANDIR)/man8
- $(INSTALL) -c -m 644 pcilib.7 $(DESTDIR)$(MANDIR)/man7
+ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(SBINDIR)
+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(IDSDIR)
+ $(BSD_INSTALL_MAN_DIR) $(DESTDIR)$(MANDIR)/man8
+ $(BSD_INSTALL_MAN_DIR) $(DESTDIR)$(MANDIR)/man7
+ $(BSD_INSTALL_PROGRAM) lspci $(DESTDIR)$(SBINDIR)
+ $(BSD_INSTALL_PROGRAM) setpci $(DESTDIR)$(SBINDIR)
+ $(BSD_INSTALL_SCRIPT) update-pciids $(DESTDIR)$(SBINDIR)
+ $(BSD_INSTALL_DATA) $(PCI_IDS) $(DESTDIR)$(IDSDIR)
+ for fn in lspci.8 setpci.8 update-pciids.8; do \
+ $(BSD_INSTALL_MAN) $$fn $(DESTDIR)$(MANDIR)/man8; \
+ done
+ $(BSD_INSTALL_MAN) pcilib.7 $(DESTDIR)$(MANDIR)/man7
ifeq ($(SHARED),yes)
- $(DIRINSTALL) -m 755 $(DESTDIR)$(LIBDIR)
- $(INSTALL) -c -m 644 lib/$(PCILIB) $(DESTDIR)$(LIBDIR)
+ $(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(LIBDIR)
+ $(BSD_INSTALL_LIB) lib/$(PCILIB) $(DESTDIR)$(LIBDIR)
ln -sf $(PCILIB) $(DESTDIR)$(LIBDIR)/$(LIBNAME).so$(ABI_VERSION)
endif
install-lib: $(PCIINC_INS) lib/$(PCILIB) lib/$(PCILIBPC)
- $(DIRINSTALL) -m 755 $(DESTDIR)$(INCDIR)/pci $(DESTDIR)$(LIBDIR) $(DESTDIR)$(PKGCFDIR)
- $(INSTALL) -c -m 644 $(PCIINC_INS) $(DESTDIR)$(INCDIR)/pci
- $(INSTALL) -c -m 644 lib/$(PCILIB) $(DESTDIR)$(LIBDIR)
- $(INSTALL) -c -m 644 lib/$(PCILIBPC) $(DESTDIR)$(PKGCFDIR)
+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCDIR)
+ $(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(LIBDIR)
+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(PKGCFDIR)
+ $(BSD_INSTALL_DATA) $(PCIINC_INS) $(DESTDIR)$(INCDIR)
+ $(BSD_INSTALL_LIB) lib/$(PCILIB) $(DESTDIR)$(LIBDIR)
+ $(BSD_INSTALL_DATA) lib/$(PCILIBPC) $(DESTDIR)$(PKGCFDIR)
ifeq ($(SHARED),yes)
ln -sf $(LIBNAME).so$(ABI_VERSION) $(DESTDIR)$(LIBDIR)/$(LIBNAME).so
endif
|