summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d52d8e7db91f9fd96ca4c44ad8ae07db841223b0 (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
# Maintainer: Bailey Kasin <bailey@gingertechnology.net>

pkgname=dtrace-utils
pkgver=1.1.1
pkgrel=5
pkgdesc="DTrace-utils contains the Userspace portion of the DTrace port to Linux"
arch=('x86_64')
url="https://github.com/oracle/dtrace-utils"
license=('UPL')
depends=(
        'elfutils'
        'zlib'
        'sudo'
        'git'
)
makedepends=(
	'glibc'
	'flex'
	'bison'
	'libelf'
	'kernel-uek-devel'
	'dtrace-utils-devel'
	'libdtrace-ctf'
)
source=(
	'https://yum.oracle.com/repo/OracleLinux/OL7/UEKR5/x86_64/getPackageSource/dtrace-utils-1.1.1-1.el7.src.rpm'
	'third_arg.patch'
	'sysmacros.patch'
)
md5sums=(
	'f8ad5199cf7e311eac044a1e52c9a431'
	'48b69bae8daf29415f45c3a22c3f4d7f'
	'5fbb6aaae1b2b2fd4f63282ff9304dcd'
)

prepare() {
	cd "$srcdir"
	tar xvf dtrace-utils-1.1.1.tar.bz2

	cd "$srcdir/$pkgname-$pkgver"
	patch -p0 < "${srcdir}/third_arg.patch"
	patch -p0 < "${srcdir}/sysmacros.patch"
}

build() {
	unset CFLAGS

	cd "$srcdir/$pkgname-$pkgver"
	mkdir ../linux
	cp -r /usr/src/kernels/4.14.35-1844.0.7.el7uek.x86_64/include/uapi/linux/dtrace ../linux/
        make HDRPREFIX="$srcdir/"
}

package() {
        cd "$srcdir/$pkgname-$pkgver"

        make DESTDIR="$pkgdir/" install
	mv "$pkgdir"/usr/lib64 "$pkgdir"/usr/lib
	mv "$pkgdir"/usr/sbin/* "$pkgdir"/usr/bin
	rmdir "$pkgdir"/usr/sbin
	rm "$pkgdir"/usr/include/dtrace.h
	rm "$pkgdir"/usr/bin/ctf_module_dump
}