```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
37 lines
1.4 KiB
Bash
37 lines
1.4 KiB
Bash
# Template file for 'trace-cmd'
|
|
pkgname=trace-cmd
|
|
version=2.9.1
|
|
revision=1
|
|
wrksrc="${pkgname}-v${version}"
|
|
build_style=gnu-makefile
|
|
make_build_args="prefix=/usr all gui doc"
|
|
make_install_args="prefix=/usr install install_gui install_doc"
|
|
make_use_env=1
|
|
hostmakedepends="git asciidoc pkg-config cmake qt5-qmake qt5-host-tools"
|
|
makedepends="json-c-devel libfreeglut-devel libxml2-devel qt5-devel"
|
|
short_desc="Tools to use ftrace Linux kernel internal tracer"
|
|
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
|
license="GPL-2.0-or-later, LGPL-2.1-only"
|
|
homepage="http://git.kernel.org/cgit/linux/kernel/git/rostedt/trace-cmd.git/"
|
|
distfiles="http://git.kernel.org/cgit/linux/kernel/git/rostedt/${pkgname}.git/snapshot/${pkgname}-v${version}.tar.gz"
|
|
checksum=9404fc3cf540ea795304608068c9db6cdb38b90584c7f3c43249785913d54b38
|
|
disable_parallel_build=yes
|
|
|
|
post_install() {
|
|
vmkdir usr/share/bash-completion/completions
|
|
mv ${DESTDIR}/usr/etc/bash_completion.d/* ${DESTDIR}/usr/share/bash-completion/completions
|
|
}
|
|
|
|
kernelshark_package() {
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
short_desc="GUI for ftrace Linux kernel internal tracer"
|
|
pkg_install() {
|
|
vmove usr/bin/kernelshark
|
|
vmove usr/bin/kshark-record
|
|
vmove usr/bin/kshark-su-record
|
|
vmove usr/lib/kernelshark
|
|
vmove usr/share/applications/kernelshark.desktop
|
|
vmove usr/share/icons/kernelshark
|
|
vmove usr/share/polkit-1/actions/org.freedesktop.kshark-record.policy
|
|
}
|
|
}
|