diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-05-02 18:15:27 -0300 |
---|---|---|
committer | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-05-04 20:38:16 +0000 |
commit | 381c5afc56acd6da2dc0c456791e181d5f2270bc (patch) | |
tree | 0fd8068e0959e70f4952fc49e953c8567fb77aed | |
parent | fdb59ba80de4b51c111ff16d9d5d5648dbc6af81 (diff) | |
download | aports-381c5afc56acd6da2dc0c456791e181d5f2270bc.tar.bz2 aports-381c5afc56acd6da2dc0c456791e181d5f2270bc.tar.xz |
testing/linux-tools: streamline bash-completion package
- Use modern style
- Create perf-bash-completion and replace perf-bash-completions
- Install completions to /usr/share/bash-completion/completions
- perf-bash-completion noarch
- Install completions when bash-completion is installed not when bash is
Closes GH-7501
-rw-r--r-- | testing/linux-tools/APKBUILD | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/testing/linux-tools/APKBUILD b/testing/linux-tools/APKBUILD index e9cb837e87..79bc6f9d7f 100644 --- a/testing/linux-tools/APKBUILD +++ b/testing/linux-tools/APKBUILD @@ -1,9 +1,10 @@ +# Contributor: Leo <thinkabit.ukim@gmail.com> # Contributor: Carlo Landmeter <clandmeter@gmail.com> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=linux-tools pkgver=4.18.13 _kernver=${pkgver%.*} -pkgrel=0 +pkgrel=1 pkgdesc="Linux kernel tools meta package" url="https://www.kernel.org/" arch="all !aarch64 !armhf !armv7" @@ -12,10 +13,9 @@ depends="cpupower perf" depends_dev="pciutils-dev readline-dev gettext-dev" makedepends="$depends_dev elfutils-dev bash linux-headers flex bison diffutils zlib-dev findutils" -install="" -subpackages="perf perf-bash-completions:perf_completions cpupower $pkgname-doc $pkgname-dev" +subpackages="perf perf-bash-completion:bashcomp:noarch cpupower $pkgname-doc $pkgname-dev" source="https://kernel.org/pub/linux/kernel/v4.x/linux-$_kernver.tar.xz - https://kernel.org/pub/linux/kernel/v4.x/patch-$pkgver.xz + https://kernel.org/pub/linux/kernel/v4.x/patch-$pkgver.xz cpupower-libs.patch disable-Werror.patch " @@ -23,7 +23,6 @@ source="https://kernel.org/pub/linux/kernel/v4.x/linux-$_kernver.tar.xz builddir="$srcdir"/linux-$_kernver prepare() { - local _patch_failed= cd "$srcdir"/linux-$_kernver if [ "${pkgver%.0}" = "$pkgver" ]; then msg "Applying patch-$pkgver.xz" @@ -40,12 +39,10 @@ _make_tools() { } build() { - cd "$builddir" _make_tools perf cpupower } package() { - cd "$builddir" mkdir -p "$pkgdir" _make_tools DESTDIR="$pkgdir" \ perf_install cpupower_install @@ -75,11 +72,12 @@ perf() { mv "$pkgdir"/usr/libexec "$subpkgdir"/usr/ } -perf_completions() { - pkgdesc="bash autocompletion for perf" - install_if="perf=$pkgver-r$pkgrel bash" - mkdir -p "$subpkgdir"/etc - mv "$pkgdir"/etc/bash_completion.d "$subpkgdir"/etc/ +bashcomp() { + replaces="$pkgname-bash-completion" # Backward compatibility + pkgdesc="Bash autocompletion for $pkgname" + install_if="perf=$pkgver-r$pkgrel bash-completion" + mkdir -p "$subpkgdir"/usr/share/bash-completion/completions + mv "$pkgdir"/etc/bash_completion.d "$subpkgdir"/usr/share/bash-completion/completions } sha512sums="950eb85ac743b291afe9f21cd174d823e25f11883ee62cecfbfff8fe8c5672aae707654b1b8f29a133b1f2e3529e63b9f7fba4c45d6dacccc8000b3a9a9ae038 linux-4.18.tar.xz |