updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / socketcand-git / PKGBUILD
blob8e77fc665bb3528bf24e44bf3445a30ce21ab7e3
1 # Maintainer: Jan-Niklas Meier <dschanoeh@googlemail.com>
2 pkgname=socketcand-git
3 pkgver=20111019
4 pkgrel=1
5 pkgdesc="Socket CAN daemon"
6 arch=('i686' 'x86_64')
7 url="https://github.com/dschanoeh/socketcand"
8 license=('GPLv2')
9 groups=()
10 depends=()
11 makedepends=(git libconfig)
12 optdepends=()
13 provides=()
14 conflicts=()
15 replaces=()
16 backup=()
17 options=()
18 install=
19 changelog=
20 source=()
21 noextract=()
22 md5sums=()
24 _gitroot=http://github.com/dschanoeh/socketcand.git
25 _gitname=socketcand
27 build() {
28 cd "$srcdir"
30 msg "Connecting to $_gitroot..."
31 if [[ -d $_gitname ]]; then
32 cd $_gitname && git pull origin && cd ..
33 msg2 "Local files updated"
34 else
35 git clone $_gitroot
36 msg2 "Git checkout done"
39 rm -rf $_gitname-build
40 git clone $_gitname $_gitname-build
41 cd $_gitname-build
43 msg "Starting configure..."
45 ./configure --enable-rc-script --disable-init-script --mandir=/usr/share/man/man1
47 msg "Starting make..."
48 make
51 package() {
52 cd "$srcdir/$_gitname-build"
53 mkdir -p $pkgdir/usr/share/man/man1
54 mkdir -p $pkgdir/etc/rc.d
55 mkdir -p $pkgdir/usr/local/bin
56 make install SCRIPT="rc" PREFIX="/usr" DESTDIR="$pkgdir" sysroot="$pkgdir"
57 chmod +x $pkgdir/etc/rc.d/socketcand