From fc7d0afb1faccef969af50e40c5428690df9b25d Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Sat, 21 May 2022 18:07:03 +0100 Subject: [PATCH] build: improve PKGBUILD install. --- PKGBUILD | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 487d9e19..829e3e64 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -37,22 +37,22 @@ package() { local _build='.build' cd "$srcdir/$pkgname" - # Install all files from $_build/root + # Install all system files mapfile -t root < <(find "$_build/root" -type f -printf "%P\n") for file in "${root[@]}"; do install -Dm0644 "$_build/root/$file" "$pkgdir/$file" done - # Install all files from $_build/apparmor.d - mapfile -t apparmor < <(find "$_build/apparmor.d" -type f -printf "%P\n") - for file in "${apparmor[@]}"; do + # Install all apparmor profiles + mapfile -t profiles < <(find "$_build/apparmor.d" -type f -printf "%P\n") + for file in "${profiles[@]}"; do install -Dm0644 "$_build/apparmor.d/$file" "$pkgdir/etc/apparmor.d/$file" done # Ensure some systemd services do not start before apparmor rules are loaded - for path in systemd/*; do - service=$(basename "$path") - install -Dm0644 "$path" \ + for file in systemd/*; do + service=$(basename "$file") + install -Dm0644 "$file" \ "$pkgdir/usr/lib/systemd/system/$service.d/apparmor.conf" done