updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / pspp-git / PKGBUILD
blob8d09b6e4b482e6e3cf72fbb54b867db0ca71f271
1 # Edited for git by: ilikenwf <parwok@gmail.com>
2 # Maintainer: ilikenwf/Matt Parnell <parwok@gmail.com>
3 # Contributor: joyfulgirl <joyfulgirl (at) archlinux.us>
5 pkgname=pspp-git
6 pkgver=20091027
7 pkgrel=1
8 pkgdesc="Statistical analysis program"
9 arch=('i686' 'x86_64')
10 url="http://www.gnu.org/software/pspp/"
11 license=('GPL3')
12 depends=('gsl' 'plotutils' 'pkgconfig' 'texinfo')
13 makedepends=('perl' 'gperf')
14 optdepends=('plotutils: only if you checkout and build from "output" branch'
15             'postgresql-libs: PG database support'
16             'zlib: GNUmeric support'
17             'libxml2: GNUMERIC support')
18 source=()
19 md5sums=()
20 install=pspp.install
22 _gitroot="git://git.sv.gnu.org/pspp.git"
23 _gitname="pspp"
25 build() {
26 export CFLAGS="$CFLAGS -I/opt/mesa-xgl-cvs/include"
27   cd ${srcdir}
28   msg "Connecting to GIT server...."
30   if [ -d ${srcdir}/$_gitname ] ; then
31   cd $_gitname && git pull origin
32   msg "The local files are updated."
33   else
34   git clone $_gitroot
35   fi
36   
37   if [ -d ${srcdir}/gnulib ] ; then
38   cd ${srcdir}/gnulib && git pull origin
39   msg "Gnulib updated."
40   else
41   git clone git://git.sv.gnu.org/gnulib.git
42   fi
44   msg "GIT checkout done or server timeout"
45   msg "Starting make..."
47   
48   rm -rf ${srcdir}/$_gitname-build
49   cp -a ${srcdir}/$_gitname ${srcdir}/$_gitname-build
50   
51   cd ${srcdir}/$_gitname-build
52   
53   aclocal || return 1
54   make -f Smake || return 1
55   autoconf || return 1
56   automake || return 1
57   
58   ./configure --prefix=/usr --sysconfdir=/etc || return 1
59   make || return 1
60   make DESTDIR=$pkgdir install || return 1
62   rm -f ${pkgdir}/usr/share/info/dir
64   if [[ -x $(which emacs) ]]; then
65     emacs -Q --batch --eval '(byte-compile-file "pspp-mode.el")'
66     install -d ${pkgdir}/usr/share/emacs/site-lisp/pspp
67     install -m 644 -t ${pkgdir}/usr/share/emacs/site-lisp/pspp \
68                pspp-mode.el{,c}
69   fi