updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / gwyddion / PKGBUILD
blobb159f911954f0f1a50c711530f0f06b66d9436c9
1 # on the base of Gentoo gwyddion ebuild
2 # http://packages.gentoo.org/package/sci-visualization/gwyddion
4 pkgname=gwyddion
5 pkgver=2.26
6 pkgrel=1
7 pkgdesc="A modular program for SPM (scanning probe microscopy) and other 2D (height field) data visualization and analysis"
8 url="http://gwyddion.net/"
9 license=("GPL")
10 arch=('i686' 'x86_64')
11 depends=('gtk2>=2.8' 'pango' 'cairo' 'gtkglext' 'desktop-file-utils' 'python2' 'pygtk'
12          'hicolor-icon-theme' 'openexr' 'fftw' 'libunique')
13 #depends=('freeglut' 'gtksourceview')
14 makedepends=('pkgconfig>=0.16')
15 optdepends=('libxmu: for alternative "remote control" backend'
16             'gconf: better GNOME and XFce integration (SPM file thumbnails)'
17             'libxml2: SPML file support'
18             'zlib: Matlab MAT5 file support'
19             'perl: development of plug-in'
20             'ruby: development of plug-in'
21             'fpc: development of plug-in'
22             'gtksourceview2: Pygwy console syntax highlighting')
23 install=gwyddion.install
24 source=(http://downloads.sourceforge.net/sourceforge/gwyddion/$pkgname-$pkgver.tar.xz)
25 md5sums=('74a7181d89b4ed657909a60b387ed0d3')
28 build() {
29   cd "${srcdir}/$pkgname-$pkgver"
31 #  ./configure --prefix=/usr --disable-desktop-file-update \
32 #               --disable-rpath \
33 #               --enable-library-bloat \
34 #               --enable-plugin-proxy \
36   # python2 fix
37   for file in $(find . -name '*.py' -print); do
38       sed -i 's_#!.*/usr/bin/python_#!/usr/bin/python2_' $file
39       sed -i 's_#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
40   done
42   ./configure --prefix=/usr --sysconfdir=/etc \
43               --localstatedir=/var --libexecdir=/usr/lib PYTHON=python2
44   make PYTHON=python2
45   make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" PYTHON=python2 install
46   
47   install -m755 -d "${pkgdir}/usr/share/gconf/schemas"
49   gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain gwyddion ${pkgdir}/etc/gconf/schemas/*.schemas || return 1
50   rm -f ${pkgdir}/etc/gconf/schemas/*.schemas