Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,31 @@

pkgname=pciutils
pkgver=3.14.0
pkgrel=1
pkgrel=2
pkgdesc="PCI bus configuration space access library and tools"
arch=(x86_64 aarch64 riscv64 loongarch64)
license=(GPL-2.0-only)
groups=(base)
makedepends=(zlib linux-headers)
provides=(libpci.so)
url="https://git.kernel.org/pub/scm/utils/pciutils/pciutils.git"
source=("https://www.kernel.org/pub/software/utils/pciutils/pciutils-${pkgver}.tar.xz")
sha256sums=('e7713409882813991d2269d125e40dad1f54a019a52b78b3962941c1d4a6f86f')

prepare()
{
cd $pkgname-$pkgver
sed -i '1s/^/#include<libgen.h> /' lib/sysfs.c
}
_makeargs=(
PREFIX=/usr
CC=cc
SHAREDIR=/usr/share/hwdata
SBINDIR=/usr/bin
SHARED=yes
)

build()
{
build() {
cd $pkgname-$pkgver
make PREFIX=/usr CC=cc SHAREDIR=/usr/share/hwdata SBINDIR=/usr/bin
make "${_makeargs[@]}"
}

package()
{
package() {
cd $pkgname-$pkgver
make DESTDIR="${pkgdir}" PREFIX=/usr SHAREDIR=/usr/share/hwdata SBINDIR=/usr/bin install
make DESTDIR="${pkgdir}" "${_makeargs[@]}" install install-lib
}