aboutsummaryrefslogtreecommitdiffstats
path: root/community/hwinfo/APKBUILD
blob: df241d2363946aff1d0231f4df76a11cbcaed65a (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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=hwinfo
pkgver=21.56
pkgrel=0
pkgdesc="Hardware information tool"
url="https://github.com/openSUSE/hwinfo"
arch="all"
license="GPL-2.0-or-later"
makedepends="$depends_dev flex perl libx86emu-dev linux-headers"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="$pkgname-$pkgver.tar.gz::https://github.com/openSUSE/$pkgname/archive/$pkgver.tar.gz
	respect-flags.patch"
builddir="$srcdir/$pkgname-$pkgver"
options="!check"  # no tests provided

export HWINFO_VERSION=$pkgver

build() {
	cd "$builddir"

	# Build full and tiny static libraries.
	make tinystatic
	make static
	cp src/libhd*.a .
	make clean

	# Build full shared library.
	make shared LIBDIR=/usr/lib
}

package() {
	cd "$builddir"

	make install \
		LIBDIR=/usr/lib \
		DESTDIR="$pkgdir"

	rmdir "$pkgdir"/sbin "$pkgdir"/usr/lib || true

	install -m 644 -t "$pkgdir"/usr/lib/ libhd.a libhd_tiny.a

	mkdir -p "$pkgdir"/usr/share/man/man1
	cp doc/*.1 "$pkgdir"/usr/share/man/man1/

	mkdir -p "$pkgdir"/usr/share/man/man8
	cp doc/*.8 "$pkgdir"/usr/share/man/man8/
}

sha512sums="1b3753af3fa096fab1db106177ed923d282efd4c5f5dbed143f89357926d5aa91d11265db20de972af2d07d2fa99999765ace56c303887bad6db3812b84aba33  hwinfo-21.56.tar.gz
1a78d21c97bb2b699804c20622b7309573ba3d8dcfdaa8c2c31be42cba42a342e4a4fb451551ee4d1af9384ba455363727cc37839a26550871cca139b5a0ba20  respect-flags.patch"