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'
|
local _build='.build'
|
||||||
cd "$srcdir/$pkgname"
|
cd "$srcdir/$pkgname"
|
||||||
|
|
||||||
# Install all files from $_build/root
|
# Install all system files
|
||||||
mapfile -t root < <(find "$_build/root" -type f -printf "%P\n")
|
mapfile -t root < <(find "$_build/root" -type f -printf "%P\n")
|
||||||
for file in "${root[@]}"; do
|
for file in "${root[@]}"; do
|
||||||
install -Dm0644 "$_build/root/$file" "$pkgdir/$file"
|
install -Dm0644 "$_build/root/$file" "$pkgdir/$file"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Install all files from $_build/apparmor.d
|
# Install all apparmor profiles
|
||||||
mapfile -t apparmor < <(find "$_build/apparmor.d" -type f -printf "%P\n")
|
mapfile -t profiles < <(find "$_build/apparmor.d" -type f -printf "%P\n")
|
||||||
for file in "${apparmor[@]}"; do
|
for file in "${profiles[@]}"; do
|
||||||
install -Dm0644 "$_build/apparmor.d/$file" "$pkgdir/etc/apparmor.d/$file"
|
install -Dm0644 "$_build/apparmor.d/$file" "$pkgdir/etc/apparmor.d/$file"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Ensure some systemd services do not start before apparmor rules are loaded
|
# Ensure some systemd services do not start before apparmor rules are loaded
|
||||||
for path in systemd/*; do
|
for file in systemd/*; do
|
||||||
service=$(basename "$path")
|
service=$(basename "$file")
|
||||||
install -Dm0644 "$path" \
|
install -Dm0644 "$file" \
|
||||||
"$pkgdir/usr/lib/systemd/system/$service.d/apparmor.conf"
|
"$pkgdir/usr/lib/systemd/system/$service.d/apparmor.conf"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue