pciutils: add package

This commit is contained in:
Henrik Grimler 2018-06-09 00:47:08 +02:00 committed by Yaksh Bariya
parent be6edcdc8d
commit 1b62a00984
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
4 changed files with 103 additions and 0 deletions

View File

@ -0,0 +1,41 @@
--- ../Makefile.orig 2018-05-15 18:08:02.956789845 +0000
+++ ./Makefile 2018-05-15 18:29:20.181951320 +0000
@@ -16,10 +16,10 @@
ZLIB=
# Support for resolving ID's by DNS (yes/no, default: detect)
-DNS=
+DNS=no
# Build libpci as a shared library (yes/no; or local for testing; requires GCC)
-SHARED=no
+SHARED=yes
# Use libkmod to resolve kernel modules on Linux (yes/no, default: detect)
LIBKMOD=
@@ -32,8 +32,8 @@
ABI_VERSION=.3
# Installation directories
-PREFIX=/usr/local
-SBINDIR=$(PREFIX)/sbin
+PREFIX?=/usr/local
+SBINDIR=$(PREFIX)/bin
SHAREDIR=$(PREFIX)/share
IDSDIR=$(SHAREDIR)
MANDIR:=$(shell if [ -d $(PREFIX)/share/man ] ; then echo $(PREFIX)/share/man ; else echo $(PREFIX)/man ; fi)
@@ -44,10 +44,10 @@
# Commands
INSTALL=install
DIRINSTALL=install -d
-STRIP=-s
-CC=$(CROSS_COMPILE)gcc
-AR=$(CROSS_COMPILE)ar
-RANLIB=$(CROSS_COMPILE)ranlib
+STRIP=
+CC?=$(CROSS_COMPILE)gcc
+AR?=$(CROSS_COMPILE)ar
+RANLIB?=$(CROSS_COMPILE)ranlib
# Base name of the library (overriden on NetBSD, which has its own libpci)
LIBNAME=libpci

View File

@ -0,0 +1,17 @@
TERMUX_PKG_HOMEPAGE=http://mj.ucw.cz/sw/pciutils/
TERMUX_PKG_DESCRIPTION="The PCI Utilities are a collection of programs for inspecting and manipulating configuration of PCI devices"
TERMUX_PKG_VERSION=3.5.6
TERMUX_PKG_SRCURL=ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/pciutils-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=0d4d507d395e727384737d3c45cf8c5a0023864a6eb5c6ed7caf7d483995391d
TERMUX_PKG_BUILD_IN_SRC=yes
termux_step_pre_configure () {
local ARCH=$TERMUX_ARCH
if [ $ARCH == "arm" ]; then
ARCH="armv7l"
fi
# ${str^^} returns upper case string
sed -i "s%\@TERMUX_ARCH\@%${ARCH^^}%g" ./lib/config.h
sed -i "s%\@TERMUX_ARCH\@%${ARCH^^}%g" ./lib/config.mk
}

View File

@ -0,0 +1,18 @@
--- /dev/null 2018-05-15 17:54:13.876121969 +0000
+++ ./lib/config.h 2018-05-15 20:51:48.262434344 +0000
@@ -0,0 +1,15 @@
+#define PCI_CONFIG_H
+#define PCI_ARCH_@TERMUX_ARCH@
+#define PCI_OS_LINUX
+#define PCI_HAVE_PM_LINUX_SYSFS
+#define PCI_HAVE_PM_LINUX_PROC
+#define PCI_HAVE_LINUX_BYTEORDER_H
+#define PCI_PATH_PROC_BUS_PCI "/proc/bus/pci"
+#define PCI_PATH_SYS_BUS_PCI "/sys/bus/pci"
+#define PCI_HAVE_64BIT_ADDRESS
+#define PCI_HAVE_PM_DUMP
+#define PCI_COMPRESSED_IDS
+#define PCI_IDS "pci.ids.gz"
+#define PCI_PATH_IDS_DIR "@TERMUX_PREFIX@/share"
+#define PCI_SHARED_LIB
+#define PCILIB_VERSION "3.5.6"

View File

@ -0,0 +1,27 @@
--- /dev/null 2018-05-15 17:54:13.876121969 +0000
+++ ./lib/config.mk 2018-05-15 20:49:52.162339095 +0000
@@ -0,0 +1,24 @@
+WITH_LIBS=
+LIBEXT=so
+LIBZ=-lz
+WITH_LIBS+=$(LIBZ)
+PCILIB=$(LIBNAME).$(LIBEXT).$(VERSION)
+LDLIBS=
+LIB_LDLIBS=$(WITH_LIBS)
+SONAME=-Wl,-soname,$(LIBNAME).$(LIBEXT)$(ABI_VERSION)
+PCILIBPC=$(LIBNAME).pc
+PCI_CONFIG_H=1
+PCI_ARCH_@TERMUX_ARCH@=1
+PCI_OS_LINUX=1
+PCI_HAVE_PM_LINUX_SYSFS=1
+PCI_HAVE_PM_LINUX_PROC=1
+PCI_HAVE_LINUX_BYTEORDER_H=1
+PCI_PATH_PROC_BUS_PCI=/proc/bus/pci
+PCI_PATH_SYS_BUS_PCI=/sys/bus/pci
+PCI_HAVE_64BIT_ADDRESS=1
+PCI_HAVE_PM_DUMP=1
+PCI_COMPRESSED_IDS=1
+PCI_IDS=pci.ids.gz
+PCI_PATH_IDS_DIR=@TERMUX_PREFIX@/share
+PCI_SHARED_LIB=1
+PCILIB_VERSION=3.5.6