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
|
|
|
|
2021-04-02 19:12:15 +02:00
|
|
|
pkgname=apparmor.d
|
2021-05-09 01:39:00 +02:00
|
|
|
pkgver=0.001
|
2021-04-02 19:12:15 +02:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc="Full set of apparmor profiles"
|
2021-11-09 23:41:12 +01:00
|
|
|
arch=("x86_64")
|
2021-05-09 01:39:00 +02:00
|
|
|
url="https://github.com/roddhjav/$pkgname"
|
2021-04-02 19:12:15 +02:00
|
|
|
license=('GPL2')
|
|
|
|
depends=('apparmor')
|
2023-04-19 19:57:31 +02:00
|
|
|
makedepends=('go' 'git' 'rsync')
|
2022-10-06 21:56:41 +02:00
|
|
|
conflicts=("$pkgname-git")
|
2021-04-02 19:12:15 +02:00
|
|
|
|
|
|
|
pkgver() {
|
2021-12-04 23:09:20 +01:00
|
|
|
cd "$srcdir/$pkgname"
|
|
|
|
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() {
|
2023-04-16 22:32:24 +02:00
|
|
|
cd "$srcdir/$pkgname"
|
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"
|
2023-07-08 23:59:54 +02:00
|
|
|
make DISTRIBUTION=arch
|
2021-11-09 23:41:12 +01:00
|
|
|
}
|
|
|
|
|
2021-04-02 19:12:15 +02:00
|
|
|
package() {
|
|
|
|
cd "$srcdir/$pkgname"
|
2022-10-16 00:11:31 +02:00
|
|
|
make install DESTDIR="$pkgdir"
|
2021-04-02 19:12:15 +02:00
|
|
|
}
|