summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b40b9df8ff9ac9a27824382d748497a122e32d8a (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
47
48
49
50
51
# Maintainer: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com

pkgname=vmd-molfile-plugins
pkgver=1.9.4a55
pkgrel=1
pkgdesc="Visual Molecular Dynamics - molfile plugins"
url="https://www.ks.uiuc.edu/Research/vmd/plugins"
license=(custom)
arch=(x86_64)
depends=(tcl netcdf gcc10)
makedepends=(make patch)
sha256sums=('cc8aef24cb61d8f9973e1b8d71c6356668456c115a846c47621b2edcd080508b'
            'f66172ca4c56dcda18e053887ae41dc28f9fabd9ec2c0668ac4f09aff567fc17'
            'b85e9632f0337b6e46a4a7af5a7b757404a709a53ce20e96e9e8ea3d76e15fc1')

# You should download the source package from the VMD site and put it in the PKGBUILD folder
source=("local://vmd-${pkgver}.src.tar.gz"
        "plugins.patch"
        "LICENSE")
options=(staticlibs)

prepare() {
  cd ${srcdir}/plugins

  patch -Np1 -i "${srcdir}/plugins.patch"
}

build() {
  cd ${srcdir}/plugins

  make LINUXAMD64
}

package() {
  cd ${srcdir}/plugins

  PLUGINDIR=${srcdir}/molfile make distrib

  # install libraries
  install -d ${pkgdir}/usr/lib/${pkgname}
  install -Dm755 ${srcdir}/molfile/LINUXAMD64/molfile/*.so ${pkgdir}/usr/lib/${pkgname}
  install -Dm644 ${srcdir}/molfile/LINUXAMD64/molfile/libmolfile_plugin.a ${pkgdir}/usr/lib/${pkgname}

  # install headers
  install -d ${pkgdir}/usr/include/${pkgname}
  install -Dm644 ${srcdir}/molfile/LINUXAMD64/molfile/libmolfile_plugin.h ${pkgdir}/usr/include/${pkgname}
  install -Dm644 ${srcdir}/molfile/include/{molfile_plugin.h,vmdplugin.h} ${pkgdir}/usr/include/${pkgname}

  # install license
  install -Dm644 ${srcdir}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}