summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 750900202d9475495696abf9e677ec2be00f33c4 (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
52
53
54
55
56
# Maintainer:  Vitalii Kuzhdin <vitaliikuzhdin@gmail.com>

pkgname="paramotopy"
pkgver=1.0.3.7
_commit="36121881a137cf29c7f662bd792a0e823d5742f2"
pkgrel=2
pkgdesc="Parallel parameter homotopy through Bertini"
arch=('x86_64')
url="https://${pkgname}.com"
_url="https://github.com/ofloveandhate/${pkgname}"
license=('custom:Paramotopy license')
makedepends=('boost>=1.53' 'gmp')
depends=('glibc' 'gcc-libs' 'boost-libs>=1.53' 'bertini' 'mpfr' 'openmpi')
optdepends=('paramotopy-docs: HTML documentation')
_pkgsrc="${pkgname}-${_commit}"
source=("${_pkgsrc}.tar.gz::${_url}/archive/${_commit}.tar.gz"
        "${pkgname}_fix_deprecated_boost_timer.patch")
sha256sums=('4f04d932c540d68d69d2d8605699921c4e98227016999056b8afbe5d630ca54a'
            'e355ddea4c31f22c008e63f0418a2a6e77103b6779763a817604daaa3b644c21')

pkgver() {
  cd "${srcdir}/${_pkgsrc}"
  sed -n 's/AC_INIT(\[paramotopy\], \[\([^]]*\)\],.*/\1/p' "configure.ac"
}

prepare() {
  cd "${srcdir}/${_pkgsrc}"
  for _patch in "${srcdir}/${pkgname}"*".patch"; do
    patch -p1 -i "${_patch}"
  done

  sed -i 's/1\.3\.7/1.0.3.7/g' "COPYING"
}

build() {
  cd "${srcdir}/${_pkgsrc}"
  libtoolize
  autoreconf -vfi
  autoupdate
  CPPFLAGS+=" -I/usr/include/bertini"
  LDFLAGS+=" -L/usr/lib/bertini"
  ./configure \
    --prefix='/usr' \
    --includedir='/usr/include'
  make
}

package() {
  cd "${srcdir}/${_pkgsrc}"
  make DESTDIR="${pkgdir}" install

  install -Dm644 "README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"
  # install -Dm644 "NEWS"      "${pkgdir}/usr/share/doc/${pkgname}/NEWS"
  install -Dm644 "COPYING"   "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
  # install -Dm644 "AUTHORS"   "${pkgdir}/usr/share/licenses/${pkgname}/AUTHORS"
}