summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 06efc82e7f1237cd0b5f443c1cb695eedca78e1d (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
# Maintainer: Mykola Dimura <mykola.dimura@gmail.com>
pkgname=mingw-w64-pteros
pkgver=2.8.r125.g16923940
pkgrel=1
pkgdesc="C++ library for molecular modeling. (mingw-w64)"
arch=('any')
url='https://github.com/yesint/pteros'
license=('Artistic License 2.0')
depends=('mingw-w64-crt' 'mingw-w64-boost')
makedepends=('mingw-w64-cmake' 'git' 'mingw-w64-eigen' 'mingw-w64-fmt' 'mingw-w64-spdlog')
options=('!strip' '!buildflags' 'staticlibs')
source=("${pkgname}"'::git+https://github.com/yesint/pteros.git#branch=master')
sha1sums=('SKIP')

_architectures="i686-w64-mingw32 x86_64-w64-mingw32"

build() {
  cd "$srcdir/${pkgname}"
  for _arch in ${_architectures}; do
    mkdir -p build-${_arch} && pushd build-${_arch}
    ${_arch}-cmake -DWITH_PYTHON=OFF -DWITH_OPENBABEL=OFF -DWITH_GROMACS=OFF -DDOWNLOAD_DEPS=OFF ..
    make
    popd
  done
}

package() {
  for _arch in ${_architectures}; do
    cd "${srcdir}/${pkgname}/build-${_arch}"
    make DESTDIR="${pkgdir}" install 
    ${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
    ${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a
  done
}
 
pkgver() {
  cd "$srcdir/${pkgname}"
  git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
}