mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-12-24 14:06:47 +01:00
build: improve PKGBUILD install.
This commit is contained in:
parent
ddf27516bd
commit
fc7d0afb1f
1 changed files with 7 additions and 7 deletions
14
PKGBUILD
14
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue