summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 05c5c4b1a43407131834612f52c6c332a86fffaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Maintainer: leepesjee <lpeschier at xs4all dot nl>
pkgname=cbflib
pkgver=0.9.5
pkgrel=1
pkgdesc="An ANSI C library for accessing Crystallographic Binary and Image-supporting Files"
arch=('i686' 'x86_64')
url="http://www.bernstein-plus-sons.com/software/CBF/"
makedepends=('wget')
license=('GPL')
source=(http://sourceforge.net/projects/$pkgname/files/$pkgname/CBFlib_0.9.2/CBFlib-$pkgver.tar.gz)
md5sums=('6cab26809e5d4786aeac1d32f72d7683')

prepare() {
  cd ./CBFlib-$pkgver
  make clean
  sed -i "s|INSTALLDIR  = \$(HOME)|INSTALLDIR  = ${pkgdir}/usr|" ./Makefile
  sed -i "s|HDF5 =|#HDF5 =|" ./Makefile
  sed -i "s|HDF5LIBS = ./lib/libhdf5.a|HDF5LIBS = -lhdf5|" ./Makefile
  sed -i "s|HDF5PREFIX =|#HDF5PREFIX =|" ./Makefile
  sed -i "s|HDF5SOLIBS = -L./lib|HDF5SOLIBS =|" ./Makefile
  sed -i "s|TIME = time|TIME = eval time|" ./Makefile
  sed -i "s|$(TIME) (LD_LIBRARY_PATH|$(TIME) LD_LIBRARY_PATH|" ./Makefile
  sed -i "s|XRD1621.cbf)|XRD1621.cbf|" ./Makefile
  sed -i "s|python|python2|" ./Makefile

}

build() {
  cd ./CBFlib-$pkgver
  NOFORTRAN=yes make all
  # the test suite gives comile errors I could not resolve
  make tests
  #make shared
}

package() {
  cd ./CBFlib-$pkgver
  # the install script searches the solibs in the wrong location ...
  cp ./solib/*.so ./lib
  # ... and forgets to install testalloc
  mkdir -p $pkgdir/usr/bin
  cp ./bin/testalloc $pkgdir/usr/bin
  make install
  rmdir $pkgdir/usr/include/cbflib_old -v
}