updated on Sun Jan 15 04:04:02 UTC 2012
[aur-mirror.git] / accel-pptp-server-git / PKGBUILD
blob2ff317dbdb1af92b00d377bf2ed8cc6688af07ca
1 # Contributor: Vadim Abramchuk <abram@uainet.net>
2 pkgname=accel-pptp-server-git
3 pkgver=20091126
4 pkgrel=1
5 pkgdesc="Kernelspace PPTP server"
6 arch=('i686' 'x86_64')
7 url="http://accel-pptp.sourceforge.net/"
8 license=('GPL')
9 groups=()
10 depends=('ppp','accel-pptp-kernel-git')
11 makedepends=('git')
12 provides=()
13 conflicts=()
14 replaces=()
15 backup=()
16 options=()
17 #install='accel-pptp.install'
18 install=
19 source=(fix-accel-pptp-install.patch)
20 noextract=()
21 md5sums=('b9a70799466564c1307b52c4159f8163')
23 _gitroot="git://accel-pptp.git.sourceforge.net/gitroot/accel-pptp/accel-pptp"
24 _gitname="accel-pptp"
26 build() {
27   cd "$srcdir"
28   msg "Connecting to GIT server...."
30   if [ -d $_gitname ] ; then
31     cd $_gitname && git pull origin
32     msg "The local files are updated."
33   else
34     git clone $_gitroot
35   fi
37   msg "GIT checkout done or server timeout"
38   msg "Starting make..."
40   rm -rf "$srcdir/$_gitname-build"
41   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
42   cd "$srcdir/$_gitname-build"
44   #
45   # BUILD HERE
46   #
48   export PPPD_VERSION=`/usr/sbin/pppd --version 2>&1|grep version|awk '{print $3}'`
49   echo ">>> Building pppd plugin"
50   cd pppd_plugin
51   ./configure 
52   make
53   mkdir -p $pkgdir/usr/lib/pppd/${PPPD_VERSION}
54   install -m 0644 src/.libs/pptp.so.0.0.0 $pkgdir/usr/lib/pppd/$PPPD_VERSION/pptp.so
55   echo ">>> OK"
56   echo ">>> Plugin install dir is $pkgdir/usr/lib/pppd/$PPPD_VERSION"
57   echo ">>> Patching the source..."
58   cd ../pptpd-1.3.3/
59   
60   patch -p1 < ${startdir}/fix-accel-pptp-install.patch 
61   echo ">>> Building PPTP server..."
62   ./configure --prefix=/usr
63   make
64   make DESTDIR=${pkgdir} install
66