updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / yubico-c-client-git / PKGBUILD
blob8a828be4a95ed620fe310052e3a33db0d9b3ae7e
1 # This is an example PKGBUILD file. Use this as a start to creating your own,
2 # and remove these comments. For more information, see 'man PKGBUILD'.
3 # NOTE: Please fill out the license field for your package! If it is unknown,
4 # then please put 'unknown'.
6 # See http://wiki.archlinux.org/index.php/VCS_PKGBUILD_Guidelines
7 # for more information on packaging from GIT sources.
9 # Maintainer: Hugo Chargois <hugo DOT chargois AT free DOT fr>
10 pkgname=yubico-c-client-git
11 pkgver=20110424
12 pkgrel=2
13 pkgdesc="Yubico yubikey client C library"
14 arch=('i686' 'x86_64')
15 url="https://github.com/Yubico/yubico-c-client"
16 license=('BSD')
17 groups=()
18 depends=('curl' 'libyubikey')
19 makedepends=('git')
20 provides=('ykclient')
21 conflicts=('ykclient')
22 replaces=()
23 backup=()
24 options=()
25 install=
26 source=()
27 noextract=()
28 md5sums=() #generate with 'makepkg -g'
30 _gitroot="git://github.com/Yubico/yubico-c-client.git"
31 _gitname="yubico-c-client"
33 build() {
34   cd "$srcdir"
35   msg "Connecting to GIT server...."
37   if [ -d $_gitname ] ; then
38     cd $_gitname && git pull origin
39     msg "The local files are updated."
40   else
41     git clone $_gitroot $_gitname
42   fi
44   msg "GIT checkout done or server timeout"
45   msg "Starting make..."
47   rm -rf "$srcdir/$_gitname-build"
48   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
49   cd "$srcdir/$_gitname-build"
51   autoreconf --install
52   ./configure --prefix=/usr
53   make
54   make check
57 package() {
58   cd "$srcdir/$_gitname-build"
59   install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
60   make DESTDIR="$pkgdir/" install
61