Browse Source

pciutils: improved to build/install the shared and static version of libpci if possible (see note)

Note:

The default behavior of pciutils, to link all userspace tools against the
static library is preserved! The shared version is built in buildloop 2
but only the shared library itself is going to be installed!
user/karasz/next/updates
Christian Wiese 15 years ago
parent
commit
568408c4fc
  1. 37
      base/pciutils/libpci.patch
  2. 20
      base/pciutils/pciutils.conf

37
base/pciutils/libpci.patch

@ -1,37 +0,0 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../pciutils/libpci.patch
# Copyright (C) 2006 - 2007 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
--- ./Makefile.orig 2007-05-04 05:43:16.000000000 -0400
+++ ./Makefile 2007-05-04 16:59:08.000000000 -0400
@@ -9,6 +9,8 @@
PREFIX=/usr/local
SBINDIR=$(PREFIX)/sbin
+LIBDIR=$(PREFIX)/lib
+INCDIR=$(PREFIX)/include
SHAREDIR=$(PREFIX)/share
IDSDIR=$(SHAREDIR)
MANDIR:=$(shell if [ -d $(PREFIX)/share/man ] ; then echo $(PREFIX)/share/man ; else echo $(PREFIX)/man ; fi)
@@ -62,6 +64,9 @@
$(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 755 -d $(DESTDIR)$(INCDIR)/pci
+ $(INSTALL) -c -m 644 lib/libpci.a $(DESTDIR)$(LIBDIR)/
+ $(INSTALL) -c -m 644 lib/*.h $(DESTDIR)$(INCDIR)/pci/
uninstall: all
rm -f $(DESTDIR)$(SBINDIR)/lspci $(DESTDIR)$(SBINDIR)/setpci $(DESTDIR)$(SBINDIR)/update-pciids

20
base/pciutils/pciutils.conf

@ -2,7 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../pciutils/pciutils.conf
# Copyright (C) 2006 - 2007 The OpenSDE Project
# Copyright (C) 2006 - 2010 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
@ -15,6 +15,24 @@
var_append makeopt ' ' "PREFIX=/$prefix"
var_append makeinstopt ' ' "PREFIX=/$prefix"
if [ "$SDECFG_STATIC" != 1 ]; then
buildloops=2
fi
pciutils_preconf() {
if [ "$buildloop" -eq 2 ]; then
hook_add premake 1 "eval $MAKE clean"
var_append makeopt ' ' "SHARED=yes"
# only install the shared library
var_remove makeinstopt ' ' "install"
var_append makeinstopt ' ' "SHARED=yes"
fi
}
hook_add preconf 3 "pciutils_preconf"
# always install the library and header files
var_append makeinstopt ' ' "install-lib"
hook_add postpatch 5 "bzcat $( match_source_file -p pci.ids- ) > $root$datadir/pci.ids"
if pkginstalled gzip; then

Loading…
Cancel
Save