summaryrefslogtreecommitdiff
path: root/community/camlp5/PKGBUILD
blob: cfbfdadbc4a0b1fe168f547dbcedb16a9869952f (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Maintainer: Thomas Dziedzic < gostrc at gmail >
# Contributor: Nathan Owe <ndowens.aur at gmail dot com>
# Contributor: George Giorgidze <giorgidze@gmail.com>
# Contributor: Massimiliano Brocchini <brocchini@netseven.it>

pkgname=('camlp5' 'camlp5-transitional')
_baseversion=6.05
_patchlevel=0
#pkgver=${_baseversion}.${_patchlevel}
pkgver=${_baseversion}
pkgrel=1
arch=('i686' 'x86_64')
url='http://pauillac.inria.fr/~ddr/camlp5/'
license=('BSD')
depends=('ocaml')
source=("http://pauillac.inria.fr/~ddr/camlp5/distrib/src/camlp5-${_baseversion}.tgz")
# upstream likes to release occasional patches instead of releasing new versions
for i in $(seq ${_patchlevel}); do
  source+=("http://pauillac.inria.fr/~ddr/camlp5/distrib/src/patch-${_baseversion}-${i}")
done
md5sums=('51e333f027ead70aa1b0cd7993320e24')

build() {
  cd camlp5-${_baseversion}

  for i in $(seq ${_patchlevel}); do
    patch -Np0 -i ${srcdir}/patch-${_baseversion}-${i}
  done

  cd ${srcdir}

  cp -r camlp5-${_baseversion} camlp5-transitional-${_baseversion}

  cd ${srcdir}/camlp5-${_baseversion}

  ./configure \
    -prefix '/usr' \
    -mandir '/usr/share/man' \
    -strict

  make world.opt

  cd ${srcdir}/camlp5-transitional-${_baseversion}

  ./configure \
    -prefix '/usr' \
    -mandir '/usr/share/man' \
    -transitional

  make world.opt
}

package_camlp5() {
  pkgdesc='A preprocessor-pretty-printer of OCaml.'
  conflicts=('camlp5-transitional')

  cd camlp5-${_baseversion}

  make DESTDIR=${pkgdir} install

  install -D -m644 LICENSE \
    ${pkgdir}/usr/share/licenses/camlp5/LICENSE
}

package_camlp5-transitional() {
  pkgdesc='A preprocessor-pretty-printer of OCaml. (transitional)'
  conflicts=('camlp5')

  cd camlp5-transitional-${_baseversion}

  make DESTDIR=${pkgdir} install

  install -D -m644 LICENSE \
    ${pkgdir}/usr/share/licenses/camlp5-transitional/LICENSE
}