summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9efc9cbc7be76e30191eafd6dce76db769098b59 (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: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Damir Perisa <damir.perisa@bluewin.ch>

pkgname=openbabel2
pkgver=2.4.1
pkgrel=1
pkgdesc="A library designed to interconvert between many file formats used in molecular modeling and computational chemistry (libs only)"
arch=('x86_64')
url="https://openbabel.org/wiki/Main_Page"
license=('GPL')
depends=('libxml2' 'libsm')
optdepends=('wxgtk: GUI interface')
makedepends=('cmake' 'eigen' 'wxgtk' 'boost' 'python')
source=("https://downloads.sourceforge.net/${pkgname%2}/${pkgname%2}-${pkgver}.tar.gz")
md5sums=('d9defcd7830b0592fece4fe54a137b99')

prepare() {
  mkdir -p build
}

build() {
  cd build
  #export CXXFLAGS+=' -std=gnu++98'
  cmake ../openbabel-$pkgver \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config \
    -DPYTHON_BINDINGS=ON
  make

  # To split python bindings
  sed -i '/scripts.cmake_install.cmake/d' cmake_install.cmake
}

package() {
  cd build
  make DESTDIR="$pkgdir" install

  rm -rf "${pkgdir}/usr/bin"
  rm -rf "${pkgdir}/usr/include/inchi"
  rm -rf "${pkgdir}/usr/lib/libinchi.so"
  rm -rf "${pkgdir}/usr/lib/libinchi.so.0"
  rm -rf "${pkgdir}/usr/lib/libinchi.so.0.4.1"
  rm -rf "${pkgdir}/usr/lib/libopenbabel.so"
  rm -rf "${pkgdir}/usr/share/man"
}