# Maintainer: Daniel Micay <danielmicay@gmail.com>
pkgname=paxd
pkgver=15
pkgrel=1
pkgdesc='PaX exception daemon'
arch=(i686 x86_64)
url='https://github.com/thestinger/paxd/'
license=(MIT)
depends=(glibc)
source=(https://github.com/thestinger/paxd/archive/$pkgver.tar.gz 10-enable-pax.conf)
sha1sums=('a3ae5857e6379d08a5c55c46a97938b7373dee53'
          '8ee73dd288bc32438078e032dfc50a2f8ea6a5f2')
backup=(etc/paxd.conf)

build() {
  cd $pkgname-$pkgver
  make CC=gcc
}

package() {
  cd $pkgname-$pkgver
  mkdir -p "$pkgdir/usr/lib/systemd/system/sysinit.target.wants"
  make PREFIX=/usr DESTDIR="$pkgdir" install
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -Dm644 ../10-enable-pax.conf "$pkgdir/usr/lib/sysctl.d/10-enable-pax.conf"
}
