# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Daniel Isenmann <daniel@archlinux.org>
# Contributor: orelien <aurelien.foret@wanadoo.fr>

pkgname=rp-pppoe
pkgver=4.0
pkgrel=5
pkgdesc="Roaring Penguin's Point-to-Point Protocol over Ethernet client"
arch=('x86_64')
url="https://dianne.skoll.ca/projects/rp-pppoe"
license=('GPL')
depends=('ppp' 'sh' 'iproute2')
makedepends=('git')
backup=(etc/ppp/pppoe-server-options)
options=('!makeflags')
install=rp-pppoe.install
source=("git+https://github.com/dfskoll/rp-pppoe.git?signed#tag=$pkgver")
validpgpkeys=('FC2E9B645468698FD7B21655C1842E2A126F42E0'  # Dianne Skoll <dfs@roaringpenguin.com>
              '738E4D954052902C147D07B2685A5A5E511D30E2') # Dianne Skoll <dianne@skoll.ca>
sha512sums=('bea793f4ac8dfa7c4afef367241c81c64566588d18f0337d23308fd07fd98fe64555b0f2396d67f3c910c26456701c3b27553d418987aec3bada5e1a55dd9a1a')

build() {
  cd rp-pppoe/src
  ./configure --prefix=/usr --sbindir=/usr/bin --enable-plugin
  make PLUGIN_DIR="/usr/lib/rp-pppoe" all rp-pppoe.so
}

package() {
  cd rp-pppoe/src
  make PLUGIN_DIR="/usr/lib/rp-pppoe" DESTDIR="$pkgdir" install
}
