summaryrefslogtreecommitdiff
path: root/libre/rp-pppoe-libre/PKGBUILD
blob: 9607756d80efcae7210237f6696c1910570eb085 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# $Id: PKGBUILD 119995 2011-04-18 07:09:47Z daniel $
# Maintainer: Daniel Isenmann <daniel@archlinux.org>
# Contributor: orelien <aurelien.foret@wanadoo.fr>

pkgname=rp-pppoe-libre
pkgver=3.10
pkgrel=6
pkgdesc="Roaring Penguin's Point-to-Point Protocol over Ethernet client. Unfree software recommendation removed."
arch=('i686' 'x86_64')
url="http://www.roaringpenguin.com/pppoe/"
license=('GPL')
depends=('ppp>=2.4.5' 'sh')
options=('!makeflags')
backup=(etc/ppp/pppoe.conf etc/ppp/firewall-standalone etc/ppp/firewall-masq etc/ppp/pppoe-server-options)
source=(http://repo.parabolagnulinux.org/other/$pkgname-$pkgver.tar.gz adsl
        $pkgname.patch)
install=rp-pppoe.install
provides=("rp-pppoe=$pkgver")
replaces=('rp-pppoe')
conflicts=('rp-pppoe')

mksource() {
    wget http://www.roaringpenguin.com/files/download/rp-pppoe-$pkgver.tar.gz \
         -O - | tar xzf -

    pushd rp-pppoe-$pkgver >/dev/null

    patch -Np1 -i ../rp-pppoe-libre.patch

    popd >/dev/null

    mv -v rp-pppoe-$pkgver $pkgname-$pkgver

    tar czvf $pkgname-$pkgver.tar.gz $pkgname-$pkgver/
}

build() {
  cd $srcdir/$pkgname-$pkgver/src
  ./configure --prefix=/usr --enable-plugin
  make PLUGIN_DIR="/usr/lib/rp-pppoe" || return 1
}

package() {
  cd $srcdir/$pkgname-$pkgver/src
  make DESTDIR=$pkgdir install
  
  #moving .so files to /usr/lib according to FS#13876
  mkdir -p ${pkgdir}/usr/lib/rp-pppoe
  mv ${pkgdir}/etc/ppp/plugins/rp-pppoe.so ${pkgdir}/usr/lib/rp-pppoe/
  #not necessary after moving the plugin
  rm -rf ${pkgdir}/etc/ppp/plugins
  #changing config to the new path
  #sed -i 's/LINUX_PLUGIN=/LINUX_PLUGIN=\/usr\/lib\/rp-pppoe\/rp-pppoe.so/g' ${pkgdir}/etc/ppp/pppoe.conf
  
  install -Dm755 $srcdir/adsl $pkgdir/etc/rc.d/adsl
}
md5sums=('2c4a678fa684269ff4579bb639674198'
         'adace1ad441aa88dcb3db52fb7f9c97f'
         '9f0d49c3a550c5ad76bb70d65c9d97b2')