2021-04-02 19:12:15 +02:00
|
|
|
# Maintainer: Alexandre Pujol <alexandre@pujol.io>
|
|
|
|
# shellcheck disable=SC2034,SC2154,SC2164
|
|
|
|
|
2023-04-19 19:58:50 +02:00
|
|
|
# Warning: for development only, use https://aur.archlinux.org/packages/apparmor.d-git for production use.
|
2022-10-06 21:56:41 +02:00
|
|
|
|
2024-10-23 15:58:09 +02:00
|
|
|
pkgbase=apparmor.d
|
|
|
|
pkgname=(
|
|
|
|
apparmor.d apparmor.d.base
|
|
|
|
apparmor.d.other
|
|
|
|
)
|
|
|
|
pkgver=0.0001
|
2021-04-02 19:12:15 +02:00
|
|
|
pkgrel=1
|
2024-10-23 15:58:09 +02:00
|
|
|
pkgdesc="Full set of apparmor profiles (base)"
|
|
|
|
arch=("any")
|
|
|
|
url="https://github.com/roddhjav/apparmor.d"
|
2021-04-02 19:12:15 +02:00
|
|
|
license=('GPL2')
|
|
|
|
depends=('apparmor')
|
2023-04-19 19:57:31 +02:00
|
|
|
makedepends=('go' 'git' 'rsync')
|
2024-10-23 15:58:09 +02:00
|
|
|
conflicts=("$pkgbase-git" "$pkgbase")
|
2021-04-02 19:12:15 +02:00
|
|
|
|
|
|
|
pkgver() {
|
2024-10-23 15:58:09 +02:00
|
|
|
cd "$srcdir/$pkgbase"
|
2021-12-04 23:09:20 +01:00
|
|
|
echo "0.$(git rev-list --count HEAD)"
|
2021-04-02 19:12:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
prepare() {
|
2022-10-06 21:56:41 +02:00
|
|
|
rsync -a --delete "$startdir" "$srcdir"
|
2021-04-02 19:12:15 +02:00
|
|
|
}
|
|
|
|
|
2021-11-09 23:41:12 +01:00
|
|
|
build() {
|
2024-10-23 15:58:09 +02:00
|
|
|
cd "$srcdir/$pkgbase"
|
2021-11-09 23:41:12 +01:00
|
|
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
|
|
|
export CGO_CFLAGS="${CFLAGS}"
|
|
|
|
export CGO_CXXFLAGS="${CXXFLAGS}"
|
|
|
|
export CGO_LDFLAGS="${LDFLAGS}"
|
|
|
|
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
|
2024-10-23 15:58:09 +02:00
|
|
|
make BUILD=.buid.all DISTRIBUTION=arch
|
|
|
|
make packages DISTRIBUTION=arch
|
2021-11-09 23:41:12 +01:00
|
|
|
}
|
|
|
|
|
2024-10-23 15:58:09 +02:00
|
|
|
package_apparmor.d() {
|
|
|
|
pkgdesc="Full set of apparmor profiles"
|
|
|
|
arch=("$CARCH")
|
|
|
|
conflicts=("${pkgname[@]:1}")
|
|
|
|
cd "$srcdir/$pkgbase"
|
|
|
|
make install BUILD=.buid.all DESTDIR="$pkgdir"
|
|
|
|
}
|
|
|
|
|
|
|
|
package_apparmor.d.base() {
|
|
|
|
arch=("$CARCH")
|
|
|
|
cd "$srcdir/$pkgbase"
|
|
|
|
make install-base DESTDIR="$pkgdir"
|
|
|
|
}
|
|
|
|
|
|
|
|
package_apparmor.d.other() {
|
|
|
|
pkgdesc="Full set of apparmor profiles (other)"
|
|
|
|
depends=(apparmor.d.base)
|
|
|
|
cd "$srcdir/$pkgbase"
|
|
|
|
make profiles-other DESTDIR="$pkgdir"
|
2021-04-02 19:12:15 +02:00
|
|
|
}
|