aboutsummaryrefslogtreecommitdiffstats
path: root/main/pciutils/APKBUILD
blob: 91f989f35634a6ceeede290e1237cf4a24f84435 (plain)
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
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=pciutils
pkgver=3.5.2
pkgrel=0
pkgdesc="PCI bus configuration space access library and tools"
url="http://mj.ucw.cz/pciutils.html"
arch="all"
license="GPL"
depends="hwdata-pci"
makedepends="linux-headers"
install=
subpackages="$pkgname-doc $pkgname-dev $pkgname-libs"
source="http://www.kernel.org/pub/software/utils/$pkgname/$pkgname-$pkgver.tar.gz
	fix-linking-pci-malloc-Makefile.patch
	pread.patch
	"

_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	sed -i -e "106s/^/\#/" Makefile
	make OPT="$CFLAGS" ZLIB=no \
		SHARED=yes \
		PREFIX=/usr \
		SHAREDIR=/usr/share/hwdata \
		MANDIR=/usr/share/man \
		all || return 1
}

package() {
	cd "$_builddir"
	make PREFIX="$pkgdir"/usr \
		SHARED=yes \
		SHAREDIR="$pkgdir"/usr/share/hwdata \
		MANDIR="$pkgdir"/usr/share/man \
		install
	
	install -d "$pkgdir"/usr/lib
	ln -s libpci.so.${pkgver%%.*} "$pkgdir"/usr/lib/libpci.so || return 1
	install -D -m 644 lib/libpci.pc "$pkgdir"/usr/lib/pkgconfig/libpci.pc \
		|| return 1
	for i in config.h header.h pci.h types.h; do
		install -D -m 644 lib/${i} "$pkgdir"/usr/include/pci/${i} \
			|| return 1
	done

}

md5sums="88246f95b05b7e54a035a5efbb73fb8b  pciutils-3.5.2.tar.gz
f56647a25dd1cfe80f6141914c2c0591  fix-linking-pci-malloc-Makefile.patch
c6a4ba5d34824a53cb0035bc2d1ca0f8  pread.patch"
sha256sums="57c4961b20265ec94d25c8dcfa5f32fb738036a2ee93d2e2cf968621062c06b9  pciutils-3.5.2.tar.gz
75ff5022e6a223297aa51ffcee80e6fa58bae839d0ae3ae2861013cabce6fba8  fix-linking-pci-malloc-Makefile.patch
8ebd84f0d84c3f2935bbe0ed9ec8c186f448803888c3791ca8e4253177c1f7f9  pread.patch"
sha512sums="1fd945a320e6130f60cbb3e17f3ea6b48efeda57d7971fca62a62d0a1f05baf7f13ce69813f3ddd7a8eada1650795e41c5f03c65f780d5765d21f6a9ab1155a8  pciutils-3.5.2.tar.gz
520b39602078e4325d7dac2d460547b360f7b52c668d88cf3d776c59246c8cfcb537b7b4f50575da9d2fcea1e207b3e99626ce4f23df890d2565b7dac1db2d94  fix-linking-pci-malloc-Makefile.patch
aa1d3272500180256929b39a5fc4ea38ddb6a9fad090d732832ded9cc396303cf56efc91cfdeb76edbcfefc9a7c8eb058562c3c2b09a9090a59d3e68c27cec62  pread.patch"