apparmor.d/PKGBUILD

43 lines
993 B
Bash
Raw Normal View History

2021-04-02 19:12:15 +02:00
# Maintainer: Alexandre Pujol <alexandre@pujol.io>
# shellcheck disable=SC2034,SC2154,SC2164
2022-10-06 21:56:41 +02:00
# Warning: for development only, use https://aur.archlinux.org/packages/apparmor.d-git
# for production use.
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')
2022-08-31 23:16:21 +02:00
makedepends=('go' 'git' 'rsync' 'lsb-release')
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
cd "$srcdir/$pkgname"
2022-09-13 19:14:58 +02:00
./configure --complain
2021-04-02 19:12:15 +02:00
}
2021-11-09 23:41:12 +01:00
build() {
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"
make
2021-11-09 23:41:12 +01:00
}
2021-04-02 19:12:15 +02:00
package() {
cd "$srcdir/$pkgname"
make install DESTDIR="$pkgdir"
2021-04-02 19:12:15 +02:00
}