mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-14 23:43:56 +01:00
Better install params.
This commit is contained in:
parent
0c494ed2ba
commit
355235b3cc
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
_build
|
.build
|
21
PKGBUILD
21
PKGBUILD
@ -12,7 +12,7 @@ depends=('apparmor')
|
|||||||
makedepends=('bc')
|
makedepends=('bc')
|
||||||
|
|
||||||
pkgver() {
|
pkgver() {
|
||||||
echo "$pkgver + .1" | bc
|
echo "$pkgver + 0.01" | bc
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
@ -23,16 +23,20 @@ prepare() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
local _root='_build'
|
local _build='.build/apparmor.d'
|
||||||
cd "$srcdir/$pkgname"
|
cd "$srcdir/$pkgname"
|
||||||
|
|
||||||
# Install all files from root/
|
# Install all files from root/
|
||||||
cp --recursive --preserve=mode,ownership,timestamps "$_root/root/"* "$pkgdir/"
|
mapfile -t root < <(find root -type f -printf "%P\n")
|
||||||
|
for file in "${root[@]}"; do
|
||||||
|
install -Dm0644 "root/$file" "$pkgdir/$file"
|
||||||
|
done
|
||||||
|
|
||||||
# Install all files from apparmor.d/
|
# Install all files from $_build
|
||||||
install -d "$pkgdir"/etc/apparmor.d/
|
mapfile -t build < <(find "$_build/" -type f -printf "%P\n")
|
||||||
cp --recursive --preserve=mode,ownership,timestamps \
|
for file in "${build[@]}"; do
|
||||||
$_root/apparmor.d/* "$pkgdir"/etc/apparmor.d/
|
install -Dm0644 "$_build/$file" "$pkgdir/etc/apparmor.d/$file"
|
||||||
|
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 path in systemd/*; do
|
||||||
@ -40,4 +44,7 @@ package() {
|
|||||||
install -Dm0644 "$path" \
|
install -Dm0644 "$path" \
|
||||||
"$pkgdir/usr/lib/systemd/system/$service.d/apparmor.conf"
|
"$pkgdir/usr/lib/systemd/system/$service.d/apparmor.conf"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Set special access rights
|
||||||
|
chmod 0755 "$pkgdir"/usr/bin/*
|
||||||
}
|
}
|
||||||
|
2
configure
vendored
2
configure
vendored
@ -3,7 +3,7 @@
|
|||||||
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
|
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
readonly ROOT=_build
|
readonly ROOT=.build
|
||||||
declare -a REMOVE_LIST
|
declare -a REMOVE_LIST
|
||||||
|
|
||||||
_die() { printf '%s\n' "$*" >&2 && exit 1; }
|
_die() { printf '%s\n' "$*" >&2 && exit 1; }
|
||||||
|
6
debian/apparmor.d.install
vendored
6
debian/apparmor.d.install
vendored
@ -1,6 +1,6 @@
|
|||||||
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
|
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
_build/apparmor.d/* etc/apparmor.d
|
.build/apparmor.d/* etc/apparmor.d
|
||||||
_build/root/etc/* etc/
|
.build/root/etc/* etc/
|
||||||
_build/root/usr/* usr/
|
.build/root/usr/* usr/
|
||||||
|
Loading…
Reference in New Issue
Block a user